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

Savegame loading fails with assert #2134

Closed
DorpsGek opened this issue Jul 7, 2008 · 2 comments
Closed

Savegame loading fails with assert #2134

DorpsGek opened this issue Jul 7, 2008 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jul 7, 2008

michi_cc opened the ticket and wrote:

Loading of http://www.openttdcoop.org/blog/files/memberzone_archive/MemberZone_11_Final.sav fails with the following assert using r13680:

oldpool.h(125): assert(index < this->GetSize());

openttd.exe!_wassert(const wchar_t * expr=0x00000001401e83a0, const wchar_t * filename=0x00000001401e83e0, unsigned int lineno=0x0000007d) Line 337 C
openttd.exe!OldMemoryPool::Get(unsigned int index=0x0000ffff) Line 125 + 0x29 bytes C++
openttd.exe!GetEngine(unsigned int index=0x0000ffff) Line 11 + 0x31 bytes C++
openttd.exe!RailVehInfo(unsigned short e=0xffff) Line 70 + 0xa bytes C++
openttd.exe!TrainPowerChanged(Vehicle * v=0x0000000004771af0) Line 131 + 0x11 bytes C++
openttd.exe!SettingsDisableElrail(int p1=0x00000000) Line 502 C++
openttd.exe!AfterLoadGame() Line 1963 C++

This is because AfterLoadVehicles() clears v->u.rail.first_engine and InitializeVehicleCaches() is not called before SettingsDisableElrail() is called. Was likely broken by r13678.

Reported version: trunk
Operating system: All


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

DorpsGek commented Jul 7, 2008

Rubidium wrote:

Got to love it... TrainConsistChanged can't be called before SettingsDisableElrail but must be called before SettingsDisableElrail...

Calling it before SettingsDisableElrail causes inrepairable changes in the vehicle states, i.e. desyncs... and not doing so causes assertions...


This comment was imported from FlySpray: https://bugs.openttd.org/task/2134#comment4440

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 8, 2008

Rubidium closed the ticket.

Reason for closing: Fixed

In r13681.


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

@DorpsGek DorpsGek closed this as completed Jul 8, 2008
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
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

1 participant