FS#7772 - Sudoku: "Solve" Crash

Attached to Project: Rockbox
Opened by Paul (tritonman) - Thursday, 13 September 2007, 17:41 GMT
Last edited by Teruaki Kawashima (teru) - Wednesday, 16 December 2009, 12:00 GMT
Task Type Bugs
Category Games
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


Rockbox Version: r14655-070909
Player: Sansa e270

Whilst using the "Sudoku" plugin, if you generate a new Sudoku puzzle and then try and get the plugin to solve it, you get the following error:

Data abort
at 000497F0

The player totally hangs, forcing you to hold the power button for 10s to turn the power off.

Very nice app otherwise!
This task depends upon

Closed by  Teruaki Kawashima (teru)
Wednesday, 16 December 2009, 12:00 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in r24024
Comment by Jack Suter (chrisjs169) - Sunday, 16 September 2007, 19:17 GMT
Doesn't happen on my Sansa - Rockbox version is chrisjs169-070915 (custom build, but should be fine in official). Try updating Rockbox and see if it fixes it.
Comment by Paul (tritonman) - Sunday, 16 September 2007, 20:35 GMT
Have just installed the latest build (r14728-070916) and have succeeded in recreating the error. I generated a blank Sudoku grid, exited the app (saving the grid), opened the app (loading the grid), and then selected solve, which generated the same error with a different address: 000497BC

I also tried creating myself a new gird and putting in some random numbers (so the grid is still unsolvable), and this generated the same error, with the address I just gave above.
Comment by Jack Suter (chrisjs169) - Sunday, 16 September 2007, 21:45 GMT
Ok, that helped. Now I get data aborts both times. For clarification, "generate a new Sudoku puzzle" refers to selecting "New" and not "Generate". The address is different on my Sansa, but I'm using a custom build, so that is (to a degree) normal.
Comment by Paul (tritonman) - Monday, 17 September 2007, 00:46 GMT
Ah yes, sorry for the ambiguity!
Comment by Eliot (Yskyflyer) - Saturday, 23 August 2008, 05:13 GMT
I can reconfirm this bug still exists (iPod Video 60 Gig) r18335 clean install.
Full Workable puzzle on Wikipedia works, solves and does not crash.
First and last line only of WP puzzle, not a solvable my logic single solution puzzle, freezes instead of giving up.
Solution, don’t make unsolvable puzzles. There are 6,670,903,752,021,072,936,960* solutions to a blank page. Asking your iPod tryicky questions?

Good luck with Version 3.0 Thanks everyone for the wonderful firmware.
Comment by Johannes Linke (Jaykay) - Wednesday, 17 December 2008, 15:10 GMT
still exists in r19466.
Comment by Teruaki Kawashima (teru) - Sunday, 15 November 2009, 11:39 GMT
I made a fix for this issue.
the cause seems to be that function spawn_option() is called recursively and the function allocates some amount of memory in stack, results in run out the memory.
this patch gets rid of the current solve function and use one in generator.c. it dose no recursive call, in theory, it won't crash the player.
one thing i'm afraid of is that the sove function is less capable than current one in terms of solving puzzles.
as far as i tested on my gigabeat x, there is no crash and puzzles are solved properly.
so i think this is committable. but to make it sure, if anyone knows the solve function is good or not, please let me know.