HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Bug #824099
path_finding assert '1 << (8 * sizeof(node1->cost_to_here[dir])) > cost + 2' failing
0%
Description
With units with "Coast" unit type flag in play, I got bunch of '1 << (8 * sizeof(node1->cost_to_here[dir])) > cost + 2' assert failures from path finding."Coast" units on large maps -> problem also in stable branches?
cost_to_here is a unsigned char array, meaning cost values can be 255 at max. That sounds like a low limit. Maybe there's a problem even with non
History
#1
Updated by Marko Lindqvist over 1 year ago
Failing assert is not caused by too small storage (though I still think it's a bug, and raised separate Bug #824102 about it), but an extremely large cost value that is being assigned there. I'm debugging where that value comes from.
#2
Updated by Marko Lindqvist over 1 year ago
- File 0049-PF-Handle-FC_INFINITY-move-cost-in-fuel-maps.patch 0049-PF-Handle-FC_INFINITY-move-cost-in-fuel-maps.patch added
- Status changed from In Progress to Resolved
- Sprint/Milestone set to 2.6.1
The extremely high cost value is FC_INFINITY from tile_move_cost_ptrs(), indicating that all the move points are spent on that move. The only case where it's currently used is when disembarking from transport and slow_invasion is on.
Handling of that case attached.
For NEWS: This was in fuel map handling, so affected path finding only when fuel was in play (though in the particular case where this was first found it was the transport of the amphibious move that had fuel, and disembarking was performed by the cargo of the same amphibious move, i.e., they were not the same unit)
#3
Updated by Marko Lindqvist over 1 year ago
- Status changed from Resolved to Closed
- Assignee set to Marko Lindqvist