1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

LOD creator CTD

Discussion in 'ModelConverterX' started by nz255, 23/8/09.

  1. nz255

    nz255

    Joined:
    23/9/08
    Messages:
    195
    Country:
    newzealand
    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.

    Code:
    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(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: 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
  2. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,354
    Country:
    netherlands
    Hi Nick,

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

    nz255

    Joined:
    23/9/08
    Messages:
    195
    Country:
    newzealand
    Hi here's the file, just a modified version of one I got from the site.

    Nick

    Attached Files:

  4. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,354
    Country:
    netherlands
    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.
  5. nz255

    nz255

    Joined:
    23/9/08
    Messages:
    195
    Country:
    newzealand
    Excellent, thanks Arno! :D

Share This Page