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

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