Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashed with error #5

Closed
goraph opened this issue Mar 22, 2024 · 3 comments
Closed

App crashed with error #5

goraph opened this issue Mar 22, 2024 · 3 comments

Comments

@goraph
Copy link

goraph commented Mar 22, 2024

App crashed, log looks like below. Version is coltwi-2.10. Save game attached
game1.zip

Turn 14 (#10 Moudjahidine) <<<


FLN is up (2nd eligible, 14 resources)
Command (fln or ?): fln


FLN chooses: Rally

FLN executes Rally operation: Tunisia
Decrease FLN resources by -1 to 13
Exception in thread "main" java.lang.AssertionError: assertion failed: Insufficent pieces in the available box
at scala.Predef$.assert(Predef.scala:279)
at coltwi.ColonialTwilight$.placePieces(ColonialTwilight.scala:1640)
at coltwi.Bot$.placeGuerrillas(Bot.scala:178)
at coltwi.Bot$ConsiderRally$.doRallies$1(Bot.scala:992)
at coltwi.Bot$ConsiderRally$.execute(Bot.scala:1005)
at coltwi.Bot$.evaluateNode$1(Bot.scala:1673)
at coltwi.Bot$.act(Bot.scala:1679)
at coltwi.ColonialTwilight$BotCmd$.$anonfun$action$4(ColonialTwilight.scala:2223)
at coltwi.ColonialTwilight$BotCmd$.$anonfun$action$4$adapted(ColonialTwilight.scala:2223)
at coltwi.ColonialTwilight$.resolveEventCard(ColonialTwilight.scala:2409)
at coltwi.ColonialTwilight$.mainLoop(ColonialTwilight.scala:2177)
at coltwi.ColonialTwilight$.main(ColonialTwilight.scala:1989)
at coltwi.ColonialTwilight.main(ColonialTwilight.scala)

@sellmerfud
Copy link
Owner

In Turn 10, you performed a Garrison operation and moved two French Police from Constantine to Constantine. The code did not detect that the source and destination were the same and thus added two French police to Constantine even though there were none available. This created a discrepancy with the internal bookkeeping of available pieces.

Later in turn 13 when the FLN tried to rally this discrepancy caused an assertion to fail.
The code now detects this situation and does not add the "phantom" police cubes.
Download Version 2.11 to get the updated code.

You can continue your game in progress with the new version:
Copy your game directory coltwi-2.10/games/game1 to coltwi-2.11/games/game1
Then edit the file coltwi-2.11/games/game1/turn-13 (it is a JSON file)
Change line 718 from:

          "frenchPolice": 5,

to

          "frenchPolice": 3,

This will remove the two phantom police cubes that were added.
Then you should be good to go.

Thanks for reporting the issue and sorry about the inconvenience.

@sellmerfud
Copy link
Owner

Fixed.

@goraph
Copy link
Author

goraph commented Mar 22, 2024

Wow, thank you! I really send two police from Constantine to Constantine by mistake, but never through it will cause such issues. Thanks a lot, it was very quick! Can confirm, it fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants