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

FSXA New GDI error

Pyscen

Resource contributor
Messages
3,040
Country
us-texas
Hello Arno,...

Got a new Error (with latest version; release date: today 579 update),.. placing dds files in diffuse slot. Not sure if that was the cause. Here is what came up though:

Unhandled exception has occurred in your application....


************** Exception Text **************
System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Image.RotateFlip(RotateFlipType rotateFlipType)
at ASToFra.TextureImage.get_Image()
at ASToFra.MaterialEditorForm.SetTexturePreview()
at ASToFra.MaterialEditorForm.listBox1_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ListBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ListBox.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.3607 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ModelConverterX
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/FS%20Design%20Tools/ModelConverterX/ModelConverterX.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
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.3614 (GDR.050727-3600)
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.3053 (netfxsp.050727-3000)
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.3053 (netfxsp.050727-3000)
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.3082 (QFE.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ObjectWriter
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/FS%20Design%20Tools/ModelConverterX/ObjectWriter.DLL
----------------------------------------
TextureObject
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/FS%20Design%20Tools/ModelConverterX/TextureObject.DLL
----------------------------------------
ObjectModel3D
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/FS%20Design%20Tools/ModelConverterX/ObjectModel3D.DLL
----------------------------------------
ObjectRenderer
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/FS%20Design%20Tools/ModelConverterX/ObjectRenderer.DLL
----------------------------------------
GRV11DLL
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/FS%20Design%20Tools/ModelConverterX/GRV11DLL.DLL
----------------------------------------
ObjectReader
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/FS%20Design%20Tools/ModelConverterX/ObjectReader.DLL
----------------------------------------
TextureLoader
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/FS%20Design%20Tools/ModelConverterX/TextureLoader.DLL
----------------------------------------
ObjectEditor
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/FS%20Design%20Tools/ModelConverterX/ObjectEditor.DLL
----------------------------------------
System.Design
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
System.Drawing.Design
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing.Design/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.Design.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
TextureWriter
Assembly Version: 1.0.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/FS%20Design%20Tools/ModelConverterX/TextureWriter.DLL
----------------------------------------
 
Hi,

It seems I can not reproduce it here by assigning any DDS file to a diffuse texture slot. Does it happen only with that one texture or with multiple?
 
Hi,

It seems I can not reproduce it here by assigning any DDS file to a diffuse texture slot. Does it happen only with that one texture or with multiple?

happens on multiple number of them (textures), not any specific texture,... rebooted and it did it again.
 
Hi Doug,

Could you maybe send me the model and textures so that I can try with the same conditions? Without being able to reproduce the problem it will be hard to fix it.
 
Hi Doug,

Could you maybe send me the model and textures so that I can try with the same conditions? Without being able to reproduce the problem it will be hard to fix it.

yes that would not be a problem... let me zip it up and you want me to send to you to what address?
 
I sent the Project to you to determine what is happening... hopefully it will help....
 
Thanks, got them. I'll take a look and see if I can reproduce the problems.
 
Hi,

At the moment I can not yet reproduce the error. I will try again later.
 
Hi,

At the moment I can not yet reproduce the error. I will try again later.

I don't know if this is a factor, but.. I'm using Windows XP. Maybe a different handling to the problem.
 
Arno

Well,... What I have done to get around it somewhat, mind you, is by placing all the diffused slot with the designated dds file (texture). Then, loaded up the MDL file and went in to add the others in their desiginated spots. When I started adding the Ambient, Diffuse, and Specular colors then resaved the MDL I get a bunch of warning info comments like this:

9:07 PM XtoMDL Information warning : Degenerate poly detected in file (C:\Documents and Settings\Pumpkin\My Documents\Google SketchUp Models\KDAL Project\KDAL Terminal\KDAL_Term\KDAL_Term.x) mesh (Part2)
9:07 PM XtoMDL Information warning : Face vertex 0 x=-39.40745 y=18.89167 z=7.41634
9:07 PM XtoMDL Information warning : Face vertex 1 x=-49.2469 y=18.89167 z=7.41634
9:07 PM XtoMDL Information warning : Face vertex 2 x=30.20828 y=18.89167 z=7.41634


I'm sure what's being asked for me to correct?

Never seen this before
 
Don't worry about "Degenerate" polys. They won't affect the appearance usually. What it means is the same thing "colocated vertices" meant in FS9 modeling.

Two vertices with the same exact coordinates (or within 1mm at least).
 
Well thats good to know... The only thing that concerns me, I later realized that the colors for Ambient, Diffuse, and Specular were not being saved within the model file also... I'm not sure whats causing the problems... If Arno is unable to produce the same problem, I'm at a lost. The only thing I can think of is maybe a XP/Vista/Windows 7 differences (memory handling, filename usage etc).
 
Hi,

I will take a look. ModelConverterX is supposed to filter out such polygons that have no area. It seems that for your object this might not be working.

In the FSX MDL format the colours should be saved as well. I have to check, maybe when there is a texture as well ModelConverterX modifies the colours (like the gamepack also does). I will have to check the code for this.
 
Hi Doug,

Can you explain a bit more about your problem with the colours? I tried it and ModelConverterX saves the diffuse and specular colour correctly. The FSX MDL format does not store the ambient or emmissive colour, so these are not kept. But that is a limitation of the MDL format.
 
Hi Doug,

Can you explain a bit more about your problem with the colours? I tried it and ModelConverterX saves the diffuse and specular colour correctly. The FSX MDL format does not store the ambient or emmissive colour, so these are not kept. But that is a limitation of the MDL format.

ok... That would explain it,... I was changing the ambient color,... and if it doesn't keep that then that part is fine then... It was specifically the Ambient color that wasn't kept or saved.

On the memory handling: It appears that it occurs after you have opened and closed the material editor multiple times (to see what has been done or not), since the texture names don't change unless you do so (one of the previous problems mentioned before). I noticed that if I go down the texture list within the material editor, it doesn't seem to have a problem.. as long as I don't close and reopen the material editor as much. Also, alot has to do with the size of the textures too I think... I have played with the sizes on the textures and it does seem to help,... though on FSX textures I don't want to change those sizes since it could affect the default buildings (which I have found out) :)

