Startup hang caused by apostrophe in scenery name

Quick summary:

I ran into an issue when enabling scenery after the update yesterday where, when a certain package was enabled, startup would hang at the last loading screen, even after the blue bar itself had filled. Investigation showed that this is likely due to an apostrophe in the name of a scenery being unescaped in a request to the PlayFab API, causing the sim to enter a request loop.

Details:

[Note: I have also filed a ZenDesk ticket with fuller details and unobscured images, but I wanted to share this here for the community’s knowledge, too, while still preserving some privacy.]

After identifying some of the suspect scenery I started the sim and attached procmon to the flightsim.exe process to see what it was doing. I noticed a large amount of HTTPS traffic to and from a particular host with an AWS EC2 address. (see procmon.png, below). This seemed odd and slightly disturbed me.

I set up mitmproxy as my system proxy and used it to intercept the traffic in question. What I found was that the connections shown in procmon were tied to requests to a host at playfabapi.com, most particularly the address https://<expurgated>.playfabapi.com/Catalog/Search?sdk=XPlatCppSdk-3.24.200218. (see mitmproxy1.png)

Looking at the traffic, I noticed what seemed to be a pronounced looping pattern in the requests. Digging into each of the requests, I saw that the loop seemed to start again every time one particular request was made which resulted in an error response from the remote API.

The failure reported was due to a syntax error in the request, and tracing the location given in the error message, I found that it was due to an unescaped apostrophe in the name of one of my installed scenery packages (in this particular case, “wookie042-sinclair’s-secret-airstrip-sji6”). (see mitproxy2.png)

When I removed that one package from my community folder the problem went away. After further investigation, it seems like it is the name of the directory the package is in that matters; the title in the manifest file does not.

There doesn’t necessarily seem to be a full hang every time – if I have just that package enabled and start the sim I do usually manage to get in after a very long wait. If I have many others, though, it seems to never make progress, although perhaps it would if I left it sitting long enough.

Either way, this scenery is one I’ve had for a while and I haven’t experienced any notable problems before, so this feels like it’s a regression in the latest update.

Reproduction:

Simply put a package in your community folder with an apostrophe in the directory name. Start the sim and noticed the dramatically increased load times.

Images:

procmon.png

mitmproxy1.png

mitmproxy2.png

1 Like

Another related issue: Stuck on Start Screen, Loading screen stuck between flight and main screen after update 1.12.13.0

Great, thanks for this info. Had the same problem myself and had traced it to my community folder content. But hadn’t got around to trying my mods one by one to find the culprit. Now I know what to look for.

No problem! If you look at that thread I link in my previous comment it looks like that may not be the only thing causing this, but it’s definitely one thing to check for.

Great find! Kudos! I used to do work like this MANY years ago!

I will recommend, that when anyone installs a new mod to their Community folder, it’s always made me feel a lot more comfortable to remove any character that’s not A-Z, 0-9, or _ or - . I’m sure there’s a few more ok characters, but in programming, there are reserved/special characters that each system interprets differently.

Thanks again for the find!

1 Like

Looks like the last ver. of a32nx (GitHub - flybywiresim/a32nx: The A32NX Project is a community driven open source project to create a free Airbus A320neo in Microsoft Flight Simulator that is as close to reality as possible. It aims to enhance the default A320neo by improving the systems depth and functionality to bring it up to payware-level, all for free.) fixed it for me for now :crossed_fingers:

i have the same problem,but i have only liveries in the community folder

It looks like this has been moved by a moderator into the General Discussion category and I’m a little confused as to why. This feels like a clear bug in the sim that belongs in the Bugs category, does it not? Are there certain sorts of documented problem reports that don’t belong there?

Maybe the SDK details disallowed characters? And maybe just an oversight by the developer? In that case it wouldn’t be a bug. That’s my best theory.

This is more an issue in Windows rather than FS2020.

There are various symbols which are either not allowed in a filename, or else frowned upon. This is a comprehensive list (which includes the single quote):

Characters to Avoid in Directories and Filenames | UMC | Michigan Tech (mtu.edu)

I’m not clear whether the single apostrophe is actually illegal, but it is certainly bad practice.

Incorrect syntax on the part of 3rd party developers is not a “bug”. Granted, there is some error checking they can do for some errors, but, for an issue like this, they are relying on the operating system. You could create a bug report with the Windows folks, but, you won’t get very far, as I imagine if they cared about disallowed character issues, they would have done something about it 30 or more years ago.

As a matter of process, I rename every package directory name (mostly for organizational purposes), and I check every manifest for proper syntax (developers screw these up all the time. Errors mostly show up as the Content window won’t open).

1 Like

What is a proper manifest file entry supposed to look like? Many of us have a lot of liveries, so comparing each one against another is time consuming. I would be fine spending the time checking these files if I knew what to look for.

This has nothing to do with the operating system. The apostrophe is a legal character in the Windows filename.

The web API which the simulator is sending the filenames to is hanging on some legal Windows filenames, not returning a responses, and keeping the sim from loading.

1 Like

Good point, I was tired and not thinking, I was reading comma, not apostrophe. However, I could see an apostrophe hanging things. We all know Asobo is pretty sloppy with their coding.

Most commonly, missing commas at the ends of sections, or a comma at the end of the last section, which should not have a comma; or missing apostrophes, typically in the release notes section is where I’ve seen them. The immediate way to tell if there is a syntax problem with a manifest file is to go to the Content Manager. It won’t load if there’s a bad manifest file.

Interesting. I actually sort of found a possible solution involving characters, at least with the A320neo 3PD liveries. It involved the aircraft.cfg file, specifically this part:

atc_id = “_” ; tail number
atc_id_enable = 0 ; enable tail number

I can’t explain it, but I found the problem livery a few days ago after a lot of troubleshooting. I originally had a space between the " " but it seems to depend on who made the livery and how they set up the inner workings of the paint. Now, if I select an aircraft in the hangar and the program freezes, I go and make sure the aircraft.cfg file reads properly. Of course, your mileage may vary, but this helped me…until the next issue pops up. Hopefully this will help someone.

1 Like

yeah, the whole registration number thing is broken for people who want to create repaints and turn off the very limiting default registration number feature.

The atc_id_enable = doesn’t work
By putting _ as a character, well, if you can’t tell that there’s an _ there, that works, but, it means you can’t have a registration call sign with ATC. Because they aren’t going to call you _

The only real way to turn off the Registration number on the outside of an aircraft these days is the panel.cfg hack. But, since the last few versions, you now need an associated panel.xml file with your panel.cfg, which, causes all kinds of issues in the cockpits at times if the paint hasn’t been updated with a panel.xml, and, well, we can’t have a panel.xml for premium planes unless we can figure out what it should be by guessing circuit numbers. It’s a mess. And, now, with the latest update, Asobo broke it further for the VL-3 and the Savage Cub, for which there’s another workaround that has to be implemented.

Oh. My. Goodness. I am sooooo glad I found this thread, this allowed me turn on a bunch of addon folders (using Addons Linker) at once after just looking for apostrophes. Fantastic!!!

Asobo absolutely needs to do a better job logging mod loading so we can more easily debug this kind of stuff - at the very least, an “invalid character in mod name” complaint would have saved everyone (including the OP) a ton of time.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.