Rockbox

Tasklist

FS#7245 - Simulator crashes with a segfault in action.c

Attached to Project: Rockbox
Opened by Steve Bavin (pondlife) - Friday, 01 June 2007, 10:58 GMT
Last edited by Steve Bavin (pondlife) - Wednesday, 01 August 2007, 09:12 GMT
Task Type Bugs
Category Simulator
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 0
Private No

Details

Recipe, for the H300 sim.
1) Clear settings. Restart sim.
2) Play a track from the filw browser.
3) Press SELECT to go from WPS to browser.
4) Prsss STOP to stop music playback

CRASH!
Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 3996.0x4d0]
0x00401334 in get_action_worker (context=???, timeout=???, get_context_map=???) at action.c:110
110 button = button_get_w_tmo(timeout);

There's not much backtrace to be seen:
(gdb) bt
#0 0x00401334 in get_action_worker (context=???, timeout=???, get_context_map=???)
at action.c:110
This task depends upon

Closed by  Steve Bavin (pondlife)
Wednesday, 01 August 2007, 09:12 GMT
Reason for closing:  Fixed
Comment by Steve Bavin (pondlife) - Friday, 08 June 2007, 09:35 GMT
A little bit more info; the crash occurs when get_action_worker() calls button_get_w_tmo() in line 113.
Comment by Nils Wallménius (nls) - Friday, 08 June 2007, 11:16 GMT
I tried to reproduce this but was unable to.

My h300 sim was built with gcc 4.1.2 for AMD64 and run in ubuntu.

I played an ogg vorbis file to test, did all the steps but no crash.
Comment by Steve Bavin (pondlife) - Friday, 08 June 2007, 11:34 GMT
I'm using gcc 3.4.4 under Cygwin - 32-bit FWIW. Totally reproducible; just pressing STOP when music is playing but the WPS is not displayed will do it.
Comment by Jens Arnold (amiconn) - Friday, 08 June 2007, 19:51 GMT
I tried to reproduce this bug on cygwin (gcc 3.4.4), debian-testing-x86 (gcc 4.1.2) and debian-unstable-amd64 (gcc 4.1.3 pre). The results are interesting:

- bug is reproducable on x86 sims, but not on amd64 sims (!)
- seems to be independent of audio file format (tried mp3 and ogg on x86 - just ogg on amd64 because of the known rockbox-libmad bug)
- seems to affect swcodec sims, but not hwcodec (tried h300 and sansa / archos recorder)

The backtrace on linux-x86, while not containing as many question marks, isn't much more helpful:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1221067856 (LWP 24221)]
0x08049898 in get_action_worker (context=Cannot access memory at address 0x8
) at action.c:113
113 button = button_get_w_tmo(timeout);
(gdb) bt
#0 0x08049898 in get_action_worker (context=Cannot access memory at address 0x8) at action.c:113
Cannot access memory at address 0x4
(gdb) print timeout
Cannot access memory at address 0xc

The "cannot access memory" messages are puzzling...
Comment by Jens Arnold (amiconn) - Friday, 08 June 2007, 21:51 GMT
Some more findings:

It doesn't always crash when stopping from outside the wps. So far I've been able to make it crash from the tree and the menu. Stopping from an audio control menu in a plugin (solitaire) wors fine.
It also doesn't crash when single-stepping the audio stop action in gdb... :/
Comment by Steve Bavin (pondlife) - Monday, 02 July 2007, 09:07 GMT
Possibly unrelated, but I can also reproduce a sim segfault by enabling/disabling crossfade during playback. I've attached my settings, just start playback then toggle crossfade between Always and Never.
Under GDB, this also gives no backtrace - just the following error:
Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 1672.0x1d7c]
SDL_mutexP (mutex=???) at SDL_sysmutex.c:90
90 SDL_sysmutex.c: No such file or directory.
in SDL_sysmutex.c
Comment by Steve Bavin (pondlife) - Wednesday, 01 August 2007, 07:54 GMT
OK, I have done the binary chop on SVN revisions and this problem was introduced by the playback.c changes in r13317.

http://svn.rockbox.org/viewvc.cgi/trunk/apps/playback.c?r1=13117&r2=13317&pathrev=14094

Loading...