• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX Model Converterx error

Messages
24
Country
brazil
Hi
Sorry my English. I am Studant
When I try to open the Model Converter x displays the following error mensagen:
Unhandied exception has occured in your application. If you click Continue the application will ignore thir error and attempt to continue. If you click Quit the application will close immediately.
Object reference not set to an instance of an 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 CSGL12.GL.glCreateShader(Int32 itype)
at ASToFra.ObjectRenderer.ShaderProgram.InitializeVertexShader()
at ASToFra.ObjectRenderer.ShaderProgram..ctor(GL gl)
at ASToFra.ObjectRenderer.Renderer3DHandlerType.InitializeShaders()
at ASToFra.ObjectRenderer.Renderer3DHandlerType.OpenGLStarted(CSGL12Control grControl)
at CSGL12.CSGL12Control.DelegateOpenGLStarted.Invoke(CSGL12Control sender)
at CSGL12.CSGL12Control.InvokeOpenGLStarted()
at CSGL12.CSGL12Control.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.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.0.30319.34209 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
ModelConverterX
Assembly Version: 1.0.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/ModelConverterX.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
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.0.30319.34209 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
ASToFra.ModelConverterX
Assembly Version: 1.0.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/ASToFra.ModelConverterX.DLL
----------------------------------------
ASToFra.Interfaces
Assembly Version: 1.0.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/ASToFra.Interfaces.DLL
----------------------------------------
ASToFra.ObjectModel3D
Assembly Version: 1.0.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/ASToFra.ObjectModel3D.DLL
----------------------------------------
ASToFra.Utils
Assembly Version: 1.0.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/ASToFra.Utils.DLL
----------------------------------------
ASToFra.ObjectReader
Assembly Version: 1.0.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/ASToFra.ObjectReader.DLL
----------------------------------------
ASToFra.ObjectWriter
Assembly Version: 1.0.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/ASToFra.ObjectWriter.DLL
----------------------------------------
ASToFra.EventLog
Assembly Version: 1.0.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/ASToFra.EventLog.DLL
----------------------------------------
ASToFra.ObjectRenderer
Assembly Version: 1.0.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/ASToFra.ObjectRenderer.DLL
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
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.0.30319.34234 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
CSGL12DLL
Assembly Version: 12.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/CSGL12DLL.DLL
----------------------------------------
ASToFra.ParticleEffects
Assembly Version: 1.0.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/ASToFra.ParticleEffects.DLL
----------------------------------------
ASToFra.TextureObject
Assembly Version: 1.0.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/Users/Carlos/Desktop/ModelConverterX/ASToFra.TextureObject.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 configuration of my PC: Notebook Dell Inspiron 1545, Windows 7 Start 32 bits Service Pack 1 , Intel Core 2 Duo Netframwork Version 4.5.2.
I ask help to all of forum.
Thanks
 
The errors mention a Shader. I'm guessing that your laptop does not have the video capability needed for MCX. You can try downloading and installing the Stable Version (1.3) and see if that runs on your computer.
 
Looks like an opengl error indeed. What kind of graphics card do you have and does it support opengl 2.0?
 
Hi Arno
Sorry for being slow to respond.
After updating the drives of my graphic card the MCX opened not problem.

when trying to import object for the fsx MCX presented the following error

18:41 BGLCommp Information Parsing document: Hangar01.xml
18:41 BGLCommp Information INTERNAL COMPILER ERROR: #C2014: Failed to load model data in file: C:\Hangar01\scenery\Hangar01_0.mdl
18:41 BGLCommp Information INTERNAL COMPILER ERROR: #C2149: Failed to load model data! Does the file exist?
18:41 BGLCommp Information INTERNAL COMPILER ERROR: #C2340: Failed to finalize MODEL_DATA!
18:41 BGLCommp Information INTERNAL COMPILER ERROR: #C2032: XML Parse Error! Element tree follows:
18:41 BGLCommp Information ERROR: <FSData
18:41 BGLCommp Information ERROR: version = 9.0
18:41 BGLCommp Information ERROR: >
18:41 BGLCommp Information ERROR: <ModelData
18:41 BGLCommp Information ERROR: sourceFile = C:\Hangar01\scenery\Hangar01_0.mdl
18:41 BGLCommp Information ERROR: >
18:41 BGLCommp Information ERROR:
18:41 BGLCommp Information INTERNAL COMPILER ERROR: #C2024: Failed to process closing element tag <ModelData> near line 4!
18:41 BGLCommp Information INTERNAL COMPILER ERROR: #C2607: Compilation errors detected, compilation failed!
18:41 BGLCommp Information Parse complete!
18:41 BGLXWriter Information Finished writing of file C:\Hangar01\scenery\Hangar01.bgl


