Joining a server after leaving one causes odd behavior

Switching servers without restarting the game causes some issues to occur

Crash case (Impulse 99 → Transport Tycoon)
This is a sample case where we’ve gotten the same result with multiple tests on several systems by different players.

1. Client (production/canary) and FXServer version
Canary client 4210
FXServer 4121 b2189 (Tycoon)
FXServer (unknown) b2189 (Impulse)

2. What you expected to happen
The game should connect to the second server as it normally would just after launching the game.

3. What actually happens
Game crashes with burger-apart-gee (2.5 MB)

4. Category of bug (eg. client, server, weapons, peds, native)
Client

5. Reproducible steps, preferably with example script(s)

Other notable oddities
In cases where the client doesn’t crash we’ve noted the following occuring, but can’t 100% replicate or haven’t thoroughly tested it:

  • Certain streamed content like minimap.ytd's blip spritesheets not loading, showing the already loaded map blips instead (seems to occur if the player switched servers)
  • Spawn events fire multiple times in some cases when players re-join (albeit we do use vRP’s spawn events, but these are triggered by the default spawn event)
  • The client sometimes reports that the previous server’s resources are still loaded and enabled (when they shouldn’t be)

This class of issues is well-known, and mainly related to certain things people do not being used by R* in DLC in any way usually, and therefore not being reloadable.

A full game map reload is also usually not viable, since R* broke this somewhere in 2014, and restarting the game is extremely invasive as users will notice the game close and reopen and get fairly confused (and unlike with build changes, there’s no real way to alert the user without them going ‘this is dumb’), and since moving the game to reverse-game for everyone has been deemed too risky (many third-party apps, plugins and other tools would get extremely confused, and this may negatively affect odd configurations including gaming laptops) there’s no alternative non-invasive way to reinitialize the full game.

Common cases we’ve seen and sometimes (but as users make the weirdest mistakes, not necessarily always) fixed:

  • vehiclelayouts files with duplicate entries, or duplicating base game entries
  • other files with duplicate entries
  • hud.gfx/#td replacements (and similar), these are loaded before INIT_SESSION and never unloaded
  • etc.

Sadly, many cases of this are not reproducible at all as depending on the sequence of servers joined, different crashes and other weird things occur, and when it is reproducible, it’s usually only on servers where we do not have access to the resources on there or even any ability to join these servers without many-minute waits due to inefficient content loading.

In this particular case, a quick review:

Train metadata breakage. Is either of two servers using a custom level meta or other odd way to add/change trains?

I don’t think trains are usually specified in R* DLC so this might indeed be yet another R* leftover bug.

Intended. I’m not sure why this was done, I believe initial versions still did the usual post-load scene part, but that was then removed for game reloads likely as it’d crash more than usual.

As to ‘under the map’, I suspect this is another case where ‘the bridge scene’ is not transparent regarding game behavior during it, and it should be removed or replaced with another marker instead, as it did not serve its purpose of informing users the game has, in fact, finished loading.

Another case of AFTER_MAP_LOADED content. This is not an inherently supported scenario for reloading, and is yet another case of users having been given too much freedom rather than having formal replacement logic (expanding on the way ADD_REPLACE_TEXTURE works would’ve been a more viable way to do this).

‘Some cases’ do not a repro make. May be related to the concern below.

Same goes for ‘sometimes’. I suspect this might be more common if connection to the first server fails in an odd way, but since users be users there are so many failure scenarios that without someone recording (or replaying using instant replay functionality, or if lucky, sending client logs) their flow when this occurs it’s impossible to tell what happened.

Transport Tycoon is using a custom level meta for a bunch of stuff, including trains.
Impulse99 was being used as the other server by random chance and I have no clue what their content structure is. (The initial report used that server, hence why it was used for the tests)