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

unhandled exception...

Messages
3
Hello,

I have a problem with ModelConverterX development version,

when I try to import some mdl files then I have a error dialog box ... I paste the details:

"See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Value of '1530' is not valid for 'red'. 'red' should be greater than or equal to 0 and less than or equal to 255.
at System.Drawing.Color.CheckByte(Int32 value, String name)
at System.Drawing.Color.FromArgb(Int32 alpha, Int32 red, Int32 green, Int32 blue)
at ASToFra.ObjectModel3D.Material.get_DiffuseColor()
at ASToFra.ObjectModel3D.ObjectModel.SetAlphaTextures()
at ASToFra.ObjectReader.MDL9Reader.Read(String filename)
at ASToFra.ObjectReader.MDLReader.Read(String filename)
at ASToFra.ObjectReader.AllObjectReader.Read(String fileName)
at ASToFra.ModelConverterX.MainWindow.bwImporter_DoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


************** Loaded Assemblies **************
...

************** 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 I can fix this ?

regards :D
Tom
 
Make sure that 'red' is equal to 0 and less than or equal to 255.

You are setting 'red' to 1530 somehow ..


Color should take the 4 parameters (Int32 alpha, Int32 red, Int32 green, Int32 blue), where each paramater is limited to the range 0 - 255.

Geoff
 
Hello,

thank's for reply but I don't know where I have to change this number :/ maybe this is connected with mdl files because one of them I imported without problem ... i change the colors in options but in many mdl files I still have a error ...
 
OK it works ... in different computer I hadn't error ... so it's some bad things in my own computer !!

thank's for reply and interesting ...

regards
Tom...
 
Hi,

Make sure that your decimal separator is the period, not the comma, in Windows Regional Settings.

Hope this helps,
 
Hi,

Could you upload a file that has this problem? I would like to test it here to see if it is not a bug somehow.
 
Back
Top