Thanks for helping me
 
Hi,

This seems to be while exporting. Some mdl files are not found. Normally these should be saved by MCX. So check earlier in the log if there is an error there as well.
 
Hi @arno
I'm having this issue as well. Can you please help me? It's from Sketchup to MCX. I'm using MCX 1.3.0.0

An error occured during importing the selected file

Message:
Object reference not set to an instance of an object.

StackTrace:
at COLLADA.Document.Mesh..ctor(Document doc, XmlNode node)
at COLLADA.Document.Geometry..ctor(Document doc, XmlNode node)
at COLLADA.Document..ctor(String name)
at ASToFra.ObjectReader.DAEReader.Read(String filename)
at ASToFra.ObjectReader.KMZReader.ReadDAEFile(String filename, String name)
at ASToFra.ObjectReader.KMZReader.ParseKML(String f, String ns, String name)
at ASToFra.ObjectReader.KMZReader.Read(String filename)
at ASToFra.ObjectReader.AllObjectReader.Read(String fileName)
at ASToFra.ModelConverterX.MainWindow.bwImporter_DoWork(Object sender, DoWorkEventArgs e)


What does this dialog say about the error to place this item in MCX?

Thank you.
 
Hi,

Since version 1.3 is quite old, can you first try the recent development release?
 
@arno
issueSCREEN2.PNG
issueSCREEN1.PNG

this is the version I have this import working on. It hangs and it never proceeds. I'm importing in KMZ. It does the same with DAE as well. What can this be? is it a texture issue?

eventLOG:
1:14 PM KMZReader Information Starting reading of file C:\Users\francis\Documents\OUTPUT folder\mdsdTERMINAL.kmz
1:15 PM AssimpReader Information Starting reading of file C:\Users\francis\AppData\Local\Temp\ModelConverterX\models/untitled.dae
 
Hi,

Do you still see CPU activity? It might be it is actually working on loading the object. But that should not take very long in general. How complex is your object?
 
Hi,

Do you still see CPU activity? It might be it is actually working on loading the object. But that should not take very long in general. How complex is your object?
my project is extremely complex. I'm not going to hide it from you. But it seems to be processing. I removed all textures to see if i can advance. At least in MCX 1.4.0 the event log says : Assimpreader .
I've left it loading over night and nothing.
Capture1.PNG
 
Hi,

So it seems the library I use to read the COLLADA files keeps working on the file very long.

How big or complex is your scene (like how many MB is the COLLADA file or how many triangles does it have)?
 
The DAE COLLADA file is 95,315kb and my preferred KMZ file is 67,403kb
I wouldn't know how to obtain the triangle count but
edges 1490212
faces 684676

what do you think?

It actually finished reading objects. (This is the untextured model)
Capture2.PNG
 
Hi,

Good to hear that it does work, although it is slow.

Over 60000 faces is also very much for a scenery object. To get good performance in the sim I think it would be better to try to model things a little more efficient (and with less polygons). This is the kind of polygon count you see for complex aircraft models, but for a scenery model of the roads around your airport I would say you should be able to model them with 10% of the polygons as well.
 
Hi,

Good to hear that it does work, although it is slow.

Over 60000 faces is also very much for a scenery object. To get good performance in the sim I think it would be better to try to model things a little more efficient (and with less polygons). This is the kind of polygon count you see for complex aircraft models, but for a scenery model of the roads around your airport I would say you should be able to model them with 10% of the polygons as well.
Thanks @arno
 
