BrokenRegistry / Rotp-Fusion

Other
22 stars 4 forks source link

Fix java.lang.IllegalStateException: Duplicate key null #15

Closed dHannasch closed 12 months ago

dHannasch commented 12 months ago

I can reproduce the crash using the attached duplicateKeyNull.zip (which I took the liberty of renaming) by re-enabling the option.

The crash does not happen on this branch.

(I'm still a little concerned that I have no theory for why the crash happens in this particular situation; looking at the code it's obvious that a crash can sometimes happen, but it seems like the crash should only happen when there's a fleet with multiple ships that lack ShipViews, whereas it seems like all the visible ships here should have ShipViews. Hrm.)

BrokenRegistry commented 12 months ago

AI may duplicate design, which caused the crash... I fixed it by keeping the first, then I read your PR and replaced it with your sum solution! a build is ongoing.