Workaround for CTDs when using Offline AI Traffic

Problem description:

Like others, I was experiencing CTDs with no error message when using Offline AI traffic, even at low settings.

Eliminating other possible causes did not help (Community folder = empty, SimConnect = no connections, unplugged device drivers = cleaned out, NVidia driver = best working version 446.14, hardware overclocks = none).

Like others, I noticed that these CTDs were semi-reproduceable, in that if I repeated the same flight (same flight plan and timings), then the CTDs would occur consistently at more or less the same spot.

This led me to believe that the stock Offline AI traffic BGL file must be at fault.

I used AIFP3 to validate the traffic BGL file, and sure enough it identifies hundreds of data issues in the AI flight plans, including legs with missing departure / arrival airports, legs with impossible flight plan altitudes, etc.

Workaround:

Due to its size, I split the stock traffic BGL file into 2 separate traffic BGL files (1 for commercial, 1 for GA), and corrected / removed any AI flight plans with invalid data. I then disabled the original stock traffic BGL file, and added the 2 new traffic BGL files as add-ons in the community folder.

After 1 day of testing, this seems to have cured all CTDs when using Offline AI traffic, even with traffic levels both set to 100%.

I will do some further testing and if stable, I can upload my modified traffic BGLs as a community add-on, if that would be useful.

In the meantime, if you would like to try the workaround for yourself, then you just need to correct and replace the stock BGL file using AIFP3, as described above.

AIFP3: Stuff 4FS dot com
Stock traffic BGL file: \fs-base-ai-traffic\scenery\world\traffic\trafficAircraft.bgl

Cheers

9 Likes

Hi , i only have CTD when i fly in USA .
The rest of the world i can fly without CTD.
I will try your sugestion.
Iā€™ve been trying everything , even the options you describe above and nothing worked for me.
Since last update i canā€™t fly in USA.
Exacly after 52 min of flight i have a CTD in USA.
I tryed several areas in USA and several flightplans VFR or IFR. CTD everytime.

Thanks .

Hi @msfsuser,

I was also planning on having a look into the traffic.bgl as my CTDā€™s only happen with offline AI enabled.
I HEAVILY modified AI traffic in FSX for over 10 years and experienced similar CTDā€™s in FSX that were the result of bad AI flight plan data or corrupt AI aircraft/liveries. It would be great if you could upload your BGLā€™s, Iā€™m happy to have a look at them and test them in my sim as well :slightly_smiling_face:

I just turned AI offline traffic off. Problem solved. I managed a cross-country flight from Georgia to Michigan no problem. Hopefully Asobo will fix soon so I donā€™t have to mess around with traffic settings.

Ok I have also completed an edit of the base AI traffic BGL files as did @msfsuser
A quick note, using AIFP3 and loading the base BGL files it seems Asobo did a ā€œcut and paste jobā€ from FSX, so many airports with old FSX ICAO codes that are now different in MSFS.
I am about to start testing with AI offline traffic enabled, wish me luck :crossed_fingers:

1 Like

OK. After some testing today, it remains inconclusive for me whether fixing the AI traffic BGL entries has stopped my CTD problem. Before implementing this ā€œfixā€ the sim would CTD 95% of the time when I had AI traffic enabled. Hereā€™s how it went after changing the traffic BGL:
Completed 3 flights in the C172, 2 flights of about 45mins, 1 short 15 min flight.

  • No CTD :+1:
  • Improved performance (less stuttering) :thinking:

Then did 2 flights in the King Air, about about 1 hour long each.

  • No CTD during flight, stuttering returns (I think stuttering has something to do with Glass Panel avionics)
  • when I clicked Return to Menu, the sim CTD. Both flights.

Iā€™m going to keep flying round with the same settings to see if I can replicate any CTDā€™s, but if I can complete entire flights with the sim only CTD when I click return to menu Iā€™ll take that over mid-flight CTDā€™s anyday!

1 Like

Donā€™t forget that manipulating the default trafficAircraft.bgl is useless without changing layout.json. MSFS ā€œreadsā€ manifest.json and layout.json to determine which files to load.

I imagine that you erased the entry from layout.json also.

When compiling a new BGL file for MSFS2020 using AIFP3 it creates package in the community folder with its own .json files. This should tell the sim to use these files, shouldnā€™t it? When you drop other content into the community folder you usually donā€™t have to go into the base game and delete files?

