nstlaurent / DoomLauncher

Doom Launcher is a doom launching utility and database for custom wads and pk3s
GNU General Public License v3.0
231 stars 20 forks source link

NET framework error (Object reference not set to an instance of an object.) #284

Closed LafelFalafel closed 1 year ago

LafelFalafel commented 1 year ago

I have an issue where doom launcher gives me this error whenever i try to launch it:

image

When I click quit there's another error window:

image Here's that same error in full:

System.NullReferenceException: Object reference not set to an instance of an object.
   at DoomLauncher.MainForm.BuildColumnConfig()
   at DoomLauncher.MainForm.HandleFormClosing()
   at System.Windows.Forms.Form.OnFormClosing(FormClosingEventArgs e)
   at System.Windows.Forms.Form.RaiseFormClosingOnAppExit()
   at System.Windows.Forms.Application.ExitInternal()
   at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
   at System.Windows.Forms.Control.WndProcException(Exception e)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at DoomLauncher.Program.Main(String[] args)

I updated it to version 3.7.0 yesterday and it worked just fine until today when for seemingly no reason it gave me the .NET error. If I click continue doom launcher is empty and if i try to do anything i get the same error again.

image

I tried reinstalling and when that didn't work I uninstalled doom launcher again and the appdata directory and tried to reinstall again but the issue still occurred.

nstlaurent commented 1 year ago

Is this when running the installer? Can you attach your DoomLauncher.sqlite file. What doesn't make sense about this is that the call stack is showing that the app is in the process of being closed. Once I get the file I will take a look.

LafelFalafel commented 1 year ago

It happens both when using the installer and extracting the archive. Here's my SQlite file: https://drive.google.com/file/d/1dZlMA7BWBw-Se2foUvphYgT291YfRSaE/view?usp=sharing

nstlaurent commented 1 year ago

Can you run this debug build and send me the errors? It will still give an error but it includes more information as to why Doom Launcher is crashing. https://www.dropbox.com/scl/fi/68ehtmpqg4vj6nwsxhjc6/DoomLauncher_3.7.0.0_debug.zip?rlkey=r5dh12e9099kt0fgr1xu8j9iy&dl=0

Multiple users have reported this issue. So far I haven't been able to reproduce it on multiple computers. Your help is very much appreciated.

LafelFalafel commented 1 year ago

Well this is weird image

LafelFalafel commented 1 year ago

Forgot to post the first error:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: Input string was not in a correct format.
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Convert.ToDouble(String value)
   at DoomLauncher.AppConfiguration.Refresh(Boolean throwErrors) in C:\Users\stlau\Documents\GitHub\DoomLauncher\DoomLauncher\Config\AppConfiguration.cs:line 171
   at DoomLauncher.AppConfiguration.Refresh() in C:\Users\stlau\Documents\GitHub\DoomLauncher\DoomLauncher\Config\AppConfiguration.cs:line 46
   at DoomLauncher.MainForm.DisplayInitSettings() in C:\Users\stlau\Documents\GitHub\DoomLauncher\DoomLauncher\Forms\MainForm_Init.cs:line 519
   at DoomLauncher.MainForm.<CheckFirstInit>d__40.MoveNext() in C:\Users\stlau\Documents\GitHub\DoomLauncher\DoomLauncher\Forms\MainForm_Init.cs:line 504
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at DoomLauncher.MainForm.<Init>d__161.MoveNext() in C:\Users\stlau\Documents\GitHub\DoomLauncher\DoomLauncher\Forms\MainForm.cs:line 112
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at DoomLauncher.Program.<Form_Load>d__1.MoveNext() in C:\Users\stlau\Documents\GitHub\DoomLauncher\DoomLauncher\Program.cs:line 42
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9167.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
DoomLauncher
    Assembly Version: 3.7.1.0
    Win32 Version: 3.7.1.0
    CodeBase: file:///C:/Users/Lafel/Downloads/DoomLauncher/DoomLauncher.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9075.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9172.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9032.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9032.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9166.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
nstlaurent commented 1 year ago

That's not right. Getting closer though. Can you try this one please? https://www.dropbox.com/scl/fi/ybdh83vzaidcuz8tw8okv/DoomLauncher_3.7.0.0_debug_2.zip?rlkey=26xtz6jy8dgon09c5fmtbk0av&dl=0

LafelFalafel commented 1 year ago

This time it gives only one error and just crashes:

   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Convert.ToDouble(String value)
   at DoomLauncher.AppConfiguration.Refresh(Boolean throwErrors) in C:\Users\stlau\Documents\GitHub\DoomLauncher\DoomLauncher\Config\AppConfiguration.cs:line 117
   at DoomLauncher.AppConfiguration..ctor(IDataSourceAdapter adapter) in C:\Users\stlau\Documents\GitHub\DoomLauncher\DoomLauncher\Config\AppConfiguration.cs:line 41
   at DoomLauncher.DataCache.Init(IDataSourceAdapter adapter) in C:\Users\stlau\Documents\GitHub\DoomLauncher\DoomLauncher\Config\DataCache.cs:line 31
   at DoomLauncher.ProgramInit.Init() in C:\Users\stlau\Documents\GitHub\DoomLauncher\DoomLauncher\Program.Init.cs:line 25
   at DoomLauncher.Program.Main(String[] args) in C:\Users\stlau\Documents\GitHub\DoomLauncher\DoomLauncher\Program.cs:line 26
nstlaurent commented 1 year ago

Perfect thank you. It just dawned on me what the problem likely is. Is your Windows set to a localization that where your decimal numbers are in the format of 12,23 instead of 12.23?

nstlaurent commented 1 year ago

This one should do it: https://www.dropbox.com/scl/fi/z0gj5nyzghwefljsuio30/DoomLauncher_3.7.0.0_debug_3.zip?rlkey=bf0kpsrbgqavkgorghj1ls5qd&dl=0

LafelFalafel commented 1 year ago

That was the issue, the build you sent works just fine. Thank you very much.

nstlaurent commented 1 year ago

Just pushed the official release for this fix. Thank you very much for the help. Was driving me crazy since I couldn't reproduce it on my computers.

https://github.com/nstlaurent/DoomLauncher/releases/tag/3.7.1