Author Topic: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".  (Read 2252 times)

0 Members and 1 Guest are viewing this topic.

Offline 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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4812
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #1 on: August 28, 2016, 07:26:32 AM »
Maybe this is another bug in the wake of the waypoint change.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4247
  • Total likes: 175
  • Helpful: 149
  • Languages: EN, DE, AT
Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #2 on: August 28, 2016, 02:58:26 PM »
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.

Offline DrSuperGood

Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #3 on: August 28, 2016, 03:23:59 PM »
Quote
Is 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?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4812
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #4 on: August 28, 2016, 07:31:53 PM »
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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4247
  • Total likes: 175
  • Helpful: 149
  • Languages: EN, DE, AT
Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #5 on: August 29, 2016, 12:49:09 PM »
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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4812
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #6 on: August 29, 2016, 04:49:33 PM »
I do not see any bad effects if nextnextpos == get_pos.

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

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.

Offline DrSuperGood

Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #7 on: August 29, 2016, 10:16:32 PM »
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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4812
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #8 on: August 30, 2016, 05:20:32 AM »
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.

Offline DrSuperGood

Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #9 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.

Offline River

Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #10 on: August 30, 2016, 08:48:37 AM »
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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4812
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #11 on: August 30, 2016, 02:07:51 PM »
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.

Offline DrSuperGood

Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #12 on: August 30, 2016, 03:02:15 PM »
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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4247
  • Total likes: 175
  • Helpful: 149
  • Languages: EN, DE, AT
Re: [120.1.3] Assertion failed simvehicle.cc "nextnext_pos != get_pos()".
« Reply #13 on: September 11, 2016, 12:50:18 PM »
I turned this assertion into an error message with r7865
Parsley, sage, rosemary, and maggikraut.