mikiher / audiobookshelf-windows

Installs and manages Audiobookshelf on Windows
72 stars 1 forks source link

AudiobookshelfTray.exe Crashes After Recent Updates #30

Closed m1nuzz closed 1 day ago

m1nuzz commented 3 days ago

Description:

After the recent updates, AudiobookshelfTray.exe stopped working. In Event Viewer, I observe two errors when launching the application:

First Error:

Application: AudiobookshelfTray.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Xml.XmlException
   at System.Xml.XmlTextReaderImpl.Throw(System.Exception)
   at System.Xml.XmlTextReaderImpl.ParseText(Int32 ByRef, Int32 ByRef, Int32 ByRef)
   at System.Xml.XmlTextReaderImpl.ParseText()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlTextReaderImpl.Skip()
   at System.Configuration.XmlUtil.StrictSkipToNextElement(System.Configuration.ExceptionAction)
   at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(System.Configuration.XmlUtil, System.String, Boolean, System.String, System.Configuration.OverrideModeSetting, Boolean)
   at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(System.Configuration.XmlUtil, System.String, Boolean, System.String, System.Configuration.OverrideModeSetting, Boolean)
   at System.Configuration.BaseConfigurationRecord.ScanSections(System.Configuration.XmlUtil)
   at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()

Exception Info: System.Configuration.ConfigurationErrorsException
   at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean)
   at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(System.Configuration.ConfigurationSchemaErrors)
   at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(System.Object, System.Configuration.Internal.InternalConfigEventArgs)

Exception Info: System.Configuration.ConfigurationErrorsException
   at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(System.Object, System.Configuration.Internal.InternalConfigEventArgs)
   at System.Configuration.Internal.InternalConfigRoot.OnConfigRemoved(System.Configuration.Internal.InternalConfigEventArgs)
   at System.Configuration.Internal.InternalConfigRoot.RemoveConfigImpl(System.String, System.Configuration.BaseConfigurationRecord)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(System.String, Boolean, Boolean, Boolean, Boolean, System.Object ByRef, System.Object ByRef)
   at System.Configuration.BaseConfigurationRecord.GetSection(System.String)
   at System.Configuration.ConfigurationManager.GetSection(System.String)
   at System.Configuration.ClientSettingsStore.ReadSettings(System.String, Boolean)
   at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(System.Configuration.SettingsContext, System.Configuration.SettingsPropertyCollection)
   at System.Configuration.SettingsBase.GetPropertiesFromProvider(System.Configuration.SettingsProvider)
   at System.Configuration.SettingsBase.GetPropertyValueByName(System.String)
   at System.Configuration.SettingsBase.get_Item(System.String)
   at System.Configuration.ApplicationSettingsBase.GetPropertyValue(System.String)
   at System.Configuration.ApplicationSettingsBase.get_Item(System.String)
   at AudiobookshelfTray.Properties.Settings.get_AppVersion()
   at AudiobookshelfTray.AppTray.GetAppVersion()
   at AudiobookshelfTray.AppTray..ctor()
   at AudiobookshelfTray.Program.Main()

Second Error:

Faulting application name: AudiobookshelfTray.exe, version: 1.0.0.0, time stamp: 0xb1e5cbab
Faulting module name: KERNELBASE.dll, version: 10.0.26100.2161, time stamp: 0x31da495c
Exception code: 0xe0434352
Fault offset: 0x00000000000c831a
Faulting process id: 0x1080
Faulting application start time: 0x1DB3A93EC908BC2
Faulting application path: C:\Users\m1nus\AppData\Local\Programs\Audiobookshelf\AudiobookshelfTray.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 6bcd06f0-6c7f-481e-984a-94af4cf27c6e
Faulting package full name: 
Faulting package-relative application ID:
mikiher commented 3 days ago
  1. Which Windows app version do you have installed?
  2. In the directory %localappdata%\AudiobookshelfTray, is there a folder called AudiobookshelfTray.exe_<some_long_identifier>? If so, does this folder have a subfolder called 1.0.0.0, and does that subfolder contain a file called user.config? Can you please attach this file here?
  3. Can you please also attach the file %localappdata%\AudiobookshelfTray\logfile.txt?
m1nuzz commented 3 days ago
  1. Which Windows app version do you have installed?
  2. In the directory %localappdata%\AudiobookshelfTray, is there a folder called AudiobookshelfTray.exe_<some_long_identifier>? If so, does this folder have a subfolder called 1.0.0.0, and does that subfolder contain a file called user.config? Can you please attach this file here?
  3. Can you please also attach the file %localappdata%\AudiobookshelfTray\logfile.txt?

latest build v2.17.1

AudiobookshelfTray.zip

mikiher commented 3 days ago

OK, that is very odd. Your user.config file is corrupt (it's clipped), and also not up-to-date. Can you please remove the directory AudiobookshelfTray.exe_<some_long_identifier>, and try to run the app again?

m1nuzz commented 3 days ago

OK, that is very odd. Your user.config file is corrupt (it's clipped), and also not up-to-date. Can you please remove the directory AudiobookshelfTray.exe_<some_long_identifier>, and try to run the app again?

user.zip

mikiher commented 3 days ago

The file seems OK now. Is the app still crashing?

m1nuzz commented 2 days ago

The file seems OK now. Is the app still crashing?

After I deleted: AudiobookshelfTray.exe_<some_long_identifier the application launched without errors. Six months ago, when I first installed the app, it was located in the default installation path AppData\Local\Audiobookshelf, but after some patch, the program updated itself and was installed in AppData\Local\Programs\Audiobookshelf, which might have caused the errors.

I also had to restore the settings. I moved the metadata and config folders from AppData\Local\Audiobookshelf to AppData\Local\Programs\Audiobookshelf to get the settings back.

mikiher commented 2 days ago

So, the installer has not changed in 10 months, and I don't believe that the default installation directory ever changed since I first released this - it was always %localappdata%\Programs\Audiobookshelf.

Also the default data directory has always been %localappdata%\Audiobookshelf

So I'm not sure how it happened that the program executables were ever located in %localappdata\Audiobookshelf, unless you changed the default value during installation.

In any case, this doesn't seem related since up until very recently (11/07, according to the log you sent), everything was working well, so it doesn't seem reasonable that something which happened six months ago has any effect on a recent crash.

I'm not sure what could have caused the user.config to become corrupt in this way. I have never seen or got a complaint about something like this happening. I'll try to see if I can prevent the app from crashing if it becomes corrupt for whatever reason.

I'm happy that was at least able to suggest a workaround. Thanks for reporting!

m1nuzz commented 1 day ago

Issue resolved after following the suggested workaround. Closing, thanks!