PDA

View Full Version : LOD creator CTD


nz255
22 Aug 2009, 23:28
Hi, I am trying to create LOD's for an FSX mdl which is animated, however whenever I import the mdl and click generate LOD and calculate, it fails and comes up with this

Object reference not set to an instance of object.

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 ModelConverterX.ObjectModel.OptimizeSceneGraph()
at ModelConverterX.ObjectModel.CleanUp()
at ModelConverterX.LODFactory.GetLOD(Int32 triangleTarget, Double preserveMaterials, Double preserveMapping, Double groundClamp, Double areaPenalty, Int32 fromLOD, Int32 toLOD)
at ModelConverterX.LODCreator.CalculateLOD()
at ModelConverterX.LODCreator.cmdCalculate_Click(Obje ct 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(MouseEventAr gs 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.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ModelConverterX
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/D%20Backup/Flight%20Sim%20stuff/FSX%20Downloads/Scenery%20Developing/ModelConverterX_100/Model%20Converter%20X.exe
----------------------------------------
ObjectWriter
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/D%20Backup/Flight%20Sim%20stuff/FSX%20Downloads/Scenery%20Developing/ModelConverterX_100/ObjectWriter.DLL
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ObjectModel3D
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/D%20Backup/Flight%20Sim%20stuff/FSX%20Downloads/Scenery%20Developing/ModelConverterX_100/ObjectModel3D.DLL
----------------------------------------
GRV11DLL
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/D%20Backup/Flight%20Sim%20stuff/FSX%20Downloads/Scenery%20Developing/ModelConverterX_100/GRV11DLL.DLL
----------------------------------------
ObjectReader
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/D%20Backup/Flight%20Sim%20stuff/FSX%20Downloads/Scenery%20Developing/ModelConverterX_100/ObjectReader.DLL
----------------------------------------
TextureLoader
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/D%20Backup/Flight%20Sim%20stuff/FSX%20Downloads/Scenery%20Developing/ModelConverterX_100/TextureLoader.DLL
----------------------------------------
ObjectEditor
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/D%20Backup/Flight%20Sim%20stuff/FSX%20Downloads/Scenery%20Developing/ModelConverterX_100/ObjectEditor.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.


How do I set an object reference?

Great tool BTW Arno!

Thanks,

Nick

arno
23 Aug 2009, 03:52
Hi Nick,

Looks like you found a bug. Which object have you loaded? Maybe I can reproduce the error here.

nz255
24 Aug 2009, 00:58
Hi here's the file, just a modified version of one I got from the site.

Nick

arno
24 Aug 2009, 16:10
Hi,

I think I fixed the crash, although I am not sure if functionally the LOD Creator is working fine on this object already (could be due to the animation). It is in the next development release.

nz255
26 Aug 2009, 01:51
Excellent, thanks Arno! :D