I agree that uploading the files would be appreciated. I know nothing about AIFP3 and would prefer to just test out your .bgls and .json.
I just want some traffic that doesnā€™t result in CTDs.

Iā€™ve uploaded the files at flightsim.to. Itā€™s called ā€˜Offline AI Traffic - Stock Traffic BGL Fixā€™. There are some installation instructions there too:

flightsimto

Offline AI Traffic - Stock Traffic BGL Fix ā€¢ Flight Simulator 2020

Cheers

4 Likes

It can, but it doesnā€™t unless you tell it to. You also need to override and disable the original stock BGL file in the Official package cache. Feel free to try out the files Iā€™ve just uploaded to flightsim.to (see post above). There are some installation instructions there which should help to make sure that everything is in the right place.

Cheers

1 Like

It looks like this took you a long time to go through and test - itā€™s phenomenal that youā€™ve done this and shared your thoughts, process and results too. Thanks!!

It looks like AI traffic was my cause of crashes too. Since I switched it off, I havenā€™t had a single issue. Iā€™m going to try your fix later because I really miss having some traffic around: live traffic is very limited at the moment. Cheers.

Just completed a 10hour 40 min flight from Lagos to KJFK. I had Live Traffic on the entire time, and am pleasantly amused to hear actual callsigns of actual aircraft, truly only minutes away from arrival IRL. Anyways, no issues. I am using the Salty 747 mod, and nothing else.

My only 2 CTDs this week were attempting a trip from Lagos, to RJAA. Around Denmark area, the sim CTD w/o error message. It could be geographic with AI Traffic? I am hoping that Asobo is only an update away from getting a more stable title. There is something going on, according to others with SimConnect and that MSFS will max out on memory trying to get a ā€œqueryā€ of some sort.

This is a recent bug. ASOBO is aware of it.
It involves Simconnect and AI.
The cause has been found by ASOBO and is supposed to be fixed in the upcoming update.
Do a search in the forums here to find out more.
Until the fix, the less you put through Simconnect, the more stable it is.

1 Like

Thank you!!

No worries dude. :slight_smile:

You donā€™t have to dissable original bgl. Open layout.json and delete this:
{
ā€œpathā€: ā€œscenery/world/traffic/trafficAircraft.bglā€,
ā€œsizeā€: 38992829,
ā€œdateā€: 132449093750000000
},

It will then look like this:

{
ā€œcontentā€: [
{
ā€œpathā€: ā€œscenery/world/traffic/fs10.AircraftTypes.csvā€,
ā€œsizeā€: 4888,
ā€œdateā€: 132379022900000000
},
{
ā€œpathā€: ā€œscenery/world/traffic/trafficBoats.bglā€,
ā€œsizeā€: 1716075,
ā€œdateā€: 132387798760000000
}
]
}

The sim will not be able to read default trafficAircraft.bgl , and you will be ok.

Yes, it goes without saying that the BGL is best disabled by editing its corresponding layout.json file, not by deleting the BGL file itself. (If you download the files I uploaded earlier, you will see that only the json file is modified).

In fact, it would be preferable to simply override the stock BGL file with an identically named file in the Community folder, leaving the files in the Official folder completely untouched, but unfortunately that does not work in this case.

One flight so far with AI traffic enabled. No CTD. Fingerā€™s crossed!

Edit: two flights down. No CTD. Iā€™m starting to feel pretty good about this fix!

Final edit: on my 6th flight I did get a CTD. That said, itā€™s a definite improvement! I will continue to use it.

1 Like

Iā€™ve just put in your fix, so looking forward to trying it out later. I have a question about AI traffic:

Using the traffic density slider, what actual levels of traffic does 100% give us? For example, if I set the slider to 100% will I see absolutely MAD INSANE LOADS of traffic? or is 100% really just a kinda natural feeling, comfortable, or realistic level of traffic, with anything under 100% a compromise for performance?

Iā€™m going to try 75% and see what happens but I thought someone here might give me a head start on the decision.

I know this is a bit subjective and dependent on system performance but I havenā€™t ever had AI traffic working properly, so not sure what the balance of it is. I do recall ATC getting quite choked with AI traffic instructions though (although that may be because the AI system was freaking out and creating ten copies of things simultaneously), so maybe thatā€™s a consideration.