I accepted this bug now because I´m also getting it in a savegame now ;) My backtrace is identical to yours, so it seems this happens quite often.
The new shipping algorithm workflow seems really strange to me: As far as I can see, the general idea is that a ship will unload wares/workers if its next destination is far out of the way, and it will pick up items where the next destination either the item´s destination or if the destination is "favourable" regarding the item´s actual destination, whatever that means...
Lots of times, a ShippingItem (that´s a wrapper for a WareInstance) will have no destination set (why?) but the Ware it contains has a portdock as its next destination (how???), in which case the ware is unloaded and promptly re-added (as I described in the merge request).
The author of the new algorithm left a TODO that the existence of ShippingItems without a destination should be prevented, and that´s where a true fix would need to start. I don´t know that code nearly well enough to do that though :(
Fortunately this is not in build 20. I feel safe to compare our great new ship-scheduling with our great new anti-congestion algorithm in some regards...
I accepted this bug now because I´m also getting it in a savegame now ;) My backtrace is identical to yours, so it seems this happens quite often.
The new shipping algorithm workflow seems really strange to me: As far as I can see, the general idea is that a ship will unload wares/workers if its next destination is far out of the way, and it will pick up items where the next destination either the item´s destination or if the destination is "favourable" regarding the item´s actual destination, whatever that means...
Lots of times, a ShippingItem (that´s a wrapper for a WareInstance) will have no destination set (why?) but the Ware it contains has a portdock as its next destination (how???), in which case the ware is unloaded and promptly re-added (as I described in the merge request).
The author of the new algorithm left a TODO that the existence of ShippingItems without a destination should be prevented, and that´s where a true fix would need to start. I don´t know that code nearly well enough to do that though :(
Fortunately this is not in build 20. I feel safe to compare our great new ship-scheduling with our great new anti-congestion algorithm in some regards...