QL-Win / QuickLook

Bring macOS “Quick Look” feature to Windows
http://pooi.moe/QuickLook/
GNU General Public License v3.0
16.59k stars 1.07k forks source link

Incorrect SVG file displaying #1430

Open pixkk opened 1 month ago

pixkk commented 1 month ago

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 It display file incorrectly.

To Reproduce

  1. Press "Space" on .svg file

Expected behavior image

Actual behavior image

Desktop:

Screenshots and Exception Log

> ========04.08.2022 14:49:39======== > System.Windows.Markup.XamlParseException: Значение не может быть неопределенным. > Имя параметра: bitmap ---> System.ArgumentNullException: Значение не может быть неопределенным. > Имя параметра: bitmap > в System.Windows.Interop.Imaging.CriticalCreateBitmapSourceFromHBitmap(IntPtr bitmap, IntPtr palette, Int32Rect sourceRect, BitmapSizeOptions sizeOptions, WICBitmapAlphaChannelOption alphaOptions) > в QuickLook.Plugin.FolderViewer.FileToIconConverter.Convert(Object[] values, Type targetType, Object parameter, CultureInfo culture) > в System.Windows.Data.MultiBindingExpression.TransferValue() > в System.Windows.Data.MultiBindingExpression.Transfer() > в System.Windows.Data.MultiBindingExpression.UpdateTarget(Boolean includeInnerBindings) > в System.Windows.Data.MultiBindingExpression.AttachToContext(Boolean lastChance) > в System.Windows.Data.MultiBindingExpression.AttachOverride(DependencyObject d, DependencyProperty dp) > в System.Windows.Data.BindingExpressionBase.OnAttach(DependencyObject d, DependencyProperty dp) > в System.Windows.StyleHelper.GetInstanceValue(UncommonField`1 dataField, DependencyObject container, FrameworkElement feChild, FrameworkContentElement fceChild, Int32 childIndex, DependencyProperty dp, Int32 i, EffectiveValueEntry& entry) > в System.Windows.FrameworkTemplate.ReceivePropertySet(Object targetObject, XamlMember member, Object value, DependencyObject templatedParent) > в System.Windows.FrameworkTemplate.<>c__DisplayClass45_0.b__3(Object sender, XamlSetValueEventArgs setArgs) > в System.Xaml.XamlObjectWriter.OnSetValue(Object eventSender, XamlMember member, Object value) > в System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent) > в System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx) > в System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx) > в System.Xaml.XamlObjectWriter.WriteEndObject() > в System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter) > --- Конец трассировки внутреннего стека исключений --- > в System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) > в System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter) > в System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter) > в System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField) > в System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren) > в System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate) > в System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container) > в System.Windows.FrameworkElement.ApplyTemplate() > в System.Windows.FrameworkElement.MeasureCore(Size availableSize) > в System.Windows.UIElement.Measure(Size availableSize) > в System.Windows.Controls.Border.MeasureOverride(Size constraint) > в System.Windows.FrameworkElement.MeasureCore(Size availableSize) > в System.Windows.UIElement.Measure(Size availableSize) > в System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) > в System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) > в System.Windows.Controls.Grid.MeasureOverride(Size constraint) > в System.Windows.FrameworkElement.MeasureCore(Size availableSize) > в System.Windows.UIElement.Measure(Size availableSize) > в System.Windows.Controls.Control.MeasureOverride(Size constraint) > в System.Windows.FrameworkElement.MeasureCore(Size availableSize) > в System.Windows.UIElement.Measure(Size availableSize) > в System.Windows.Controls.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint) > в System.Windows.Controls.StackPanel.MeasureOverride(Size constraint) > в System.Windows.FrameworkElement.MeasureCore(Size availableSize) > в System.Windows.UIElement.Measure(Size availableSize) > в MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) > в System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint) > в System.Windows.FrameworkElement.MeasureCore(Size availableSize) > в System.Windows.UIElement.Measure(Size availableSize) > в System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) > в System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) > в System.Windows.Controls.Grid.MeasureOverride(Size constraint) > в System.Windows.FrameworkElement.MeasureCore(Size availableSize) > в System.Windows.UIElement.Measure(Size availableSize) > в System.Windows.Controls.Control.MeasureOverride(Size constraint) > в System.Windows.FrameworkElement.MeasureCore(Size availableSize) > в System.Windows.UIElement.Measure(Size availableSize) > в System.Windows.ContextLayoutManager.UpdateLayout() > в System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) > в System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() > в System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) > в System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) > в 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) > в System.Windows.Threading.DispatcherOperation.InvokeImpl() > в MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj) > в System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) > в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) > в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) > в MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state) > в System.Windows.Threading.DispatcherOperation.Invoke() > в System.Windows.Threading.Dispatcher.ProcessQueue() > в System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) > в MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) > в MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) > в 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) > в System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) > в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) > в MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) > в System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) > в System.Windows.Application.RunDispatcher(Object ignore) > в System.Windows.Application.RunInternal(Window window) > в QuickLook.App.Main()