Sign in to follow this  
pinsel

Changing Aircraft causes SLX Crash

Recommended Posts

Hi Maarten,

 

i lately installed the Majestic Dash 8Q400 into the standard P3D airplanes folder.

In SLX i did a rebuild of the a/c database. If i switch to the a/c tab and select e.g. a C-130 in the standard a/c folder everything is fine, if i select one of the 8Q400, SLX crashes to desktop.

And here are some lines from the SLX-log:

 

20160328111229 Active pane: xAircraftPane
20160328111254 Aircraft variation changed to: CS C130Extra1 6
20160328111254 Validating flight plan KNYG to KMVY
20160328111254 Flight plan KNYG to KMVY has errors
20160328111343 Aircraft variation changed to: MJC8Q400_BER
20160328111343 Validating flight plan KNYG to KMVY
20160328111343 Flight plan KNYG to KMVY has errors
20160328111343 Fatal error "System.ArgumentException: The path is not of a legal form.
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetFullPathInternal(String path)
   at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
   at System.IO.FileInfo..ctor(String fileName)
   at MaartenBoelens.Utilities.StringExtensions.IsFileLocked(String file)
   at MaartenBoelens.SimLauncherX.ViewModel.AircraftVariationsViewModel.<get_Open3dModelCommand>b__72_2()"
 
Cheers, Walter.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Walter,

 

I will release a fix shortly.

 

Apparently SLX could not find the .mdl file for the Dash-8 Q400. I look for the [aircraft folder containing aircraft.cfg]\Model[."model" value if specified in the aircraft.cfg file]\model.cfg file. Inside this model.cfg file, I look for the normal= setting to locate the .mdl file. Can you please check the folder structure of the Dash-8? I would like to know why the .mdl file could not be found. The .mdl file contains the data for the 3D model feature that I have added to the latest version.

 

thanks, Maarten

Share this post


Link to post
Share on other sites

Hi Maarten

i checked the model.cfg and saw the difference to other model.cfg's:

 

At the entry "normal" they wrote the full filename with extension "mjc_q400_ext.mdl", i changed it to "mjc_q400_ext" and SLX don't crash anymore.

 

Cheers, Walter.

Share this post


Link to post
Share on other sites

Hi Walter,

 

Thanks for looking into it! I have changed the .mdl file detection now to allow for the .mdl extension in the normal= setting in the model.cfg file. I just need to check a couple of other things before I release the fix.

 

Maarten

Share this post


Link to post
Share on other sites

Hi Maarten,

that's OK now, no crash anymore.

 

Now i can select the Dash. If i then click on the Show VC button i get an alert: "Textures could not be found"

 

In the log-file i see the following:

 

20160329091530 Aircraft variation changed to: MJC8Q400_BER
20160329091530 Validating flight plan KNYG to KMVY
20160329091530 Flight plan KNYG to KMVY has errors
20160329091543 Loading VC model for  MJC-8 Q400, Air Berlin
20160329091544 Error loading textures "System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\FluSi\P3Dv3\simobjects\airplanes\mjc8q400\texture'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
   at MaartenBoelens.SimLauncherX.Model.BitmapDictionary.<>c__DisplayClass10_0.<LoadTextures>b__1(String x)
   at MoreLinq.MoreEnumerable.ForEach[T](IEnumerable`1 source, Action`1 action)
   at MaartenBoelens.SimLauncherX.Model.BitmapDictionary.LoadTextures(List`1 textures, List`1 folders)"
20160329091545 3D model for MJC-8 Q400, Air Berlin loaded
 
The texture line for that plane in aircraft.cfg is:
texture=BER
 
The texture-folder is named: Texture.BER
 
The same problem exists with the exterior model.
 
================================================================================================================
 
Another one: I switch to a CS C-130, both 3D buttons are greyed.
 
In that model folder is no .mdl file, they are saved elsewhere:
 
model.cfg:
 
[models]
normal=..\model\c130-5
interior=..\model\c130-5_interior
 
Cheers, Walter.

Share this post


Link to post
Share on other sites

Hi Walter,

 

I will look into it this evening.

 

Thanks, Maarten

Share this post


Link to post
Share on other sites

Hi Walter,

 

Both issues should be fixed now. Please check the latest version.

 

thanks, Maarten

Share this post


Link to post
Share on other sites

Hi Maarten,

yes, they are fixed now.

The SLX-log shows the next issue:

 

