Author Topic: Crashes on Multiplayer Joining  (Read 400 times)

0 Members and 1 Guest are viewing this topic.

Offline Lycake

Crashes on Multiplayer Joining
« on: September 05, 2017, 10:20:54 AM »
Hello,

unfortunately my buddies and I weren't able to get a 3 man multiplayer going. I was the host and had no issues throughout. The first client connects fine, but as soon as the second client connects, the first one crashes right after the "saving game" bar. This happens no matter who connects first and seems to be independent of the pak used (we tried Pak128.Britain and Pak64). No matter what we tried, we couldn't get more than 2 players playing together.

There are no error messages, just the standard windows "stopped working" message. Trying to log the error using the start parameters log and debug didn't work.

Debugging the crashed client with Visual Studio reveals the following exception: "Unhandled exception at 0x7563897A (msvcrt.dll) in simutrans.exe: 0xC0000005: Access violation reading location 0x00000000." Hello null pointer!

Anyone got any ideas how to get around this problem so I can get more than two people playing together?

Thanks for any help you might provide!

greetz,
Cake
« Last Edit: September 05, 2017, 11:10:04 AM by Lycake »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4247
  • Total likes: 175
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Crashes on Multiplayer Joining
« Reply #1 on: September 05, 2017, 11:46:12 AM »
Did the server crash? Do all three players use the same version of the program?
Parsley, sage, rosemary, and maggikraut.

Offline Lycake

Re: Crashes on Multiplayer Joining
« Reply #2 on: September 05, 2017, 01:18:11 PM »
No as I said I was host and had no issues. I didnt crash and could play fine. Even the second client that connected could play with me just fine. Just the client that was connected before crashed once the third player entered. The game went on normally. Would the player who just crashed reconnect, the other one would crash immediately.

little diagram maybe to make the situations more clear:

H = Host (me), A = Player 2, B = Player 3

H opens game: Game runs normal
A connects: Game runs fine with H and A playing
B connects: A crashes, otherwise game runs fine with H and B playing
A connects again: B crashes, otherwise game runs fine with H and A playing

I hope that clears it up what is happening.

We are all using the standard steam version and downloaded the paks through steam aswell. I am not sure which version number this is exactly atm, because Im not home, but we checked and all had the same one.

Offline TurfIt

Re: Crashes on Multiplayer Joining
« Reply #3 on: September 06, 2017, 12:00:12 AM »
Steam build clients do indeed crash when another client joins... no idea what that build has mangled.
Non-steam builds work properly.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4806
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: Crashes on Multiplayer Joining
« Reply #4 on: September 06, 2017, 05:55:40 AM »
If we knew where in msvcrt.dll it crashes, that might give a clue, but given the process specific address of 0x7563897A, it looks like it has been loaded at a non-standard address (which is a security feature these days). We would also have to know which exact version of msvcrt.dll it is. But it might be in a function that is called from a thousand different places.

Offline Lycake

Re: Crashes on Multiplayer Joining
« Reply #5 on: September 06, 2017, 06:01:48 AM »
Well at least I now know it's not a bug specific to me, but a general steam build problem. Also I can confirm that non steam builds work fine for me aswell.

Thanks for the help. I think this topic should be moved to the bug section instead of the help center ;)

Greetz,
Cake

Offline DrSuperGood

Re: Crashes on Multiplayer Joining
« Reply #6 on: September 06, 2017, 10:55:49 PM »
As far as I am aware there is only 1 developer of the steam build and he uses his own branch of the code which has many, steam required, differences from the main branch.

Although we all help him when we can, there are some minor communication problems when it comes to problems he is having and why. This is partly why SDL2 has seen some work recently.