News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

[120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".

Started by DrSuperGood, August 28, 2016, 02:49:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DrSuperGood

This assertion seems to be failing fairly frequently, but not reliably, on one of River's server. The assertion is located in vehicle/simvehicle.cc at line 1007.

From what I can tell the assertion will fail if a cached path features a next tile the same as the current tile. What type of line is causing this I do not know as there are no stack traces of when it occurred. The server features heavy usage of ships, air, rail, monorail and road vehicles. A lot of water routes were subjected to obstruction due to massive wide scale terraforming. Additionally some airports are very busy and receive dozens of aircraft a minute.

More info can be obtained from here.

Ters

Maybe this is another bug in the wake of the waypoint change.

Dwachs

Is there a savegame, where this can be reliably reproduced?

Also I do not see what this assertion is guarding. Maybe it can be removed?
Parsley, sage, rosemary, and maggikraut.

DrSuperGood

QuoteIs there a savegame, where this can be reliably reproduced?
No there is not such a save game unfortunately and there does not seem to be any correlation to observations when it crashes. It just seems to occur frequently but at different times on River's server. He has reported it has crashed his sever game at least 3 times over the last week, which mostly rules out it being a random crash and hence warrants a bug report.

Quote
Also I do not see what this assertion is guarding. Maybe it can be removed?
Possibly infinite loop protection? Or maybe for testing some pathing algorithm?

Ters

If it is protection again infinite loops in the routing, it is a bit oddly placed. While replacing the assert with either a return bd or a return NULL might cause no fatal effects down the line, there is still the question of what causes this strange situation that it doesn't like in the first place.

Dwachs

I do not see any bad effects if nextnextpos == get_pos. Imho this line can be removed. It was added in totally unrelated commit (ADD: compass on map, r7682). It looks like some unintended change slipped in.
Parsley, sage, rosemary, and maggikraut.

Ters

Quote from: Dwachs on August 29, 2016, 12:49:09 PM
I do not see any bad effects if nextnextpos == get_pos.

No, but I don't see any valid case for it either.

Quote from: Dwachs on August 29, 2016, 12:49:09 PM
It was added in totally unrelated commit (ADD: compass on map, r7682). It looks like some unintended change slipped in.

Could perhaps be a part of r7669 that "missed the first bus", but the connection is very weak.

DrSuperGood

Quote
No, but I don't see any valid case for it either.
The assertion is failing, quite a bit on the one server game, so something must be causing it.

Ters

Well, that is obvious. I just would like to know what and why. Even if the assert was committed by accident, nothing indicates that it wasn't written for a particular purpose, even if it may have been a fleeting one. And a route looping back on itself, even if finitely, is not something I expect. And why only this server? I don't like curing symptoms without knowing the cause (although curing only the symptoms when the cause is known is worse). There are too many questions lacking answers.

DrSuperGood

Mabey swap out the assert for a log on fail? A useful log might provide insight into the cause of the condition, or at least narrow it down.

River

The server hasn't crashed in 2 day's now, it could be something that is caused by a player action that hasn't been done yet in this save game. With the server getting quiet it might be awhile before it shows up again.

If you want to test this on the server let me know because i would like to restart it soon as people are done with this map. i will keep a save file of the save if its need later.

Ters

Quote from: DrSuperGood on August 30, 2016, 05:36:40 AM
Mabey swap out the assert for a log on fail? A useful log might provide insight into the cause of the condition, or at least narrow it down.

Sounds like a good idea.

DrSuperGood

Quote
If you want to test this on the server let me know because i would like to restart it soon as people are done with this map.
The reason the server went quiet is because the announcement server has gone down so unless they enter your IP and port numbers directly, no one can find it. This is a problem with the announcement server and not your server.

Dwachs

Parsley, sage, rosemary, and maggikraut.