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

Assertion v->time_counter !=0 failed when rearranging path signals #3422

Closed
DorpsGek opened this issue Dec 24, 2009 · 10 comments
Closed

Assertion v->time_counter !=0 failed when rearranging path signals #3422

DorpsGek opened this issue Dec 24, 2009 · 10 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

SirkoZ opened the ticket and wrote:

While playing the shiny new beta of 1.0 OpenTTD, this assertion didn't hold up. Pity as the game was going so well...
Anyhow - grf's used Oil Wells Only Decrease Neutraliser (and statically - Better Vehicle Names).
Also used NewGFX and NewSFX addons (work splendidly BTW).

Anyhow - at an Oil Rig (Flafinghill) when rearranging path signals and trains waiting (4 diesels) this assertion failure cropped up to my dismay. :-)
Anyways - I hope someone can sort it out.

Attached are the crash-related files.

Attachments

Reported version: 1.0.0-beta2
Operating system: All


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

Rubidium wrote:

Do you have a savegame from just before? Preferably one that's paused and where you only need to place/remove a signal to trigger it.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3422#comment7114

@DorpsGek
Copy link
Member Author

SirkoZ wrote:

I'm sorry but I don't have a recent save. You see, I usually have auto-save disabled and I usually forget to or simply do not save a running game till it's close to the end (2050/51).
However - because OpenTTD crash handling is so beautifully done now I can tell you exactly what I did (I said 'was changing signals' before...). On that marked spot I wanted to place
a one-way path signal in the opposite direction of the one that is already built in front of that station (for exiting the station from the station sign part) - then crash.

The only reason I was doing this is because if two trains were on the station they would have to wait (for free path). I know it's not the best design that intermediate station, but
I quickly did it and expected it to work somehow. :-)


This comment was imported from FlySpray: https://bugs.openttd.org/task/3422#comment7115

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Testcase

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3422#comment7122

@DorpsGek
Copy link
Member Author

SirkoZ wrote:

I have tried the test case and indeed - as soon as I start placing one way path signal there, assertion on line 1111 in economy.cpp fails.

Function 'static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)',
...
assert(v->time_counter != 0); <- this line. :-)

Thank you for your effort.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3422#comment7125

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 9, 2010

nsanity wrote:

Bug exists in 1.0.0-beta2


This comment was imported from FlySpray: https://bugs.openttd.org/task/3422#comment7305

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 9, 2010

Rubidium wrote:

Please attach the savegame (paused) with instructions where to exactly build a signal to reproduce this issue.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3422#comment7307

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 9, 2010

nsanity wrote:

Not really sure where to build the signal - was a Multi dedicated server game (and I wasn't playing). We ran the game from crash.sav and i'm told shortly after it unpauses it crashes again.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3422#comment7308

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 9, 2010

Rubidium wrote:

Then we have no information to fix the issue; the crash (assert) happens after the game has already been corrupted.

We'd like to put the assert somewhere to catch the actual bug, but if we did know where to put the assert we would have found where the bug is.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3422#comment7309

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 9, 2010

SirkoZ wrote:

You know - I tried it again with your fs3422.sav, Rubidium, and it instantly crashed when I tried to place a path-signal on that known/marked (in crash.png - attached) location. This was with 1.0.0 beta2.

However - very curious - when I tried the exact same thing (as in fs3422.sav) in multiplayer on some server that I wanted to see if it will crash/assert - nothing happened and many times - with different signals. This was still with 1.0.0 beta1 though.

I hope this helps some - oh and here are also the files for what happens with 1.0.0 beta2 and loading fs3422.sav + trying to place a path-signal.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3422#comment7310

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 9, 2010

Rubidium closed the ticket.

Reason for closing: Fixed

In r18764; again, already broken savegames aren't fixed by this.


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

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