• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category User Interface
  • 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 DrSpud - 2006-10-15
Last edited by jdgordon - 2007-06-16

FS#6189 - 'Out of menus' error check

Both menu_run and menu_exit don’t check to see if they have been passed a valid menu slot. This causes a freeze/segfault if menu_find_free fails in an ‘Out of menus’ condition and no error checking is done on the result. This simple patch adds checks, though we’d probably want a visual error message displayed somewhere too.

Closed by  jdgordon
2007-06-16 13:00
Reason for closing:  Out of Date

Forgot about menu_show… Now prevents  FS#6010  from crashing :)

petur commented on 2006-12-10 22:26

no it doesn't

It does some really weird things if you try to reproduce  FS#6010 .
First hit the limit of 6 iterations, then press left to back out. Watch the screen go crazy.
Pressing left enough times eventually freezes my player.

WFM on iRiver H1x0. You were using 'out_of_menus_error_check2.patch', right? I know the first one didn't fix all the problems from an out of menus condition.

I suppose this patch isn't as necessary now (as long we make sure MAX_MENUS is big enough), since your patch fixed the cause that made the lack of checks a problem (thanks a lot for that, by the way). It doesn't add much to the code size, however…

petur commented on 2006-12-12 07:18

yes, I tried out_of_menus_error_check2.patch with  FS#6010  and it didn't fix that. It didn't crash due to too many recursions but just having one recursion was already enough to cause some internal corruption when going back down the call list (by pressing left)

Checking the return value is needed too with an error message, which is why I didn't close this entry yet ;)


Available keyboard shortcuts


Task Details

Task Editing