20160330091006 Loading exterior 3D model for  C-130T, US NAVY 'Blue Angels'
20160330091008 Unable to load texture with name: C130_GLASS_T.DDS
20160330091008 Unable to load texture with name: C130_GLASS_T_SPEC.DDS
20160330091009 3D model for C-130T, US NAVY 'Blue Angels' loaded
 
That is, because the texture files are stored in the "fallback" folders.
 
texture.cfg:
 
[fltsim]
 
fallback.1=..\..\CS_C130\texture
fallback.2=..\..\CS_C130\texture.spec3
fallback.3=..\..\..\..\Scenery\Global\texture
fallback.4=..\..\..\..\..\..\Scenery\Global\texture
 
Cheers, Walter.
 
PS. Could you do me a favour? I often make small changes to the flight (e.g. just changing time) and then want to rebuild the database. That is not possible, because flight has unsaved changes. I have to click OK, as i don't want to save the changes, i must select another flight to select "don't save" and then i'm able to rebuild. In my opinion there are too many clicks. The most times i know what i'm doing and when i should save a flight. It would be nice to rebuild the datebase without a confirmation (or fewer ones).

Share this post


Link to post
Share on other sites

Hi Walter,

 

Thanks again for your help! I already planned to process the texture.cfg file, but I did not have enough time yesterday. I'm going to the theater this evening, so most probably it will have to wait until tomorrow evening. I will also have a look at the confirmation dialog when starting a rebuild of the database.

 

Btw: why do you want to rebuild the database that often? It's really only needed when you add new scenery or new aircraft.

 

Thanks, Maarten

Share this post


Link to post
Share on other sites

Hi Maarten,

thanks for your quick response and have pleasure at the theater tonight.

 

I just made a fresh install of P3D on my new computer and now i'm building my world with several sceneries. So i install something and make tests, so i have to rebuild the db from time to time.

 

Cheers, Walter.

Share this post


Link to post
Share on other sites

Hi Walter,

 

I had a good laugh with Eric van Sauers, a Dutch comedian!

When I got home, I quickly added the texture.cfg processing and replaced the alert dialog with a confirmation dialog when you start a rebuild of the database and the selected flight/flight plan is dirty.

 

Hopefully all your issues are solved now, but if not, please let me know.

 

thanks, Maarten

Share this post


Link to post
Share on other sites

Hi Maarten,

the texture processing with the fallbacks is OK and the new dialog is helpful.

 

But: Processing the path was the easy part, now it becomes a little bit more complicated.

 

20160331082826 Loading VC model for  MJC-8 Q400, Air Berlin
20160331082829 Unable to load texture with name: VC1Q400
 
20160331083000 Loading VC model for  737-200, Alaska Airlines
20160331083003 Unable to load texture with name: $B737_VC_OVHD_1
 
20160331083054 Loading VC model for  Howard 500 - 105, Civilian
20160331083057 Unable to load texture with name: VC03
 
Most of the interior models uses textures that are hidden in the gauges.
 
 
Cheers, Walter.

Share this post


Link to post
Share on other sites

Hi Walter,

 

Can you confirm that there's no more errors messages in the latest version related to the gauges? I can only display gauges properly when they are either full 3D objects or when the panel.cfg file has a 'file =' key in the [Vcockpit..] sections.

 

thanks, Maarten

Share this post


Link to post
Share on other sites

Hi Maarten,

now i get an alert "Textures could not be found", which seems to be the wrong message. The logfile shows there is missing a "FreeImage" DLL:

 

20160405084152 Loading exterior 3D model for MJC-8 Q400, Air Berlin
20160405084153 Error loading texture file: D:\FluSi\P3Dv3\simobjects\airplanes\mjc8q400\texture.BER\q400ext1_night.bmp "System.DllNotFoundException: Unable to load DLL 'FreeImage': Das angegebene Modul wurde nicht gefunden. (Exception from HRESULT: 0x8007007E)
   at FreeImageAPI.FreeImage.GetFileType(String filename, Int32 size)
   at FreeImageAPI.FreeImage.LoadEx(String filename, FREE_IMAGE_LOAD_FLAGS flags, FREE_IMAGE_FORMAT& format)
   at FreeImageAPI.FreeImage.LoadBitmap(String filename, FREE_IMAGE_LOAD_FLAGS flags, FREE_IMAGE_FORMAT& format)
   at MaartenBoelens.SimLauncherX.Model.BitmapDictionary.<>c__DisplayClass10_0.<LoadTextures>b__0(String x)"
 