I guess on the memory handling I need more memory or make smaller models (building), though it would make it harder to build terminals specifically.

Just a question Arno,... Does ModelConverterX use any of the paging memory functionality of Windows (any)?
 
ok... That would explain it,... I was changing the ambient color,... and if it doesn't keep that then that part is fine then... It was specifically the Ambient color that wasn't kept or saved.

On the memory handling: It appears that it occurs after you have opened and closed the material editor multiple times (to see what has been done or not), since the texture names don't change unless you do so (one of the previous problems mentioned before). I noticed that if I go down the texture list within the material editor, it doesn't seem to have a problem.. as long as I don't close and reopen the material editor as much. Also, alot has to do with the size of the textures too I think... I have played with the sizes on the textures and it does seem to help,... though on FSX textures I don't want to change those sizes since it could affect the default buildings (which I have found out) :)

I guess on the memory handling I need more memory or make smaller models (building), though it would make it harder to build terminals specifically.

Just a question Arno,... Does ModelConverterX use any of the paging memory functionality of Windows (any)?

Arno,... just to clarify,... on the Ambient color not being stored in a MDL file: Are you saying that if I load a mdl in MCX and try to change the ambient color it would not resave back into the same mdl file? Because that what I was doing. Now, if I loaded a dae file, and changed a ambient color there,... then exported it to a mdl, it appears to be saving within the mdl file. Is this what you were referring? That is does resave back into a mdl file?
 
Hi Doug,

On the memory handling: It appears that it occurs after you have opened and closed the material editor multiple times (to see what has been done or not), since the texture names don't change unless you do so (one of the previous problems mentioned before). I noticed that if I go down the texture list within the material editor, it doesn't seem to have a problem.. as long as I don't close and reopen the material editor as much. Also, alot has to do with the size of the textures too I think... I have played with the sizes on the textures and it does seem to help,... though on FSX textures I don't want to change those sizes since it could affect the default buildings (which I have found out) :)

OK, I will give that a try. The size of the texture will probably have an influence since the bigger the texture the more memory it needs. But I intended the make ModelConverterX so that each texture is only loaded once. I will check the memory leak again.

Just a question Arno,... Does ModelConverterX use any of the paging memory functionality of Windows (any)?

Not sure what you mean by this. ModelConverterX is made using .NET, but I have not especially used any paging functionality.

Arno,... just to clarify,... on the Ambient color not being stored in a MDL file: Are you saying that if I load a mdl in MCX and try to change the ambient color it would not resave back into the same mdl file? Because that what I was doing. Now, if I loaded a dae file, and changed a ambient color there,... then exported it to a mdl, it appears to be saving within the mdl file. Is this what you were referring? That is does resave back into a mdl file?

The FSX MDL file does not even store an ambient or emissive colour. So when you read the MDL ModelConverterX will define the value for you (black for the emissive colour, the diffuse colour for ambient). When exporting the value is ignored.

The FS2004 MDL format can store all four colour types, that is why the material editor lists them all.
 
Hi Doug,



OK, I will give that a try. The size of the texture will probably have an influence since the bigger the texture the more memory it needs. But I intended the make ModelConverterX so that each texture is only loaded once. I will check the memory leak again..

Ok,... that would be great! Sorry for the difficulties ;)

Not sure what you mean by this. ModelConverterX is made using .NET, but I have not especially used any paging functionality

Well,... I would think that the .NET (since written by Microsoft) it would incorporate that part of memory handling within the system. In general terms, when not enough memory available, the system would dump to disk (virtual memory) until needed.

The FSX MDL file does not even store an ambient or emissive colour. So when you read the MDL ModelConverterX will define the value for you (black for the emissive colour, the diffuse colour for ambient). When exporting the value is ignored.

The FS2004 MDL format can store all four colour types, that is why the material editor lists them all.

ok... I got it now... makes sense in what I'm seeing. :)

Thanks again Arno!!
 
Back
Top