Lacro59 / playnite-systemchecker-plugin

This plugin checks if you have the minimum and required configuration in Playnite.
https://playnite.link
MIT License
23 stars 2 forks source link

SystemChecker causes Playnite to crash on startup #19

Closed darklinkpower closed 2 years ago

darklinkpower commented 2 years ago

image

playnite.log

extensions.log

Lacro59 commented 2 years ago

Can you try this version? playnite-systemchecker-plugin_2_0.zip

darklinkpower commented 2 years ago

Still happening in that build

image

Extensions log

04-10 09:29:11.104|WARN |GameActivity#Common:File C:\Games\Playnite\Extensions\playnite-gameactivity-plugin\Resources\Controls\ListExtendStyle.xaml not find
04-10 09:29:12.073|DEBUG|SuccessStory#Downloader:Downloading string content from https://steamcommunity.com/profiles/76561198025294991/ using System.Text.UTF8Encoding encoding.
04-10 09:29:12.891|WARN |SystemChecker#ItemCollection`1:Skipping non-id collection item C:\Games\Playnite\ExtensionsData\e248b230-6edf-41ea-a3c3-7861fa267263\SystemChecker\pc.json
04-10 09:29:13.424|DEBUG|SuccessStory#Downloader:Downloading string content from https://steamcommunity.com/id/darklinkpower using System.Text.UTF8Encoding encoding.
04-10 09:29:14.131|WARN |SuccessStory#GenericAchievements:Bad Steam configuration
04-10 09:29:17.696|ERROR|GameActivity#Common:Error on Win32_VideoController|D:\GitHub\Lacro59\playnite-gameactivity-plugin\source\playnite-plugincommon\CommonPluginsShared\LocalSystem.cs|163
System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
   en CommonPluginsShared.LocalSystem.GetPcInfo(Boolean WithDiskInfos) en D:\GitHub\Lacro59\playnite-gameactivity-plugin\source\playnite-plugincommon\CommonPluginsShared\LocalSystem.cs:línea 163

Playnite log:

04-10 09:29:17.856|ERROR|PlayniteApplication:Unhandled exception occured.
System.InvalidCastException: Can not convert a type object 'System.Windows.Media.LinearGradientBrush' to type 'System.Windows.Media.SolidColorBrush'.
   en SystemChecker.Controls.PluginButton.SetDefaultDataContext() en D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\Controls\PluginButton.xaml.cs:línea 91
   en CommonPluginsShared.Controls.PluginUserControlExtend.GameContextChanged(Game oldContext, Game newContext) en D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\playnite-plugincommon\CommonPluginsShared\Controls\PluginUserControlExtend.cs:línea 37
   en CommonPluginsShared.Controls.PluginUserControlExtendBase.PluginSettings_PropertyChanged(Object sender, PropertyChangedEventArgs e) en D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\playnite-plugincommon\CommonPluginsShared\Controls\PluginUserControlExtendBase.cs:línea 105
   en SystemChecker.Controls.PluginButton.<.ctor>b__12_2() en D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\Controls\PluginButton.xaml.cs:línea 83
   en System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   en System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   en System.Windows.Threading.DispatcherOperation.InvokeImpl()
   en System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   en MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   en MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   en System.Windows.Threading.DispatcherOperation.Invoke()
   en System.Windows.Threading.Dispatcher.ProcessQueue()
   en System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   en MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   en MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   en System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   en System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   en System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   en MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   en MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   en System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   en System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   en System.Windows.Application.RunDispatcher(Object ignore)
   en System.Windows.Application.RunInternal(Window window)
   en System.Windows.Application.Run(Window window)
   en Playnite.DesktopApp.ProgramEntry.Main(String[] args) en C:\projects\playnite\source\Playnite.DesktopApp\ProgramEntry.cs:línea 61
Ohkami commented 2 years ago

same thing for me : Systemchecker.zip

joyrider3774 commented 2 years ago

if you got powershell installed could you post output of Get-WmiObject -Query "select * from Win32_VideoController"

