I upgraded from 1.3.1 to 1.3.2 on my Windows 10 PC. Prior to the upgrade, dark mode was enabled. When I attempted to open the application after the upgrade, it crashed with the following error.
An Unknown Error has occurred.
System.Windows.Markup.XamlParseException: Set property 'System.Windows.ResourceDictionary.Source' threw an exception. ---> System.IO.IOException: Cannot locate resource 'themes/controls/treeviewdark.xaml'.
at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
at System.IO.Packaging.PackWebResponse.get_ContentType()
at MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response)
at System.Windows.ResourceDictionary.set_Source(Uri 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)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
at MS.Internal.AppModel.AppModelKnownContentFactory.BamlConverter(Stream stream, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
at MS.Internal.AppModel.MimeObjectFactory.GetObjectAndCloseStream(Stream s, ContentType contentType, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
at System.Windows.ResourceDictionary.set_Source(Uri value)
at HandBrakeWPF.App.OnStartup(StartupEventArgs e) in C:\TeamCity\buildAgent\work\f59d4bfd6460bac1\win\CS\HandBrakeWPF\App.xaml.cs:line 127
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
I wasn't able to identify and manually change the configuration that causes it to open in dark mode. I was able to work around the issue by uninstalling 1.3.2, reinstalling 1.3.1, and disabling dark mode. When I reinstalled 1.3.2, it opened successfully. Out of curiosity, I enabled dark mode from 1.3.2. I thought the implementation details may have changed, and it would work if enabled from 1.3.2, but I encountered the same issue and needed to repeat the steps described previously.
I was unsure whether to provide an activity log in addition to the exception log. If so, please clarify if it should be generated during a successful open of 1.3.1 or 1.3.2. Let me know if you need any additional information. Thanks for all the work you do to maintain this project!
i have the same problem
Une erreur inconnue est survenue.
System.Windows.Markup.XamlParseException: La propri茅t茅 Set 'System.Windows.ResourceDictionary.Source' a lev茅 une exception. ---> System.IO.IOException: Impossible de trouver la ressource 'themes/controls/treeviewdark.xaml'.
脿 MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
脿 System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
脿 System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
脿 System.IO.Packaging.PackWebResponse.get_ContentType()
脿 MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response)
脿 System.Windows.ResourceDictionary.set_Source(Uri value)
脿 MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
--- Fin de la trace de la pile d'exception interne ---
脿 System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
脿 System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
脿 System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
脿 System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
脿 System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
脿 MS.Internal.AppModel.AppModelKnownContentFactory.BamlConverter(Stream stream, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
脿 MS.Internal.AppModel.MimeObjectFactory.GetObjectAndCloseStream(Stream s, ContentType contentType, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
脿 System.Windows.ResourceDictionary.set_Source(Uri value)
脿 HandBrakeWPF.App.OnStartup(StartupEventArgs e) dans C:\TeamCity\buildAgent\work\f59d4bfd6460bac1\win\CS\HandBrakeWPF\App.xaml.cs:ligne 127
脿 System.Windows.Application.<.ctor>b__1_0(Object unused)
脿 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)
Just workaround to manually Turn OFF dark theme:
HB must be closed.
Go to folder %APPDATA%\HandBrake (just copy-paste to explorer adress bar and hit enter)
With text editor (Notepad or similar) open file settings.json
Find text UseDarkTheme: true (usually near bottom of file)
Change true to false
Save file
perfect! thanks!
same problem here
An Unknown Error has occurred.
System.Windows.Markup.XamlParseException: Set property 'System.Windows.ResourceDictionary.Source' threw an exception. ---> System.IO.IOException: Cannot locate resource 'themes/controls/treeviewdark.xaml'.
at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
at System.IO.Packaging.PackWebResponse.get_ContentType()
at MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response)
at System.Windows.ResourceDictionary.set_Source(Uri 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)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
at MS.Internal.AppModel.AppModelKnownContentFactory.BamlConverter(Stream stream, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
at MS.Internal.AppModel.MimeObjectFactory.GetObjectAndCloseStream(Stream s, ContentType contentType, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
at System.Windows.ResourceDictionary.set_Source(Uri value)
at HandBrakeWPF.App.OnStartup(StartupEventArgs e) in C:\TeamCity\buildAgent\work\f59d4bfd6460bac1\win\CS\HandBrakeWPF\App.xaml.cs:line 127
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
We're working on this. Thanks everyone for your patience.
@kerwinyoder @owai1980 @passat1 @t0ma5
Please visit HandBrake.fr and re-download the Windows UI. I've rebuilt and republished the file which was faulty.
Most helpful comment
Just workaround to manually Turn OFF dark theme:
HB must be closed.
Go to folder %APPDATA%\HandBrake (just copy-paste to explorer adress bar and hit enter)
With text editor (Notepad or similar) open file settings.json
Find text UseDarkTheme: true (usually near bottom of file)
Change true to false
Save file