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

Loading savegame causes a crash. #5965

Closed
DorpsGek opened this issue Apr 3, 2014 · 8 comments
Closed

Loading savegame causes a crash. #5965

DorpsGek opened this issue Apr 3, 2014 · 8 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Apr 3, 2014

Wormnest opened the ticket and wrote:

Trunk r26438.
OS Windows 7 Home Premium 64 bits.

As soon as I try to load a certain older savegame it crashes. I have a savegame from about a year before this save that does not crash, let me know if it is needed. All the later ones do crash.
I tried one of the crashing saves also on 1.4.0 which also crashes.

Note i have trouble adding this task, I'm guessing it's timing out on the crash.dmp (6828 KB) uploading since I return to an empty new task window. Trying for now to add the task without crash.dmp.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5965
@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 3, 2014

Wormnest wrote:

Trying to add the crash.dmp.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5965#comment13193

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 3, 2014

planetmaker wrote:

Do you also have the savegame itself which causes the crash?


This comment was imported from FlySpray: https://bugs.openttd.org/task/5965#comment13194

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 4, 2014

Wormnest wrote:

Attached the last savegame that works and the first one that crashes on both trunk r26438 and 1.4.0.
Note that on 1.2.2 it doesn't crash. I currently don't have 1.3.x installed to test.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5965#comment13195

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 4, 2014

Brumi wrote:

I have a similar issue, both using r26443 and 1.4.0. These really old savegames (one from around 0.5.3-0.6 series or so, two from TTO) cause OpenTTD to crash, while 1.3.3 loads them just finely.
Maybe my files can be of some help. The crash files were generated during loading the Flonningley Transport.sav file.

EDIT: Other old savgames (including TTO ones) can be loaded properly even in 1.4.0.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5965#comment13196

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 4, 2014

planetmaker wrote:

from current trunk with Flonningley Transport.sav:

planetmaker@localhost:~/ottd/trunk$ gdb bin/openttd
GNU gdb (GDB) Fedora 7.6.50.20130731-19.fc20
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word".
..
Reading symbols from /home/planetmaker/ottd/trunk/bin/openttd...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/planetmaker/ottd/trunk/bin/openttd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe4e41700 (LWP 6170)]
[Thread 0x7fffe4e41700 (LWP 6170) exited]
[New Thread 0x7fffe4e41700 (LWP 6171)]
[New Thread 0x7fffbfffe700 (LWP 6172)]
[Thread 0x7fffbfffe700 (LWP 6172) exited]
[New Thread 0x7fffbfffe700 (LWP 6173)]
[New Thread 0x7fffbf7fd700 (LWP 6174)]
[Thread 0x7fffbfffe700 (LWP 6173) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00000000008177f9 in ShowNewGrfVehicleError(unsigned short, unsigned short, unsigned short, GRFBugs, bool) ()
Missing separate debuginfos, use: debuginfo-install SDL-1.2.15-12.fc20.x86_64 dbus-libs-1.6.12-8.fc20.x86_64 flac-libs-1.3.0-3.fc20.x86_64 freetype-2.5.0-5.fc20.x86_64 glibc-2.18-12.fc20.x86_64 gsm-1.0.13-10.fc20.x86_64 json-c-0.11-3.fc20.x86_64 libICE-1.0.8-6.fc20.x86_64 libSM-1.2.1-6.fc20.x86_64 libX11-1.6.1-1.fc20.x86_64 libXau-1.0.8-2.fc20.x86_64 libXcursor-1.1.14-2.fc20.x86_64 libXext-1.3.2-2.fc20.x86_64 libXfixes-5.0.1-2.fc20.x86_64 libXi-1.7.2-2.fc20.x86_64 libXrandr-1.4.1-2.fc20.x86_64 libXrender-0.9.8-2.fc20.x86_64 libXtst-1.2.2-2.fc20.x86_64 libasyncns-0.8-6.fc20.x86_64 libattr-2.4.47-3.fc20.x86_64 libcap-2.22-7.fc20.x86_64 libgcc-4.8.2-7.fc20.x86_64 libicu-50.1.2-10.fc20.x86_64 libogg-1.3.0-6.fc20.x86_64 libpng-1.6.3-3.fc20.x86_64 libsndfile-1.0.25-8.fc20.x86_64 libstdc++-4.8.2-7.fc20.x86_64 libuuid-2.24.1-1.fc20.x86_64 libvorbis-1.3.4-1.fc20.x86_64 libxcb-1.9.1-3.fc20.x86_64 lzo-2.06-5.fc20.x86_64 pulseaudio-libs-4.0-9.gitf81e3.fc20.x86_64 tcp_wrappers-libs-7.6-76.fc20.x86_64 xz-libs-5.1.2-6alpha.fc20.x86_64 zlib-1.2.8-3.fc20.x86_64
(gdb) bt
# 0 0x00000000008177f9 in ShowNewGrfVehicleError(unsigned short, unsigned short, unsigned short, GRFBugs, bool) ()
# 1 0x0000000000800dab in Train::ConsistChanged(ConsistChangeFlags) ()
# 2 0x000000000077034e in AfterLoadVehicles(bool) ()
# 3 0x0000000000751ad6 in AfterLoadGame() ()
# 4 0x0000000000764c05 in DoLoad(LoadFilter*, bool) ()
# 5 0x000000000076a5bb in SaveOrLoad(char const*, int, Subdirectory, bool) ()
# 6 0x00000000006f5191 in SafeLoad(char const*, int, GameMode, Subdirectory, LoadFilter*) ()
# 7 0x00000000006f539c in SwitchToMode(SwitchMode) ()
# 8 0x00000000006f65ef in GameLoop() ()
# 9 0x0000000000828624 in VideoDriver_SDL::MainLoop() ()
# 10 0x00000000006f4a0d in openttd_main(int, char**) ()
# 11 0x00007ffff428fd65 in __libc_start_main () from /lib64/libc.so.6
# 12 0x000000000055595d in _start ()


This comment was imported from FlySpray: https://bugs.openttd.org/task/5965#comment13197

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 5, 2014

cirdan wrote:

Commit r23860 changed the capacity of refitted default vehicles, rounding up instead of truncating. If you try to load a savegame older than r23860 where a default vehicle with an odd capacity is refitted to a lower capacity, the saveload code will cry foul because a vehicle is trying to change its capacity outside of a depot (due to rounding). And, since it is a default vehicle and has no newgrf information, the function that prints the error will segfault.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5965#comment13198

@DorpsGek
Copy link
Member Author

andythenorth closed the ticket.

Reason for closing: Unreproducible

Provided savegames load on 1.7.1.

Possibly the issue diagnosed by Cirdan (at end of comments) has been resolved. That's an assumption that I didn't check, don't take it as fact. No crashes here though in 1.7.1.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5965

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
@James103
Copy link
Contributor

Actually, some of the crashes can be reproduced, while others can't (as of 2449354):

  • Wormnest's crash.sav (initial comment) asserts in pool_type.hpp with index < this->first unused when you scroll near certain places (namely the towns of Bobetricht, Nieuw Spijksend, and other places) zoom out, or unpause the game.
  • Neither of the Drogewolde Transport savegames (either the 1st Jun or 5th Jul savegame) crash.
  • The Flonningley Transport savegame does not crash.
  • The (TTO) "Prindhead Cross Tr." savegame crashes with this log (Assertion failed at line 225 of d:\a\1\s\src\ground_vehicle.hpp: this->z_pos == GetSlopePixelZ(this->x_pos, this->y_pos)) on the first game tick after you load the savegame.
  • The (TTO) "Draningville Transport" savegame does not crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

2 participants