Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplayer crash #8649

Open
rpwjanzen opened this issue Feb 6, 2021 · 8 comments
Open

Multiplayer crash #8649

rpwjanzen opened this issue Feb 6, 2021 · 8 comments

Comments

@rpwjanzen
Copy link

@rpwjanzen rpwjanzen commented Feb 6, 2021

Version of OpenTTD

1.10.3

Steps to reproduce

Unsure if these steps will reproduce the issue. Can try again if requested. I have attached the 3 crash files to the issue.

  1. Spectate on reddit OpenTTD server 1
  2. Let game idle
  3. Come back to computer later when primary monitor has powered off (unsure if related)
  4. Game has crashed

OpenTTD crash.zip

@James103
Copy link
Contributor

@James103 James103 commented Feb 6, 2021

Are you able to download a save game from Reddit OpenTTD server 1 before it resets? If so, can you post that downloaded save game here to see if it will crash?

@rpwjanzen
Copy link
Author

@rpwjanzen rpwjanzen commented Feb 6, 2021

How would I do that?

I have now attached the result of saving the game after re-joining. I also made a backup of the entire save folder before. I did not perform an "Emergency Save". Is there anything else I should do?

GameStop GME, 2001-02-05.zip

@James103
Copy link
Contributor

@James103 James103 commented Feb 6, 2021

At the very least, always perform an emergency save if possible after each crash and attach the resulting savegame.

@rpwjanzen
Copy link
Author

@rpwjanzen rpwjanzen commented Feb 6, 2021

I will do that in the future. I was not aware that that was a recommended step for reporting crashes. Since I was only spectating, I did not care if the game state was preserved locally.

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented Feb 6, 2021

I've had the above savegame running for more than 13 game years now with no crash in sight. (Note, that's running it in singleplayer, joined to the first company. I don't know if it will be different in multiplayer as a spectator.)

@rpwjanzen
Copy link
Author

@rpwjanzen rpwjanzen commented Feb 6, 2021

I have attached the most recent autosave from before the crash. The save is from Feb 1st, the crash occurred on the 7th as per screenshot. I could not reproduce the crash when loading the saved game (in single player).
maybe-crash.zip

@erenes
Copy link

@erenes erenes commented Feb 8, 2021

According to a crash analysis by DebugDiag with with the PDB of 1.10.3, the crash happens here:
https://github.com/OpenTTD/OpenTTD/blob/1.10.3/src/vehicle.cpp#L977

Because of:

OPENTTD!CALLVEHICLETICKS+26C
In crash.dmp the assembly instruction at openttd!CallVehicleTicks+26c in C:\Program Files\OpenTTD\openttd.exe has caused an access violation exception (0xC0000005) when trying to read from memory location 0x04000011 on thread 0

If my experience with other languages is an indicator, it could be a line earlier as well, because the IP is not super reliable in a crash situation.

I'm not good at after the fact diagnosing this in the OpenTTD code base, but perhaps it saves the devs some time :)

@glx22
Copy link
Contributor

@glx22 glx22 commented Feb 13, 2021

Full call stack

>	[Cadre en ligne] openttd.exe!VehicleCargoList::AgeCargo() Ligne 384	C++
 	openttd.exe!CallVehicleTicks() Ligne 977	C++
 	openttd.exe!StateGameLoop() Ligne 1430	C++
 	openttd.exe!ClientNetworkGameSocketHandler::GameLoop() Ligne 268	C++
 	openttd.exe!NetworkGameLoop() Ligne 997	C++
 	openttd.exe!GameLoop() Ligne 1509	C++
 	openttd.exe!VideoDriver_Win32::MainLoop() Ligne 1264	C++
 	openttd.exe!openttd_main(int argc, char * * argv) Ligne 861	C++
 	openttd.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Ligne 442	C++
 	[Code externe]	

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants