Jeshibu / Playnite-OculusLibrary

Plugin for Playnite to allow Oculus game import
3 stars 1 forks source link

Consistent Crash on save settings #8

Closed DanDoes closed 2 weeks ago

DanDoes commented 2 weeks ago

(v2.6)

First crash happened after I tried setting up the add-on for the first time, by opening the settings, checking all the "Import" boxes, authenticating (successfully), and then when I clicked save, crash.

Now, just clicking save causes the crash: image

(maybe just clicking save would have crashed it the first time too, or maybe it's just stuck in some bad state now, not sure)

Jeshibu commented 2 weeks ago

Oof, that's bad, sorry. I don't recall what format the "Save log file" takes, but could you send me either that (not just the string of letters and numbers if it tells you to share that) or playnite.log from main menu > About Playnite > User data directory - preferably from right after triggering the error.

DanDoes commented 2 weeks ago

Save log file saves a zip file with the following contents: image

I searched for "oculus" in extensions.log and found this section:

12-09 10:07:03.726|INFO |OculusLibrary#OculusLibraryPlugin:GetGames 12-09 10:07:03.726|INFO |OculusLibrary#OculusLibraryPlugin:Online games fetching passed 12-09 10:07:03.726|INFO |OculusLibrary#OculusLibraryPlugin:Executing OculusManifestScraper.GetGames 12-09 10:07:03.726|INFO |OculusLibrary#OculusLibraryPlugin:Executing OculusManifestScraper.GetManifests 12-09 10:07:03.726|DEBUG|OculusLibrary#OculusLibraryPlugin:Trying to get Oculus base path (REG64) 12-09 10:07:03.726|DEBUG|OculusLibrary#OculusLibraryPlugin:Getting Oculus library locations from registry (Registry64) 12-09 10:07:03.741|DEBUG|OculusLibrary#OculusLibraryPlugin:GetSubKeysForPath: platform: Registry64, hive: CurrentUser, path: Software\Oculus VR, LLC\Oculus\Libraries\, output: [REDACTED-1] 12-09 10:07:03.741|DEBUG|OculusLibrary#OculusLibraryPlugin:GetValueForPath: platform: Registry64, hive: CurrentUser, path: Software\Oculus VR, LLC\Oculus\Libraries[REDACTED-1], keyName: Path, output: \?\Volume{[REDACTED-2]}\Program Files\Oculus\Software 12-09 10:07:03.914|DEBUG|OculusLibrary#OculusLibraryPlugin:Found library: C:\Program Files\Oculus\Software 12-09 10:07:03.914|DEBUG|OculusLibrary#OculusLibraryPlugin:Libraries located: 1 12-09 10:07:03.914|DEBUG|OculusLibrary#OculusLibraryPlugin:Trying to get Oculus install path (REG64) 12-09 10:07:03.914|ERROR|OculusLibrary#OculusLibraryPlugin:Exception opening registry key: System.NullReferenceException: Object reference not set to an instance of an object. at OculusLibrary.OS.RegistryValueProvider.GetValueForPath(RegistryView platform, RegistryHive hive, String path, String keyName) in D:\a\Playnite-OculusLibrary\Playnite-OculusLibrary\OculusLibrary\OS\RegistryValueProvider.cs:line 34 at OculusLibrary.DataExtraction.OculusPathSniffer.GetOculusSoftwareInstallationPath(RegistryView platformView) in D:\a\Playnite-OculusLibrary\Playnite-OculusLibrary\OculusLibrary\DataExtraction\OculusPathSniffer.cs:line 93 12-09 10:07:03.914|DEBUG|OculusLibrary#OculusLibraryPlugin:Trying to get Oculus install path (REG32) 12-09 10:07:03.914|ERROR|OculusLibrary#OculusLibraryPlugin:Exception opening registry key: System.NullReferenceException: Object reference not set to an instance of an object. at OculusLibrary.OS.RegistryValueProvider.GetValueForPath(RegistryView platform, RegistryHive hive, String path, String keyName) in D:\a\Playnite-OculusLibrary\Playnite-OculusLibrary\OculusLibrary\OS\RegistryValueProvider.cs:line 34 at OculusLibrary.DataExtraction.OculusPathSniffer.GetOculusSoftwareInstallationPath(RegistryView platformView) in D:\a\Playnite-OculusLibrary\Playnite-OculusLibrary\OculusLibrary\DataExtraction\OculusPathSniffer.cs:line 93 12-09 10:07:03.914|ERROR|OculusLibrary#OculusLibraryPlugin:Cannot ascertain Oculus library/installation locations

And in playnite.log, this seems relevant:

12-09 23:14:17.854|ERROR|ExtensionFactory:Failed to execute OnApplicationStopped method from Meta Quest Library Importer plugin. System.IO.FileNotFoundException: Could not load file or assembly 'YamlDotNet, Version=16.0.0.0, Culture=neutral, PublicKeyToken=[REDACTED-3]' or one of its dependencies. The system cannot find the file specified. File name: 'YamlDotNet, Version=16.0.0.0, Culture=neutral, PublicKeyToken=[REDACTED-3]' at OculusLibrary.OculusLibraryPlugin.UpdateYaml(OculusLibrarySettings settings, ILogger logger) at OculusLibrary.OculusLibraryPlugin.OnApplicationStopped(OnApplicationStoppedEventArgs args) in D:\a\Playnite-OculusLibrary\Playnite-OculusLibrary\OculusLibrary\OculusLibraryPlugin.cs:line 178 at Playnite.Plugins.ExtensionFactory.NotifiyOnApplicationStopped() in C:\projects\playnite\source\Playnite\Plugins\ExtensionFactory.cs:line 783

Along with this longer chunk: (same file)

12-09 23:15:56.694|ERROR|PlayniteApplication:Unhandled exception occured. System.IO.FileNotFoundException: Could not load file or assembly 'YamlDotNet, Version=16.0.0.0, Culture=neutral, PublicKeyToken=[REDACTED-3]' or one of its dependencies. The system cannot find the file specified. File name: 'YamlDotNet, Version=16.0.0.0, Culture=neutral, PublicKeyToken=[REDACTED-3]' at OculusLibrary.OculusLibraryPlugin.UpdateYaml(OculusLibrarySettings settings, ILogger logger) at OculusLibrary.OculusLibrarySettingsViewModel.EndEdit() in D:\a\Playnite-OculusLibrary\Playnite-OculusLibrary\OculusLibrary\OculusLibrarySettings.cs:line 203 at Playnite.DesktopApp.ViewModels.AddonsViewModel.ConfirmDialog() in C:\projects\playnite\source\Playnite.DesktopApp\ViewModels\AddonsViewModel.cs:line 405 at Playnite.DesktopApp.ViewModels.AddonsViewModel.b44_0(Object a) in C:\projects\playnite\source\Playnite.DesktopApp\ViewModels\AddonsViewModel.cs:line 141 at Playnite.SDK.RelayCommand`1.Execute(Object parameter) in C:\projects\playnite\source\PlayniteSDK\RelayCommand.cs:line 205 at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Button.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(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.Window.ShowHelper(Object booleanBox) at System.Windows.Window.Show() at System.Windows.Window.ShowDialog() at Playnite.Windows.WindowFactory.<>c__DisplayClass16_0.b0(Object a) in C:\projects\playnite\source\Playnite\Windows\WindowFactory.cs:line 82 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 System.Windows.Threading.DispatcherSynchronizationContext.Send(SendOrPostCallback d, Object state) at Playnite.Windows.WindowFactory.CreateAndOpenDialog(Object dataContext) in C:\projects\playnite\source\Playnite\Windows\WindowFactory.cs:line 57 at Playnite.DesktopApp.ViewModels.DesktopAppViewModel.b__323_48(Object a) in C:\projects\playnite\source\Playnite.DesktopApp\ViewModels\DesktopAppViewModel_Commands.cs:line 351 at Playnite.SDK.RelayCommand`1.Execute(Object parameter) in C:\projects\playnite\source\PlayniteSDK\RelayCommand.cs:line 205 at System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs) at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e) at System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey) at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled) at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers) at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param) 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 System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg) at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled) at System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage(MSG& msg, Boolean& handled) at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(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 71

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

12-09 23:15:56.730|DEBUG|WindowFactory:Show dialog window Playnite.Windows.ExtensionCrashHandlerWindowFactory: [REDACTED-4]

Note: Idk what's unsafe to share so I "redacted" all the long numbers above lol. I assigned unique IDs though in case you need to compare.

Jeshibu commented 2 weeks ago

Thanks! YamlDotNet, a bundled library, isn't loading. That gives me a hunch of what's going on: some other extension is using the same library, but a different version. I'll likely have to downgrade the library version to match what's already out there, since .NET Framework can't load two versions of the same named DLL. I could go through all of them, but could you list your installed extensions (disregarding themes)?

Jeshibu commented 2 weeks ago

YamlDotNet is removed as of 2.6.1, which fixes this. Thanks for reporting it!

DanDoes commented 2 weeks ago

Amazing, thanks for resolving this so quickly! Confirmed it works for me now in 2.6.1.

Btw for your reference, I don't have the "Metadata Local" plugin you mentioned in your commit ¯\_(ツ)_/¯ Here's all the non-theme extensions I have: image image image