crash
Opened this issue · 4 comments
Deleted user commented
INFOS: Imp #57 completes pick up job.
nov. 07, 2023 1:38:37 PM impcity.game.ui.Research addRoomResearch
INFOS: Mob researched 133 points, total is now 279580 limit is 80000
nov. 07, 2023 1:38:37 PM impcity.game.ImpCity main
GRAVE: java.util.ConcurrentModificationException
java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1597)
at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1620)
at impcity.game.ui.PartySelector.display(PartySelector.java:86)
at impcity.game.ui.GameDisplay.displayMore(GameDisplay.java:189)
at impcity.game.ImpCity.displayMore(ImpCity.java:308)
at impcity.ogl.IsoDisplay.render(IsoDisplay.java:266)
at impcity.ogl.IsoDisplay.run(IsoDisplay.java:671)
at impcity.game.ImpCity.run(ImpCity.java:263)
at impcity.game.ImpCity.main(ImpCity.java:346)
Varkalandar commented
This is bad. I have a rough idea how to solve it, but without knowing how to reproduce it, I can't promise the fix will actually work. I'll do my best though.
Deleted user commented
If I had any plausible hint at how to reproduce it, I would have given it, but the crash caught me off-guard, I didn't paid attention to what I did...
I posted this here "just in case" in the end, a stacktrace can be helpful to at least reduce the scope.
Varkalandar commented
The stack trace sure helped. A possible reason is a new creature arriving
just while the party selector iterated the creature list.
There is a suggested pattern to prevent this, iterate on a copy of the
list. I've applied this pattern now, so with some luck, this crash should
not happen in v0.26 anymore.
Morel Bérenger ***@***.***> schrieb am Di., 7. Nov. 2023,
20:10:
… If I had any plausible hint at how to reproduce it, I would have given it,
but the crash caught me off-guard, I didn't paid attention to what I did...
—
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOZTXX4S7OWYCP2DLAMELRLYDKBUDAVCNFSM6AAAAAA7BDY5W2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJZGYZTSNJTHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
Varkalandar commented
I hope I could fix this in v0.26 but since I could not reproduce it, I had no way to test if the fix actually works. I'll keep this issue open and see if more reports come in.