Rockbox

Tasklist

FS#10814 - Crossfade crashes simulator

Attached to Project: Rockbox
Opened by Steve Bavin (pondlife) - Thursday, 26 November 2009, 12:30 GMT
Last edited by Steve Bavin (pondlife) - Thursday, 26 November 2009, 14:41 GMT
Task Type Patches
Category Music playback
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

Using the attached settings, an H300 simulator (r23757)

gdb gives the following output and backtrace::

Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 7016.0x113c]
0x004498dd in crossfade_mix_fade (factor=0, length=0, buf=0x0, out_sample=0x470fca8, out_chunk=0x470fca4)
at /home/Steve/rockbox/apps/pcmbuf.c:726
726 int16_t *output_buf = (int16_t *)((*out_chunk)->addr);

(gdb) bt
#0 0x004498dd in crossfade_mix_fade (factor=0, length=0, buf=0x0, out_sample=0x470fca8, out_chunk=0x470fca4)
at /home/Steve/rockbox/apps/pcmbuf.c:726
#1 0x00449c01 in crossfade_start () at /home/Steve/rockbox/apps/pcmbuf.c:857
#2 0x0044932d in pcmbuf_request_buffer (count=0x470fd08) at /home/Steve/rockbox/apps/pcmbuf.c:374
#3 0x0044a640 in codec_pcmbuf_insert_callback (ch1=0x10019ad4, ch2=0x1001acd4, count=623)
at /home/Steve/rockbox/apps/codec_thread.c:186
#4 0x10001b7c in codec_main () at /home/Steve/rockbox/apps/codecs/mpa.c:456
#5 0x10001d77 in codec_start () at /home/Steve/rockbox/apps/codecs/codec_crt0.c:50
#6 0x0044d6a7 in codec_load_ram (size=222865, api=0x47d060) at /home/Steve/rockbox/apps/codecs.c:232
#7 0x0044d813 in codec_load_file (plugin=0x488160 "mpa", api=0x47d060) at /home/Steve/rockbox/apps/codecs.c:273
#8 0x0044ad42 in codec_thread () at /home/Steve/rockbox/apps/codec_thread.c:492
#9 0x00464d2a in runthread (data=0x6c9ca0) at /home/Steve/rockbox/uisimulator/sdl/thread-sdl.c:468
#10 0x6bfb0adc in SDL_RunThread (data=0x30d3d50) at ../../../SDL-1.2.9/src/thread/SDL_thread.c:218
#11 0x6bfb0dd1 in RunThread (data=0x30d3d50) at SDL_systhread.c:44
#12 0x7c80b729 in KERNEL32!GetModuleFileNameA () from /cygdrive/c/WINDOWS/system32/kernel32.dll
#13 0x00000000 in ?? ()
This task depends upon

Closed by  Steve Bavin (pondlife)
Thursday, 26 November 2009, 14:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  Should be fine now.
Comment by Steve Bavin (pondlife) - Thursday, 26 November 2009, 12:42 GMT
I should add that this only happens on natural track change, not manal skip.
Comment by Steve Bavin (pondlife) - Thursday, 26 November 2009, 13:02 GMT
More info - it was introduced in r23628.
Comment by Steve Bavin (pondlife) - Thursday, 26 November 2009, 14:18 GMT
Here's a patch that fixes it, but I'm not sure if this is the correct fix or just a sticking plaster.
Comment by Jeffrey Goode (Blue_Dude) - Thursday, 26 November 2009, 14:38 GMT
My apologies. I thought that function tolerated a zero length input, but if it doesn't, this fix won't hurt anything. I'd go ahead and commit the patch. The whole function will probably be replaced in the not too distant future anyway so if the patch prevents crashes now, it's useful.

Loading...