srwi / EverythingToolbar

Everything integration for the Windows taskbar.
Other
9.49k stars 412 forks source link

EverythingToolbar 1.0.4 crashes with XamlParseException on win10 #366

Closed yyjdelete closed 1 year ago

yyjdelete commented 1 year ago

Preflight Checklist

EverythingToolbar Version

1.0.4

Windows Version

Win10 22H2

Steps to reproduce

  1. click the search icon;

Expected Behavior

Open the search tab

Actual Behavior

The whole app crashes(only on win10 but not for win11)

Screenshots

No response

Log output

Application: EverythingToolbar.Launcher.exe Framework version: v4.0.30319 Explanation: The process terminated due to an unhandled exception. Exception information: System.ArgumentException at System.Windows.Controls.ControlTemplate.ValidateTargetType(System.Type, System.String) at System.Windows.Controls.ControlTemplate.set_TargetType(System.Type) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(System.Object, System.Xaml.XamlMember, System.Object)

Exception information: System.Windows.Markup.XamlParseException at System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri) at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri) at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, Boolean, System.Uri) at System.Windows.Markup.XamlReader.Load(System.Xaml.XamlReader, System.Windows.Markup.ParserContext) at System.Windows.Markup.XamlReader.Load(System.Xml.XmlReader, System.Windows.Markup.ParserContext, System.Windows.Markup.XamlParseMode, Boolean, System.Collections.Generic.List`1) at System.Windows.Markup.XamlReader.Load(System.IO.Stream, System.Windows.Markup.ParserContext, Boolean) at MS.Internal.AppModel.MimeObjectFactory.GetObjectAndCloseStream(System.IO.Stream, MS.Internal.ContentType, System.Uri, Boolean, Boolean, Boolean, Boolean, System.Windows.Markup.XamlReader ByRef) at System.Windows.ResourceDictionary.set_Source(System.Uri) at EverythingToolbar.Behaviors.ThemeAwareness.AddResource(System.String, System.String) at EverythingToolbar.Behaviors.ThemeAwareness.ApplyTheme(Boolean) at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs) at System.Windows.BroadcastEventHelper.BroadcastEvent(System.Windows.DependencyObject, System.Windows.RoutedEvent) at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(System.Object) at MS.Internal.LoadedOrUnloadedOperation.DoWork() at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks() at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() at System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object) at System.Windows.Media.MediaContext.RenderMessageHandler(System.Object) at System.Windows.Interop.HwndTarget.OnResize() at System.Windows.Interop.HwndTarget.HandleMessage(MS.Internal.Interop.WindowMessage, IntPtr, IntPtr) at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)


Try to attach an debugger, and show the inner expection is the below one with `BaseUri=file:///C:/Program Files (x86)/EverythingToolbar/Themes/Win10/Controls/SearchBox.xaml`
```cs

System.Windows.Markup.XamlParseException: "An exception was thrown while setting property 'System.Windows.Controls.ControlTemplate.TargetType'.", line number '8', line position '34'. ---> System.ArgumentException: TargetType of ControlTemplate must be Control, Page, PageFunctionBase, or equivalent subclass. Invalid type 'Grid'.
    at System.Windows.Controls.ControlTemplate.ValidateTargetType(Type targetType, String argName)
    at System.Windows.Controls.ControlTemplate.set_TargetType(Type value)
    at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<>c.<Create_BamlProperty_ControlTemplate_TargetType>b__275_0(Object target, Object value)
    at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value)
    at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
    at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
    --- End of inner exception stack trace ---
    at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)

Additional Information

No response

srwi commented 1 year ago

Sorry about that. I will release a fix for this later today.

ppvnf commented 1 year ago

it also crashed explorer for me

srwi commented 1 year ago

The bug is fixed and available in the 1.0.5 release.