I do not know what's going on, but when I try to export any .mdl after making any simple changes such as changing the texture location (not the file just the location) I get all these errors pertaining to the FX XtoXML file. It used to work fine and I'm not doing anything different than I have for the past several month, this just started happening.
I wish I could take a screenshot of the errors (there's a whole load of them and would take forever in a day to copy/paste each one) so you all could see what the heck is going on. I can post a couple of the errors, but there are a lot all have to do with the FX XtoXML.exe.


1:03 PM XtoMDL Error (0): error : XToMdl.exe Unhandled Application Exception

1:03 PM XtoMDL Error (0): error : System.Exception: String buffer length too big
1:03 PM XtoMDL Error (0): error : at Microsoft.FlightSimulator.XmlToMdlLib.FileExporter.WriteStringWithSetSize(String S, Int32 iBufferLength)

1:03 PM XtoMDL Error (0): error : at Microsoft.FlightSimulator.XmlToMdlLib.MDLProcessingContext.WriteTextureList(ArrayList TextureList)
1:03 PM XtoMDL Error (0): error : at Microsoft.FlightSimulator.XmlToMdlLib.MDLProcessingContext.WriteModelContents(FileExporter Exporter)

Like I said, that is only a few of the errors, there are a whole bunch more. I tried getting a new copy of the XtoXML.exe to see if the file is corrupt, but that didn't help any at all. Everything used to work fine up until a couple of days ago when these errors started coming up, and they only happen if I make any changes to the .mdl. I am converting a .DAE to FSX .MDL ,I have to change the texture format to a DDS or Extended BMP in order for it to work in FSX. Photoshop only saves the texture files in .PNG format which FSX can't use. I've been doing it this way for several months with no problem, but now it won't do it anymore all I get is these errors and the .mdl file it saves is not useable. What could suddenly stop this from working?
 
Do you have weird texture names or maybe long paths somewhere in your model after the changes you made?
 
Nope. Everything is as it was months ago, I use the same texture names saved by Photoshop as I always have and it used to work fine. However, I solved the error issue by resetting all options to default, however, now I have another problem, when I export the .MDL file, it works fine, I can reload it into MCX and it displays fine, but, when I add the model to ADE and add it to the airport, the model does not show in FSX. All previous models still show, but the new one does not. I've tried changing the immage complexity to its highest and lowest, but it has no affect. I cannot get the newly compiled model to show in FSX even though it loads up in MCX with no problem and the "icon" shows in ADE when I add the model, it just won't display in FSX now. I deleted the MCX 1.6 ver. and upgraded to the 1.7 version, but it made no difference. Could there be a option setting that got changed that is preventing the model from showing in FSX?
 
I think MCX no longer works on my system now, don't know if it was some sort of update to Win11 (I sure miss my Win10) or if something on the system got changed when I installed Sketchup and Sbuilder. But it no longer produces visible models. It will create the .mdl file and it loads up fine in MCX, but no other program IE:Sketchup,etcc.. including FSX will be able to view the .mdl file. I can add the .MDL to ADE model list, and insert the model into the airport, but once I compile the airport, the model does not show in FSX, it must not be getting compiled anymore for some reason that I cannot figure out. So unfortunaltely for me, I can no longer create any new models until I find another way to do it. I was going to take some of my 3D people models and overlay new textures on them, but again since I can no longer create viewable MDLs, that is off the table. Does anyone know of any other program that will import Colada .DAE files and convert them to usuable .MDL files for FSX. Sketchup won't do it as I cannot get it to load the textures onto the model and plus it does not save in .MDL format, I would have to convert the files to .MDL, and since MCX is out of commission ,that can't be done. I need another converter program to covert from .DAE to .MDL other than MCX. Like I said, it has to have something to do with a Win11 update or something to do with the istalation of Sketchup and/or SbuilderX. That is when the trouble started with MCX.
 
Back
Top