joyrider3774 commented 2 years ago

with the test version switch theme's i checked with a user on discord and hellium theme is the cause for still crashing with the test version. My guess is something gets inherited or so in the xaml or something. As soon as the user switched from Hellium (Steam theme) to Classic (default theme) playnite stopped crashing with the test version posted above. So the issue with the wmi objects is fixed but the crashing of playnite is related to using hellium theme and systemchecker at the same time (with the test version)

He was still getting this error with the test version:

19-10 23:58:52.773|ERROR|PlayniteApplication:Unhandled exception occured.
System.InvalidCastException: Nie można rzutować obiektu typu 'System.Windows.Media.LinearGradientBrush' na typ 'System.Windows.Media.SolidColorBrush'.
   w SystemChecker.Controls.PluginButton.SetDefaultDataContext() w D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\Controls\PluginButton.xaml.cs:wiersz 91
   w CommonPluginsShared.Controls.PluginUserControlExtend.GameContextChanged(Game oldContext, Game newContext) w D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\playnite-plugincommon\CommonPluginsShared\Controls\PluginUserControlExtend.cs:wiersz 37
   w CommonPluginsShared.Controls.PluginUserControlExtendBase.PluginSettings_PropertyChanged(Object sender, PropertyChangedEventArgs e) w D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\playnite-plugincommon\CommonPluginsShared\Controls\PluginUserControlExtendBase.cs:wiersz 105
   w SystemChecker.Controls.PluginButton.<.ctor>b__12_2() w D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\Controls\PluginButton.xaml.cs:wiersz 83

and it seems hellium theme and the plugin (button) have some incompatibility with LinearGradientBrush and SolidColorBrush being used in theme / plugin button somehow so you it seems this issue is solved but another incompatibility issue exists with hellium theme

20-10 00:32:19.634|ERROR|PlayniteApplication:Unhandled exception occured.
System.InvalidCastException: Unable to cast object of type 'System.Windows.Media.LinearGradientBrush' to type 'System.Windows.Media.SolidColorBrush'.
   at SystemChecker.Controls.PluginButton.SetDefaultDataContext() in D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\Controls\PluginButton.xaml.cs:line 91
   at CommonPluginsShared.Controls.PluginUserControlExtend.GameContextChanged(Game oldContext, Game newContext) in D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\playnite-plugincommon\CommonPluginsShared\Controls\PluginUserControlExtend.cs:line 37
   at CommonPluginsShared.Controls.PluginUserControlExtendBase.PluginSettings_PropertyChanged(Object sender, PropertyChangedEventArgs e) in D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\playnite-plugincommon\CommonPluginsShared\Controls\PluginUserControlExtendBase.cs:line 105
   at SystemChecker.Controls.PluginButton.<.ctor>b__12_2() in D:\GitHub\Lacro59\playnite-systemchecker-plugin\source\Controls\PluginButton.xaml.cs:line 83
   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)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at Playnite.DesktopApp.ProgramEntry.Main(String[] args) in C:\projects\playnite\source\Playnite.DesktopApp\ProgramEntry.cs:line 61
darklinkpower commented 2 years ago

I used a gradient brush for the standard button style and the extension must not be compatible https://github.com/darklinkpower/Helium/blob/master/source/Constants.xaml#L59-L63

I used the CheckLocalizations plugin button the same way without issues so it might be worth checking why this one works but not the other

https://github.com/darklinkpower/Helium/blob/master/source/Views/DetailsViewGameOverview.xaml#L137-L138 image

joyrider3774 commented 2 years ago

this is the cause of the error :

the plugin expects a SolidColorBrush be used for "GlyphBrush" https://github.com/Lacro59/playnite-systemchecker-plugin/blob/master/source/Controls/PluginButton.xaml.cs#L97

But in Darklink's heme GlypBrush is a lineargradientbrush

https://github.com/darklinkpower/Helium/blob/master/source/Constants.xaml#L202

so the typecast fails

Lacro59 commented 2 years ago

I deleted this variable which is not used ...