• 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.

XToMdl.exe Unhandled Application Exception

Messages
8
Country
denmark
After upgrading to Win10 i cant use XToMdl. Worked fine in 8.1

When export from Blender (Using Blender2FSX) without "Export MDL" = No errors and i get T17.x and T17.x.xanim

If i check "Export MDL", this happens:

Traceback (most recent call last):
File "C:\Users\EngineerDK\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fsx\export_fsx.py", line 231, in Export
spawnv(P_WAIT, XToMdl, ['XToMdl.exe', '/XANIM', '/DICT:"%s"' % modeldef, '"%s"' % (ensure_ext(self.Config.filepath,'.x'))])
OSError: [Errno 0] Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\EngineerDK\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fsx\__init__.py", line 139, in execute
Exporter.Export()
File "C:\Users\EngineerDK\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\io_scene_fsx\export_fsx.py", line 239, in Export
raise ExportError("Export to .MDL failed. XToMdl.exe returned an error.")
io_scene_fsx.export_fsx.ExportError: Export to .MDL failed. XToMdl.exe returned an error.

location: <unknown location>:-1


If i try to use T17.x on XToMdl i get this:

Found dictionary file: C:\Program Files (x86)\Steam\steamapps\common\FSX\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml
OutputFile: C:\Users\EngineerDK\Desktop\T17\T17.MDL
Output file after modification: C:\Users\EngineerDK\Desktop\T17\T17.MDL
Creating output MDL file: C:\Users\EngineerDK\Desktop\T17\T17.MDL
warning : Degenerate poly detected in file (C:\Users\EngineerDK\Desktop\T17\T17.x) mesh ()
warning : Face vertex 0 x=-1.207225 y=-0.106154 z=-0.000288
warning : Face vertex 1 x=-1.207225 y=-0.106154 z=-0.000288
warning : Face vertex 2 x=-1.207114 y=-0.102475 z=-0.027746
.
. (a lot of Degenerate poly warnings here)
.
warning : Degenerate poly detected in file (C:\Users\EngineerDK\Desktop\T17\T17.x) mesh ()
warning : Face vertex 0 x=1.207597 y=0.053077 z=0.091643
warning : Face vertex 1 x=1.20764 y=0.027458 z=0.102186
warning : Face vertex 2 x=1.207597 y=0.053077 z=0.091643
(0): error : XToMdl.exe Unhandled Application Exception
(0): error : System.BadImageFormatException: Could not load file or assembly 'Managed_CrashTree, Version=10.0.61355.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

(0): error : File name: 'Managed_CrashTree, Version=10.0.61355.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ---> System.BadImageFormatException: Could not load file or assembly 'Managed_CrashTree, Version=10.0.61355.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

(0): error : File name: 'Managed_CrashTree, Version=10.0.61355.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

(0): error :

(0): error : WRN: Assembly binding logging is turned OFF.

(0): error : To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

(0): error : Note: There is some performance penalty associated with assembly bind failure logging.

(0): error : To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

(0): error :

(0): error : at Microsoft.FlightSimulator.XToXmlLib.ModelProcessingContext.BuildCrashTree()

(0): error : at Microsoft.FlightSimulator.XToXmlLib.ModelProcessingContext.Optimize()

(0): error : at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.ProcessAllFiles()

(0): error : at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.Process(ModelFile[] InputFiles, Hashtable[] AnimationLinkage, String[] AnimationFileRef, XPartDict PartDictionary)

(0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.ProcessInputs()

(0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.RealMain(String[] args)

(0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.Main(String[] args)

(0): error :

(0): error :
(0): error :
(0): error : Could not load file or assembly 'Managed_CrashTree, Version=10.0.61355.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
(0): error :
(0): error : Stack Trace:
(0): error : at Microsoft.FlightSimulator.XToXmlLib.ModelProcessingContext.BuildCrashTree()

(0): error : at Microsoft.FlightSimulator.XToXmlLib.ModelProcessingContext.Optimize()

(0): error : at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.ProcessAllFiles()

(0): error : at Microsoft.FlightSimulator.XToXmlLib.XToXmlLib.Process(ModelFile[] InputFiles, Hashtable[] AnimationLinkage, String[] AnimationFileRef, XPartDict PartDictionary)

(0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.ProcessInputs()

(0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.RealMain(String[] args)

(0): error : at Microsoft.FlightSimulator.XToMDL.XToMDL.Main(String[] args)


Getting a zero byte T17.MDL file which usually is when language is not set to UK, but its not the case here. Could it be the:
This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

If yes... What to do?
 
The FSXSE SDK, for whatever reason, does not include any .exe files, so there's no XTOMDL.exe which is used to compile a model.


Install the P3D v1.4 SDK, point the Blender2FSX toolset to it and use it to export and compile your model. The models will run just fine in FSX.
http://prepar3d.com/support/sdk/
 
To everyone, quit trying to blame Windows 10 for all your problems. :mad:
Windows 10 has been proven to work well in relation to FS development, I can attest to that, so stop using it as a scapegoat, it just adds confusion in trying to solve the original problem. ;)
 
To be fair, a simple upgrade from 7 to 10 can be the source for some problems. Therefor, I recommend starting from scratch with a Win 10 installation medium. Current Windows 10 disks even recognize your Windows 7 and 8 product keys, so you won't have to jump through too many hoops as you had to do before.
 
@Paul Domingue : I dont blame Win 10, just stated that before upgrading from 8.1, it worked fine.
@Heretic : I know FSXSE dont have SDK. Used the one from my Deluxe edition which worked fine in 8.1.
Tried P3D, which produced a 317kb T17.MDL file. But FSX wont show the model. Cant remember the exact error.

I think youre right about the upgrade didnt go to well despite no errors.
 
You have to use the P3D 1.4 SDK for FSX models. Later SDKs do not produce FSX compatible objects.
 
To be honest Bjoern (Heretic) said it before me, but it appeared it got lost. :)
 
To be honest Bjoern (Heretic) said it before me, but it appeared it got lost. :)
That was the reason for feeling stupid... :)

I actually got something to work now, but not the animation. Blender2fsx creates an animation file: T17.x.xanim but the name should be T17.xanim, right?
If i rename the file manually, animation works. But i have to export without .MDL and then rename and run XToMdl manually.

How do i get Blender2fsx create the right animation filename?
 
To everyone, quit trying to blame Windows 10 for all your problems. :mad:
Windows 10 has been proven to work well in relation to FS development, I can attest to that, so stop using it as a scapegoat, it just adds confusion in trying to solve the original problem. ;)

EngineerDK DID NOT say that he was blaming Windows 10, nor was he trying to use it as a scapegoat for his problem.
 
Back
Top