System.ArgumentException (Invalid Parameter) when switching away from a loading PPTX file
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Comienza con QuickLook.Plugin.OfficeViewer.SyncfusionControl.OpenPowerpoint y sigue después la ruta de renderizado diferido hasta PdfViewerControl.ReRenderCurrentPage y PdfPageExtension.Render. Reproduce el cambio rápido con un PPTX grande y verifica que la carga anterior ya no llegue al renderizado con dimensiones cero ni produzca una System.ArgumentException no controlada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
For all's convenience, please use English to fill this issue.
Please search within existing issues before the submission. Has this issue already been reported?
Describe the bug
The OfficeViewer plugin throws a System.ArgumentException when the user switches to a different file while a large .pptx file is still loading and converting. The exception occurs because the delayed UI rendering task attempts to execute after the viewer control has been hidden or removed, resulting in an invalid rendering dimension (width/height = 0) being passed to System.Drawing.Bitmap.
To Reproduce
Steps to reproduce the behavior:
- Select a large
.pptxfile (e.g., >10MB) to preview it via QuickLook. - While the file is still loading/converting (before the actual preview is rendered), quickly switch to preview another file (e.g., using arrow keys).
- The background conversion of the initial
.pptxfile finishes and triggers the delayedDispatcher.BeginInvokerendering task. - See error in the exception log due to invalid UI control dimensions.
Expected behavior
The plugin should gracefully handle rapid file switching. It should either cancel the background .pptx to .pdf conversion process when the user selects a different file, or add a safety check before rendering to ensure the viewer control's dimensions are valid (width > 0 and height > 0), rather than throwing an unhandled exception.
Desktop (please complete the following information):
- OS Version: Windows 11 25H2
- QuickLook Version: 4.4.0.0
Screenshots and Exception Log
QuickLook - 目标幻灯片.pptx v4.4.0.0
2026/3/15 15:00:02 Windows 10.0.26200.2
System.ArgumentException: 参数无效。
在 System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
在 PdfiumViewer.PdfDocument.Render(Int32 page, Int32 width, Int32 height, Single dpiX, Single dpiY, PdfRotation rotate, PdfRenderFlags flags, Boolean drawFormFields)
在 QuickLook.Plugin.PDFViewer.PdfPageExtension.Render(PdfDocumentWrapper doc, Int32 page, Double factor, Boolean fixDpi)
在 QuickLook.Plugin.PDFViewer.PdfViewerControl.ReRenderCurrentPage()
在 QuickLook.Plugin.PDFViewer.PdfViewerControl.UpdatePageViewWhenSelectionChanged(Object sender, SelectionChangedEventArgs e)
在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
在 System.Windows.Controls.ListBox.OnSelectionChanged(SelectionChangedEventArgs e)
在 System.Windows.Controls.Primitives.Selector.SelectionChanger.End()
在 System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(ItemInfo info, Boolean assumeInItemsCollection)
在 System.Windows.Controls.Primitives.Selector.OnSelectedIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
在 System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
在 System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
在 System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
在 System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
在 System.Windows.DependencyObject.CoerceValue(DependencyProperty dp)
在 System.Windows.Controls.Primitives.Selector.OnItemsChanged(NotifyCollectionChangedEventArgs e)
在 System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
在 System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
在 System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
在 System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
在 System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
在 System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
在 System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
在 System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
在 QuickLook.Common.ExtensionMethods.EnumerableExtensions.ForEach[T](IEnumerable`1 enumeration, Action`1 action)
在 QuickLook.Plugin.OfficeViewer.SyncfusionControl.<>c__DisplayClass3_0.<OpenPowerpoint>b__0()
在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
- Lenguaje dominante
- C#
- Estrellas
- 25.5k
- Forks
- 1.4k
- Merge medio
- 14 h 38 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de QL-Win/QuickLook
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
-
[Bug] If the first character entered into the search box is a space, the preview window will close.Posiblemente ocupada @MORTEM3845 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
-
[Bug] MSI installer does not display the correct application icon in Windows Programs and FeaturesPosiblemente ocupada @MORTEM3845 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
VideoViewer: rotated (portrait phone) videos shown sideways when system decimal separator is a commaPosiblemente ocupada @MORTEM3845 la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Todos los issues de QL-Win/QuickLook
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
unoplatform/uno.check#591 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
weaviate/csharp-client#378 ·
-
confirmed enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
agentic-workflows automated testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Azure-Samples/Legacy-Modernization-Agents#194 ·
Los mantenedores suelen responder en 1 día
-
area-encryption area-security p1-recommended technical-debt
Dificultad 2/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día