Tank Exporter

Tank Exporter

1.1k Downloads

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application with close immediately

shanstac opened this issue · 2 comments

commented

After downloading TankExporter-Master.zip and unziping the file I run TankExporter_139.msi to install the program. After installation finishes I try to run !_Tank Exporter.exe. Shortly after running the program I get a Microsoft.NET Framework popup stating |

"Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application with close immediately

Object reference not set to an instace of an object."

When I check out the details of the error message I see the following

"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 Tank_Exporter.frmMain.store_in_treeview(Int32 i, TreeView& tn)
at Tank_Exporter.frmMain.load_tabs()
at Tank_Exporter.frmMain.frmMain_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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.8.9241.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

!Tank Exporter
Assembly Version: 1.0.0.139
Win32 Version: 1.0.0.139
CodeBase: file:///C:/Program%20Files%20(x86)/Coffee
/Tank%20Exporter/!_Tank%20Exporter.exe

Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 14.8.9037.0 built by: NET481REL1
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.8.9236.0 built by: NET481REL1LAST_B
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.8.9241.0 built by: NET481REL1LAST_C
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.8.9181.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.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9037.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.9037.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.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9037.0 built by: NET481REL1
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.8.9214.0 built by: NET481REL1LAST_B
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll

SharpDX.Mathematics
Assembly Version: 4.2.0.0
Win32 Version: 4.2.0
CodeBase: file:///C:/Program%20Files%20(x86)/Coffee_/Tank%20Exporter/SharpDX.Mathematics.DLL

Ionic.Zip
Assembly Version: 1.9.1.8
Win32 Version: 1.9.1.8
CodeBase: file:///C:/Program%20Files%20(x86)/Coffee_/Tank%20Exporter/Ionic.Zip.DLL

System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9214.0 built by: NET481REL1LAST_B
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

FbxSDK
Assembly Version: 1.0.4593.24947
Win32 Version:
CodeBase: file:///C:/Program%20Files%20(x86)/Coffee_/Tank%20Exporter/FbxSDK.DLL

cttools
Assembly Version: 1.0.4723.22902
Win32 Version:
CodeBase: file:///C:/Program%20Files%20(x86)/Coffee_/Tank%20Exporter/cttools.DLL

msvcm90
Assembly Version: 9.0.30729.9625
Win32 Version: 9.00.30729.9625
CodeBase: file:///C:/Windows/WinSxS/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9625_none_508ef7e4bcbbe589/msvcm90.dll

Tao.DevIl
Assembly Version: 1.6.8.3
Win32 Version: 1.6.8.3
CodeBase: file:///C:/Program%20Files%20(x86)/Coffee_/Tank%20Exporter/Tao.DevIl.DLL

Tao.OpenGl
Assembly Version: 2.1.0.12
Win32 Version: 2.1.0.12
CodeBase: file:///C:/Program%20Files%20(x86)/Coffee_/Tank%20Exporter/Tao.OpenGl.DLL

Tao.Platform.Windows
Assembly Version: 1.0.0.5
Win32 Version: 1.0.0.5
CodeBase: file:///C:/Program%20Files%20(x86)/Coffee_/Tank%20Exporter/Tao.Platform.Windows.DLL

Tao.FreeGlut
Assembly Version: 2.4.0.2
Win32 Version: 2.4.0.2
CodeBase: file:///C:/Program%20Files%20(x86)/Coffee_/Tank%20Exporter/Tao.FreeGlut.DLL

System.Xml.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9037.0 built by: NET481REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll

System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9037.0 built by: NET481REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll

System.Data.DataSetExtensions
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9037.0 built by: NET481REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.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:

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.

In attempts to fix the issue, I have used both Notepad and Notepad++ to edit both !_Tank Exporter.exe.config and machine.config files. After adding the <system.windows.forms jitDebugging="true"/> to !_Tank Exporter.exe.config file, TankExporter no longer runs. When I add the same command to machine.config file and try to run TankExporter I am once again faced with the same Microsoft.NET Framework popup. I don't know what else to try to resolve this error message.

I even tried running the error message through Chatgpt and I get the following as a response:

"The error you're encountering is a System.NullReferenceException, which means the application is trying to use an object reference that is not set to an instance of an object. This usually happens when the code tries to access a member on an object that is null.

Troubleshooting Steps

  1. Identify the Code Issue:
    The exception message points to the store_in_treeview method in the Tank_Exporter.frmMain class. This method likely tries to access a TreeView object that hasn't been properly instantiated or initialized.

  2. Check for Null References:
    Review the store_in_treeview method and ensure all objects it uses are properly instantiated. For example, ensure the TreeView object tn is not null.

  3. Debugging:
    If you have access to the source code and development environment, add debugging statements or breakpoints to check the state of objects before they are used.

  4. Exception Handling:
    Implement proper exception handling to catch potential null references and provide meaningful error messages or fallback logic.

Example Fix

Here's an example of how you might modify the store_in_treeview method to check for null references:

private void store_in_treeview(int i, TreeView tn)
{
    if (tn == null)
    {
        MessageBox.Show("TreeView object is null.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        return;
    }
    
    // Existing logic to store data in TreeView
    // Ensure all objects used within this method are properly checked and instantiated
}

Enable JIT Debugging

To enable Just-In-Time (JIT) debugging, you can modify your application configuration file (app.config or machine.config). Here's how you can do it:

  1. Open the Config File:
    Locate and open the application's app.config file. If it doesn't exist, create one.

  2. Add JIT Debugging Configuration:
    Add the following section to enable JIT debugging:

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
  3. Compile with Debugging Enabled:
    Ensure the application is compiled with debugging information. This typically involves setting the build configuration to Debug instead of Release.

Check Dependencies

Make sure all dependencies required by your application are present and correctly referenced. This includes:

  • Ensuring all necessary DLL files are in the correct location.
  • Checking that any external libraries or frameworks are properly installed and referenced in your project.

Update .NET Framework

Sometimes, updating the .NET Framework to the latest version can resolve unexpected issues. Ensure your application and development environment are up to date with the latest patches and updates.

If you need more specific help or if you can provide more details about the store_in_treeview method and how the TreeView object is instantiated, I can offer more targeted advice."

Hopefully whomever sees this will be able to make sense out of it and be able to explain it better maybe even explain how and where to find the "Tank_Exporter.frmMain" and "store_in_treeview".

Please help if anyone can understand this.

commented

There are 3 "gui_part" in version 1.25. This is the reason why T.E crashes. The solution is in discussion "Object reference not set to an instance of an object" #110"

commented

Thank you Cerberus50.