Assertion on save

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
User avatar
Maverick
Traffic Manager
Traffic Manager
Posts: 175
Joined: 08 Dec 2002 15:20
Location: West Ryde, Australia.
Contact:

Assertion on save

Post by Maverick »

Originally I believed this bug to be caused, or influenced, by bjarni's clone patch. After all, it was his patch that allowed me to reach this number of vehicles (thanks bjarni!).

Crash conditions: Create 10 ships from the ship depot to the south of where you first start (there are two ships already setup ready to clone from(or any other location), then save. It will assert on save.
OR
Create 3+ trains from the trains headed to the southern locations. I suggest you create them identically to the other trains running there, as these were the situations I created. On saving, an assertion will occur.

The savegame is below.
http://members.iinet.net.au/~cdebruyne/crashsave.rar



Suspects :
1. Simply the sheer number of vehicles
2. Too many trains/ships sharing a single set of orders
3. Savegame corruption

This savegame has been through nightlies 2144 through 2173. It has also been through various versions of the clone patch by bjarni.

Help? :(
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

1. Building 10 ships from Pruningstone Ship Depot - save ok
2. Just build 27 passanger wagons and save:

Code: Select all

openttd: saveload.c:129: SlWriteSimpleGamma: Assertion `i < (1 << 14)' failed.
Conclusions:
- it would've been nice to say what assertion you get
- it would also been nice to tell exactly what to do or buy...eg experiment a bit to find out what is causing the problem. Your description was at best pretty vague.

The current maximum vehicle count in the game is 16384. Actually it's a bit more tricky cause the moment you have a vehicle with v->index >= 16384 this will crash.
All vehicles include all shadows, effects, etc. etc. Also most likely this will not be fixed before 0.4.0 :( Just don't build so many vehicles :P

Culprit - too many vehicles
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
User avatar
Maverick
Traffic Manager
Traffic Manager
Posts: 175
Joined: 08 Dec 2002 15:20
Location: West Ryde, Australia.
Contact:

Post by Maverick »

Thanks DarkVater!

I'm kinda sad that it's the "end of the line" (boom boom tish), but hey.
Although a question : Why make the maximum number of trains 5'000 if the maximum vehicle limit is 16384? That's only 3.2 cars per train... :)

0.4.0 is coming with a fully variable vehicle limit yeah?
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

Darkvater wrote:Also most likely this will not be fixed before 0.4.0 :(
Ok, now read this again ;). The problem is in the saveload code, as you've noticed you can build a ton of vehicles without saving your game. Changing the saveload code to accomodate this is that much work that it's unplausible to do just before the release.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: Semrush [Bot] and 3 guests