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...":https://support.plan.io/news/187
Bug #853295
closedS3_0/master may try to sell same cargo unit multiple times
0%
Description
While investigating Bug #853107 I noticed difference in S2_6 and later branches that seem to me like a regression in later branches, but maybe I just don't understand the changed code. I've not gone through git history yet, but the change has probably been part of Sveinung's unit removal action enablers work.
sell_random_unit() and callers maintain list of units ('punitlist') that are candidates for selling. Multiple units might get sold, if that's required to reach healthy balance.
We try not to sell transport (and lose cargo in the side) when selling just some cargo would be sufficient. That's done by recursive call to sell_random_unit() with just the cargo units as the punitlist.
After that recursive call S2_6 removes sold unit from the original punitlist, but later branches do not. In S3_0/master it remains as a candidate for selling, if more units need to be sold. Picking it again would presumably result in a crash as already freed unit structure is accessed.
Files
Updated by Marko Lindqvist about 2 years ago
- Assignee set to Sveinung Kvilhaugsvik
Updated by Marko Lindqvist over 1 year ago
- File 0048-Never-double-sell-a-unit-for-balancing-budget.patch 0048-Never-double-sell-a-unit-for-balancing-budget.patch added
- Status changed from New to Resolved
- Assignee changed from Sveinung Kvilhaugsvik to Marko Lindqvist
Updated by Marko Lindqvist over 1 year ago
- Status changed from Resolved to Closed