Cheers, Walter.

Share this post


Link to post
Share on other sites

Hi Walter,

 

Ok, that's a different issue. I made some mistake when creating the installer. I will fix it this evening.

 

thanks, Maarten

Share this post


Link to post
Share on other sites

Hi Walter,

 

I checked, but it doesn't look like I made a mistake. There should be a Freeimage.dll file and a FreeimageNET.dll file in the Common subfolder of the SLX installation folder. If these files are missing, please try to reinstall the latest version.

 

thanks, Maarten

Share this post


Link to post
Share on other sites
Hi Maarten,

the FreeImage issue is now solved.

 

At first i tested an old freeware model (Howard 500 from Milton Shupe), everything in ext and vc is looking fine. No errors in log-file.

 

Then i loaded the CS C-130 exterior model. No error in log-file, the model looks fine but there is a big hole in the right wing. I can look through this hole into the plane.

 

When i swith to vc i get errors in the log:

 

20160410090314 Loading VC model for C-130T, US NAVY 'Blue Angels'

20160410090315 Unable to find texture with name: $C130_MAIN_R

20160410090315 Error getting empty background bitmap for gauge air_cabin_vertical "System.ArgumentException: Parameter is not valid.

   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)

   at MaartenBoelens.SimLauncherX.Model.XmlGauge`1.GetEmptyBackgroundBitmap(XElement gaugeElement)"

20160410090315 Error processing .cab file D:\FluSi\P3Dv3\simobjects\airplanes\cs_ex1_c130\panel\..\..\CS_C130\panel\Captain_Sim.c130.air.cab "System.ArgumentException: Parameter is not valid.

   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)

   at MaartenBoelens.SimLauncherX.Model.XmlGauge`1.GetEmptyBackgroundBitmap(XElement gaugeElement)

   at MaartenBoelens.SimLauncherX.Model.XmlGauge`1.AddElementBitmaps(XDocument xDoc, IEnumerable`1 files, Bitmap panelBitmap)

   at MoreLinq.MoreEnumerable.ForEach[T](IEnumerable`1 source, Action`1 action)

   at MaartenBoelens.SimLauncherX.Model.XmlGaugeGroup..ctor(IGrouping`2 group, String simPath, AircraftVariation aircraftVariation, Bitmap panelBitmap)"

 

and all gauges are black or grey.

 

 

The Milviz 737 exterior model has some errors in the log-file but is looking good so far.

20160410090518 3D model for 737-200, Alaska Airlines loaded

20160410090618 Loading exterior 3D model for 737-200, Alaska Airlines

20160410090620 Unable to find texture with name: 737_200_9_C_SPECULAR.DDS

20160410090621 Unable to find texture with name: 737_200_7_C_SPECULAR.DDS

20160410090621 Unable to find texture with name: 737_200_8_C_SPECULAR.DDS

 

The same with vc:

20160410090827 Loading VC model for 737-200, Alaska Airlines

20160410090830 Unable to find texture with name: $B737_VC_10

20160410090830 Unable to find texture with name: $B737_VC_CB

20160410090830 Unable to find texture with name: $B737_VC_OVHD_2

 

some errors but looking good.

 

And very ugly the Dash-8 Q400. The exterior model generates no error, but the textures are scrambled and mirrored.

The vc shows some errors:

20160410091337 Loading VC model for MJC-8 Q400, Air Berlin

20160410091338 Unable to find texture with name: $VC4Q400

20160410091338 Unable to find texture with name: $VC1Q400

 

The same as the exterior, everything scrambled and mirrored.

 

Cheers, Walter.

Share this post


Link to post
Share on other sites

Hi Walter,

 

C130: I will fix the error that occurs when loading the VC. I have no idea however why there's a hole in the right wing. Can you post a picture please? I do not have the C130 myself,

 

Milviz 737: can you find the 737_200_9_C_SPECULAR.DDS file in the aircraft folder somewhere? The textures that have a name in the .mdl file that starts with $ are the virtual cockpit panel textures. If you look in the panel.cfg file, you will find a [VCockpitxx] section with a texture= key that has the name of this texture (starting with $). The texture sheet for this part of the VC is a composite of the file= key and the bitmaps specified in the gauges. If there's no file= entry and there are no XML gauges (all gauges are of the .dll type), SLX is unable to compose the texture sheet and you will see the 'Unable to find texture' error message in the log file. The same occurs with the other aircraft.

 

Dash-8: can you please try to open the aircraft in ModelConverterX and toggle the 'FlipDDS' setting within the Options|Texture settings in ModelConverterX. Does the view in ModelConverterX correspond to what you see in SLX when you change the 'FlipDDS' settings and reload the textures? If so, I will add a checkbox to the 3D view to flip the DDS textures.

 

thanks, Maarten

Share this post


Link to post
Share on other sites
Hi Maarten,

here is a picture of the C130:

dtq6qru2.jpg

 

737: I can't find 737_200_9_C_SPECULAR.DDS anywhere.

 

I'm not familiar with ModelConverterX, when i try to open any a/c with that porgram i see nothing but a light blue window.

 

Cheers, Walter.

Share this post


Link to post
Share on other sites

Hi Walter,

 

I downloaded the demo of the CS C130 and I see the same 'hole' in the right wing as you do. I tried a lot of things, but so far I haven't been able to find the cause of the issue. SLX is based on WPF 3D and WPF is known for having transparency issues because it has only limited color blending options. Transparent objects should be added to the model after the non-transparent objects, but sometimes you have a situation where (from the camera's point of view) a non-transparent object is sandwiched between two transparent objects and the problem cannot be solved. The strange thing is that the texture is question (C130_6_T.dds) does not have any transparency at all in that area. When I remove the alpha channel altogether the problem is still there, but when I replace the texture with a simple non-transparent color, the 'hole' is gone.

 

To open an aircraft in ModelConverterX, just select the aircraft within SLX and select 'Open in ModelConverterX' on the ribbon.

 

thanks, Maarten

Share this post


Link to post
Share on other sites
Hi Maarten,

i did so, selected an a/c and clicked on 'Open in ModelConverterX' (i got the version 1.3.0.0). Only a blue window appears.

 

So i had a look into the recent files list, the latest entry is 'D:\FluSi\P3Dv3\simobjects\airplanes\mjc8q400\aircraft.cfg'. 

I tried to import that file manually and nothing happend. Then i opened the '.mdl' file and the model was displayed.

It seems, ModelConverterX can't handle aircraft.cfg files. 

 

I think, you should launch ModelConverterX with the destected .mdl file instead the .cfg as parameter.

20160412082431 Exterior .mdl file for aircraft variation MJC8Q400_BER detected as D:\FluSi\P3Dv3\simobjects\airplanes\mjc8q400\model\mjc_q400_ext.mdl

20160412082447 Launching D:\FluSi\ModelConverterX_130\ModelConverterX.exe with arguments D:\FluSi\P3Dv3\simobjects\airplanes\mjc8q400\aircraft.cfg

 

The Dash in SLX:

xankxetg.jpg

 

and in MCX:

mr8h29hl.jpg

 

I switched the FlipDDS setting, but i don't know how to reload the textures.

 

Cheers, Walter.

Share this post


Link to post
Share on other sites

Hi Walter,

 

I'm using the latest development release of ModelConverterX (1.4.x.x). Maybe that makes the diffierence. This release loads aircraft.cfg files just fine. I also see in your picture of 1.3 that a texture reload button is missing on the second toolbar. If using the 1.3 version, just restart ModelConverterX after changing the FlipDDS setting. I will send you a pm with a link to a test version this evening. This test version includes a 'flip textures' checkbox at the top left of the 3D window.

 

thanks, Maarten

Share this post


Link to post
Share on other sites

Hi Maarten,

i just downloaded the latest MCX (1.4.something) and it is able to handle the aircraft.cfgs.

I made the changes to the FlipDDS flag and reloaded the textures. There is no visible difference.

 

Cheers, Walter.

Share this post


Link to post
Share on other sites

Hi Walter,

 

There must be a change when you flip the .dds textures. Sometimes you have to click 2 or 3 times on the reload button until you see that the model is actually reloading.

 

thanks, Maarten

Share this post


Link to post
Share on other sites
Hi Maarten,

i opened an aother a/c with MCX, changed the FlipDDS flag and it worked like aspected.

The Dash is a little bit strange. FlipDDS changes nothing in the view.

 

So i installed your test-version of SLX.

With every a/c i see changes except the Dash:

The only thing you can see is a very small change of the lighting.

 

7xn3ltdh.jpg

huc4acvw.jpg

 

Cheers, Walter

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this