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

Crash upon loading saved game from #5570 #7577

Closed
James103 opened this issue May 10, 2019 · 1 comment
Closed

Crash upon loading saved game from #5570 #7577

James103 opened this issue May 10, 2019 · 1 comment

Comments

@James103
Copy link
Contributor

@James103 James103 commented May 10, 2019

Version of OpenTTD

1.9.1

Expected result

The game loads and simulates normally.

Actual result

The game immediately and always crashes on load with this log. The savegame comes from #5570, but the crash may be unrelated to that issue.

Steps to reproduce

Load the saved game "Bloggs & Co., 01-05-2273.sav" attached inside the zip file.

@glx22
Copy link
Contributor

@glx22 glx22 commented May 10, 2019

Call stack from loading in 1.9.1:

>	openttd.exe!AfterLoadLinkGraphs() Ligne 236	C++
 	openttd.exe!AfterLoadGame() Ligne 3109	C++
 	openttd.exe!DoLoad(LoadFilter * reader, bool load_check) Ligne 2685	C++
 	openttd.exe!SaveOrLoad(const char * filename, SaveLoadOperation fop, DetailedFileType dft, Subdirectory sb, bool threaded) Ligne 2792	C++
 	openttd.exe!SafeLoad(const char * filename, SaveLoadOperation fop, DetailedFileType dft, GameMode newgm, Subdirectory subdir, LoadFilter * lf) Ligne 1019	C++
 	openttd.exe!SwitchToMode(SwitchMode new_mode) Ligne 1108	C++
 	openttd.exe!GameLoop() Ligne 1475	C++
 	openttd.exe!VideoDriver_Win32::MainLoop() Ligne 1275	C++
 	openttd.exe!openttd_main(int argc, char * * argv) Ligne 868	C++
 	openttd.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Ligne 443	C++
 	[Code externe]	

It's trying to access a not existing station when updating linkgraph.

When loading in master it triggers

assert(index < this->first_unused);

>	openttd.exe!common_assert_to_message_box<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Ligne 388	C++
 	openttd.exe!common_assert<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Ligne 424	C++
 	openttd.exe!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Ligne 444	C++
 	openttd.exe!Pool<Object,unsigned int,64,16711680,1,0,1>::Get(unsigned __int64 index) Ligne 113	C++
 	openttd.exe!Pool<Object,unsigned int,64,16711680,1,0,1>::PoolItem<&_object_pool>::Get(unsigned __int64 index) Ligne 249	C++
 	openttd.exe!Object::GetByTile(unsigned int tile) Ligne 55	C++
 	openttd.exe!GetObjectType(unsigned int t) Ligne 66	C++
 	openttd.exe!IsObjectType(unsigned int t, unsigned short type) Ligne 29	C++
 	openttd.exe!GetSlopePixelZ_Object(unsigned int tile, unsigned int x, unsigned int y) Ligne 415	C++
 	openttd.exe!GetSlopePixelZ(int x, int y) Ligne 349	C++
 	openttd.exe!RemapCoords2(int x, int y) Ligne 102	C++
 	openttd.exe!ViewportSignKdtreeItem::MakeTown(unsigned short id) Ligne 2186	C++
 	openttd.exe!RebuildViewportKdtree() Ligne 2239	C++
 	openttd.exe!AfterLoadGame() Ligne 564	C++
 	openttd.exe!DoLoad(LoadFilter * reader, bool load_check) Ligne 2683	C++
 	openttd.exe!SaveOrLoad(const char * filename, SaveLoadOperation fop, DetailedFileType dft, Subdirectory sb, bool threaded) Ligne 2790	C++
 	openttd.exe!SafeLoad(const char * filename, SaveLoadOperation fop, DetailedFileType dft, GameMode newgm, Subdirectory subdir, LoadFilter * lf) Ligne 1011	C++
 	openttd.exe!SwitchToMode(SwitchMode new_mode) Ligne 1095	C++
 	openttd.exe!GameLoop() Ligne 1456	C++
 	openttd.exe!VideoDriver_Win32::MainLoop() Ligne 1266	C++
 	openttd.exe!openttd_main(int argc, char * * argv) Ligne 862	C++
 	openttd.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Ligne 444	C++
 	[Code externe]	

Trying to access a not existing object.

Maybe the savegame is broken.

PeterN added a commit to PeterN/OpenTTD that referenced this issue May 10, 2019
@PeterN PeterN closed this in 83c1678 May 10, 2019
michicc added a commit to michicc/OpenTTD that referenced this issue Jun 30, 2019
douiwby added a commit to douiwby/OpenTTD that referenced this issue Apr 16, 2020
spnda added a commit to spnda/OpenTTD that referenced this issue Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants