chrisboyle / sgtpuzzles

Android port of Simon Tatham's Puzzles
https://chris.boyle.name/puzzles
Other
584 stars 166 forks source link

[Black Box] Crash on "show solution" (but not on green dot "check solution") #650

Closed gbesacier closed 3 months ago

gbesacier commented 4 months ago

With this specific savefile/state, Black Box.sgtp.txt, when the user clicks on "show solution" in either the checkboard menu or the ? menu, the game crashes. When the user clicks on the green dot to check the solution, the game does not crash and the player's guess turns out to be correct.

gbesacier commented 4 months ago

Logcat says it's a native crash:

Abort message: '/puzzles/midend.c:2135: const char midend_solve(midend ): assertion "!wrongly_claimed_completion" failed'

chrisboyle commented 3 months ago

Thank you! It looks like this would happen whenever you click "show solution" in Black Box with all the correct balls already placed, and the assertion was just bogus, so I've removed the assertion. This fix will be in the next release.

gbesacier commented 3 months ago

You're right, it seems to do it every time the solution is correct now. But it used to not be the case. Black Box can have non-unique solution, and I was always using "show solution" to try to find additional solutions with more or less balls then the "official" solution