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

Multistop assertion #101

Closed
DorpsGek opened this issue Apr 6, 2006 · 7 comments
Closed

Multistop assertion #101

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

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Apr 6, 2006

Celestar opened the ticket and wrote:

assertion in ClearSlot. (rs->num_vehicles != 0). Apparently we have a slot loss somewhere. I suspect this is due to the fact that vehicles that are broken down still age their slot which leads to crap. Have a diff that fixes it. Also, upon loading old games, we now compute num_vehicles upon load.

http://www.tt-forums.net/viewtopic.php?t=24396

Reported version: 0.4.7
Operating system: All


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

DorpsGek commented Apr 6, 2006

Celestar wrote:

New diff

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/101#comment169

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 8, 2006

Celestar wrote:

Now recalculating the number of vehicles. This doesn't find the source of this problem but I really have no explanation why this happens.
ingame, we have place where the number of vehicles is decremented, and this is also the only place where u.road.slot is set to NULL. This smells like a buffer overflow to me somewhere :(


This comment was imported from FlySpray: https://bugs.openttd.org/task/101#comment180

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 8, 2006

Darkvater wrote:

Savegame in question


This comment was imported from FlySpray: https://bugs.openttd.org/task/101#comment182

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 9, 2006

ledow wrote:

I submitted the original report (sorry about it being in the forum but I couldn't find my SourceForge id and didn't know this FlySpray thing even existed... anyway...) and this is a serious problem. It's extremely difficult to get through a game where AT ANY TIME you've created a multistop road vehicle station (whether you delete it, keep it or remove all but one station square, whether you actually HAVE any road vehicles at all or you have some). This is latest SVN (4335).

I'm crap at TTD, I just like playing it, but I frequently extend the reach of a station by one or two squares using multistop... even if I build a station square, build one next to it, then delete the original square, I still get crashes WITHOUT any road vehicles whatsoever, when I've not built a single road vehicle at all. There is a savegame attached... crashes with a slightly different error openttd: station_cmd.c:1423: RemoveRoadStop: Assertion `cur_stop->num_vehicles == 0' failed. on 31st Dec. every time with latest SVN (created and played with only a single SVN version of OpenTTD). The only road station I have is in Lower Trindham, next to the Oil Refinery. There hasn't been a single road vehicle built by me at any point in that game.

In the last two weeks, I've started about 8 games and all but one of them ended with an assert on this problem, whether under "cur_stop" or "rs" - the only other one I didn't build ANYTHING but trains and train stations.


This comment was imported from FlySpray: https://bugs.openttd.org/task/101#comment186

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 9, 2006

Celestar wrote:

This seems to happen preferably for the AI. I wonder whether it removes vehicles in some weird way. Still working on it


This comment was imported from FlySpray: https://bugs.openttd.org/task/101#comment189

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 9, 2006

Celestar wrote:

This one happened when the AI got bankrupt, because DeleteVehicle does not remove the slot


This comment was imported from FlySpray: https://bugs.openttd.org/task/101#comment190

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 9, 2006

Celestar closed the ticket.

Reason for closing: Fixed


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

@DorpsGek DorpsGek closed this as completed Apr 9, 2006
@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