[Fixed] Rat Crash while saving

Nesscafe

New member
Oct 20, 2017
1
0
0
39
Hey guys ive just started using RAT but everytime i try and save my settings i get this error.

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

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at RAT.frmMain.ServerSave(Boolean displayConfirmation)
at RAT.frmMain.btnServerSave_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2115.0 built by: NET47REL1LAST
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
7D2DRAT
Assembly Version: 1.0.0.0
Win32 Version: 0.1.12.8
CodeBase: file:///C:/Program%20Files%20(x86)/NomadSoft/7D2DRAT/7D2DRAT.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 14.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2110.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2110.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0 built by: NET47REL1
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.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2114.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Data.SqlServerCe
Assembly Version: 4.0.0.1
Win32 Version: 4.0.8876.1
CodeBase: file:///C:/Program%20Files%20(x86)/NomadSoft/7D2DRAT/System.Data.SqlServerCe.DLL
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
Discord.Net.Core
Assembly Version: 1.0.1.0
Win32 Version: 1.0.1.0
CodeBase: file:///C:/Program%20Files%20(x86)/NomadSoft/7D2DRAT/Discord.Net.Core.DLL
----------------------------------------
Discord.Net.WebSocket
Assembly Version: 1.0.1.0
Win32 Version: 1.0.1.0
CodeBase: file:///C:/Program%20Files%20(x86)/NomadSoft/7D2DRAT/Discord.Net.WebSocket.DLL
----------------------------------------
Discord.Net.Rest
Assembly Version: 1.0.1.0
Win32 Version: 1.0.1.0
CodeBase: file:///C:/Program%20Files%20(x86)/NomadSoft/7D2DRAT/Discord.Net.Rest.DLL
----------------------------------------
System.Collections.Immutable
Assembly Version: 1.2.1.0
Win32 Version: 4.6.24816.01
CodeBase: file:///C:/Program%20Files%20(x86)/NomadSoft/7D2DRAT/System.Collections.Immutable.DLL
----------------------------------------
System.Runtime
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.dll
----------------------------------------
System.Net.Http
Assembly Version: 4.1.1.1
Win32 Version: 4.6.25220.01
CodeBase: file:///C:/Program%20Files%20(x86)/NomadSoft/7D2DRAT/System.Net.Http.DLL
----------------------------------------
System.EnterpriseServices
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
Discord.Net.Providers.WS4Net
Assembly Version: 1.0.1.0
Win32 Version: 1.0.1.0
CodeBase: file:///C:/Program%20Files%20(x86)/NomadSoft/7D2DRAT/Discord.Net.Providers.WS4Net.DLL
----------------------------------------
Discord.Net.Providers.UDPClient
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/NomadSoft/7D2DRAT/Discord.Net.Providers.UDPClient.DLL
----------------------------------------
Newtonsoft.Json
Assembly Version: 10.0.0.0
Win32 Version: 10.0.3.21018
CodeBase: file:///C:/Program%20Files%20(x86)/NomadSoft/7D2DRAT/Newtonsoft.Json.DLL
----------------------------------------
System.Interactive.Async
Assembly Version: 3.0.3000.0
Win32 Version: 3.1.1.0
CodeBase: file:///C:/Program%20Files%20(x86)/NomadSoft/7D2DRAT/System.Interactive.Async.DLL
----------------------------------------
System.Collections
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Collections/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Collections.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 
The Rat dont crash, but it wont save the new settings and after a restart we have to reimport or reconfigure the rat. so if we use the scheduler, the rat starts the server with the standard settings. and thats a big problem for us.

here is our rat log: View: https://pastebin.com/GZBd9Zb2

I actually saw this yesterday helping someone else out. Thanks for the log!

The easiest way for you to fix it right now is to:

Close RAT
Delete your RAT database (%appdata%\Roaming\Nomadsoft\7d2dusa.sdf)
Start Rat (it'll generate a clean DB file)

Then you have to reconfigure RAT, but it'll be fixed. I'm not sure of the root cause yet, but your error messages above might help, thanks!
 
It was a clean os install with new rat install. so no database was befor their.
I did the manual delete and after some settings i get the same error: View: https://pastebin.com/V4LHyuLC

Ok, I'll see if I can replicate this locally. I can see what the error is, just not what field is causing the error. So... it'll take some time for me to trial and error my way through it.
 
Please excuse me for the reply. I have also tested further. It is not the path for the savegame, but it is the telnet port. This must not have more than 4 characters, otherwise the above error.

Thank for this, I've fixed the issue. BTW, you can use 5 characters, it just has to be below 32767. The fixed version won't care, up to 6 characters (which I think ports can only be 5 anyway, but 6 to be sure). So for now, if possible, set your port below 32767 and you'll be good to go. Thanks again!
 
  • Like
Reactions: Markezzz