Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by xaviergr - 2006-05-18
Last edited by xaviergr - 2006-05-19

FS#5384 - Bugfix #4908 & minesweeper rework

This is a patch that will solve reported bug #4908 and extends (a little) the plugin.
The following are added:

1) Center the board on all platforms (instead of always starting at 0,0).
2) Bugfix various logical paths that could lead to unexpected behaviour.
3) Added mine icon.
4) Unveil the whole board when the player loses or wins. (can easily be extended to be a solver, like sudoku)
5) Make options change repeteadly when you are holding the button.
6) Replace recursive function ‘discover()’ with a cascade algorithm that prevents stack overflow on big screens.

The task blocks this from closing
ID Project Summary Priority Severity Assigned To Progress
4908 Rockbox  FS#4908 - Stack overflow in minesweeper  Very Low Low
100%
Closed by  linuxstb
2006-05-20 14:01
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Committed to CVS, thanks.

It is strange that no-one has reported this yet, but minesweeper uses a recursive function (discover(), which calls it self up to 8 times) that will make all targets with big screen to crash with a stack overflow error.

This can be reproduced if you start the game on a full board but you reduce mines down to 2%.
This way discover() is called so many times that a stack overflow error occurs.

Even with this patch I can’t think of an alternate solution. Any advices?

new patch!

Do what I did woth Xobox… I used there 3 recursive functions
one after the other…at first it crashed every single time
but after I made a counter matrix and reverted the recursion to a stack (with push and pop)
it stopped crashing even on ipod5g which has the largest screen of all

Ok new patch.

Finally I managed to replace the recursive function with a normal one.
No more overflows on big screens.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing