Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: iPodFoo on December 24, 2007, 02:55:41 PM

Title: Vanilla svn simulator gives segmentation faults
Post by: iPodFoo on December 24, 2007, 02:55:41 PM
Ive been out of the loop for a while and havent updated my rockbox for over 6 months. So I thought Id download the latest svn, latest debian image and compile etc without any patches just to check it compiles ok which it does but the simulator crashes whenever I play a track.

This is the error report from gdb starting at the point I select the m3u playlist:

Code: [Select]
We open the real file 'archos/.rockbox/.playlist_control'
We open the real file 'archos/Bichi - Notwithstanding/Bichi - Notwithstanding.m3
u'
We open the real file 'archos/Bichi - Notwithstanding/01-bichi-layers_of_generat
ion_without_number.mp3'
We open the real file 'archos/Bichi - Notwithstanding/01-bichi-layers_of_generat
ion_without_number.mp3'
We open the real file 'archos/Bichi - Notwithstanding/01-bichi-layers_of_generat
ion_without_number.mp3'
We open the real file 'archos/Bichi - Notwithstanding/01-bichi-layers_of_generat
ion_without_number.mp3'
Header: fffb9064, Ver 0, lay 3, bitr 128, freq 44100, chmode 1, mode_ext 2, emph
 0, bytes: 417 time: 1280/49
Xing/Info header
Header: fffb9064, Ver 0, lay 3, bitr 128, freq 44100, chmode 1, mode_ext 2, emph
 0, bytes: 417 time: 1280/49
We open the real file 'archos/Bichi - Notwithstanding/01-bichi-layers_of_generat
ion_without_number.mp3'
We open the real file 'archos/Bichi - Notwithstanding/01-bichi-layers_of_generat
ion_without_number.mp3'
We open the real file 'archos/.rockbox/codecs/mpa.codec'
We open the real file 'archos/.rockbox/nvram.bin'
We open the real file 'archos/.rockbox/nvram.bin'
We open the real file 'archos/Bichi - Notwithstanding/02-bichi-in_the_parallax_o
f_your_gaze_vivid.mp3'
We open the real file 'archos/Bichi - Notwithstanding/02-bichi-in_the_parallax_o
f_your_gaze_vivid.mp3'
Header: fffb9044, Ver 0, lay 3, bitr 128, freq 44100, chmode 1, mode_ext 0, emph
 0, bytes: 417 time: 1280/49
Xing/Info header
Header: fffbc044, Ver 0, lay 3, bitr 224, freq 44100, chmode 1, mode_ext 0, emph
 0, bytes: 731 time: 1280/49
We open the real file 'archos/Bichi - Notwithstanding/02-bichi-in_the_parallax_o
f_your_gaze_vivid.mp3'
We open the real file 'archos/Bichi - Notwithstanding/03-bichi-wait_for_the_howl
_of_the_city.mp3'
We open the real file 'archos/Bichi - Notwithstanding/03-bichi-wait_for_the_howl
_of_the_city.mp3'
Header: fffb9064, Ver 0, lay 3, bitr 128, freq 44100, chmode 1, mode_ext 2, emph
 0, bytes: 417 time: 1280/49
Xing/Info header
Header: fffba064, Ver 0, lay 3, bitr 160, freq 44100, chmode 1, mode_ext 2, emph
 0, bytes: 522 time: 1280/49
We open the real file 'archos/Bichi - Notwithstanding/03-bichi-wait_for_the_howl
_of_the_city.mp3'

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16386 (LWP 9465)]
0x080a5398 in remove_from_list_l (list=0x8199c80, thread=0xa20d8f0)
    at thread-sdl.c:229
229         thread->l.prev->l.next = thread->l.next;
(gdb) bt
#0  0x080a5398 in remove_from_list_l (list=0x8199c80, thread=0xa20d8f0)
    at thread-sdl.c:229
#1  0x080a5892 in _wakeup_thread (tq=0x8199c80) at thread-sdl.c:443
#2  0x080a3cdf in wakeup_thread (tq=0x8199c80) at thread.h:527
#3  0x080a3468 in queue_post (q=0x8199c80, id=1, data=0) at kernel.c:355
#4  0x08095e8e in backlight_off () at backlight.c:616
#5  0x08095dde in backlight_tick () at backlight.c:546
#6  0x080a37d1 in sim_tick_tasks () at kernel.c:521
#7  0x080a5b85 in tick_timer (interval=10, param=0x0) at uisdl.c:82
#8  0x4007372e in SDL_ThreadedTimerCheck () from /usr/lib/libSDL-1.2.so.0
#9  0x40073c3a in SDL_Delay () from /usr/lib/libSDL-1.2.so.0
#10 0x40072a1b in SDL_RunThread () from /usr/lib/libSDL-1.2.so.0
#11 0x40072c2f in SDL_KillThread () from /usr/lib/libSDL-1.2.so.0
#12 0x400cac51 in pthread_start_thread () from /lib/libpthread.so.0
#13 0x400cadb4 in pthread_start_thread_event () from /lib/libpthread.so.0
#14 0x401d134a in clone () from /lib/libc.so.6
(gdb)

When I try and play any music file, it doesnt matter what format it is, it says:

Code: [Select]
We open the real file 'archos/Ogg_Quality5.ogg'

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 32771 (LWP 9681)]
0x40
(gdb) bt
#0  0x4002cac0 in SDL_RateDIV2 () from /usr/lib/libSDL-1.2.so.0
#1  0x57e58955 in ?? ()
#2  0x10ec8356 in ?? ()
#3  0x0f08558b in ?? ()
#4  0x8b0c45b7 in ?? ()
#5  0x4589104a in ?? ()
#6  0x0fce89f4 in ?? ()
#7  0x83f445b6 in ?? ()
#8  0x840f08f8 in ?? ()
#9  0x0000007c in ?? ()
#10 0x7410f883 in ?? ()
#11 0x187a8b3c in ?? ()
#12 0x558bf889 in ?? ()
#13 0x1fe8c108 in ?? ()
#14 0xd138048d in ?? ()
#15 0x184289f8 in ?? ()
#16 0x4050428b in ?? ()
#17 0x8b504289 in ?? ()
#18 0x85288274 in ?? ()
#19 0x830775f6 in ?? ()
#20 0x5f5e10c4 in ?? ()
#21 0x558bc35d in ?? ()
#22 0x245489f4 in ?? ()
---Type to continue, or q to quit---q
Quit

Any ideas whats going on? To me it looks like a problem with the libSDL. Does Debian need to be updated? I got mine from the rockbox site so assumed it would be ok.

I cant update my build without the simulator working as I need to update my wps's. Thanks for any help.
Title: Re: Vanilla svn simulator gives segmentation faults
Post by: Hans-Martin on January 10, 2008, 03:29:24 AM
I've got the same problem (with Ubuntu).
The suspect is clearly /usr/lib/libSDL-1.2.so.0, but I don't know where to begin debugging.

Cheers,
Hans-Martin
Title: Re: Vanilla svn simulator gives segmentation faults
Post by: rosco_pc on January 10, 2008, 05:46:32 AM
Not sure if it is the same issue, but I also had problems with the simulator running under Ubuntu (hanging or segfaults):
http://forums.rockbox.org/index.php?topic=14028.0

Try to see if you have to much crap left over from previous updates in you homedir.

Title: Re: Vanilla svn simulator gives segmentation faults
Post by: Hans-Martin on January 11, 2008, 01:14:19 PM
Yay, I found the cause of the problem.

My .asoundrc was somewhat broken, so that ALSA did not work.
The SDL lib could not be opened, but Rockbox (almost) silently ignored the error (there was a single line "Could not open audio:" within a lot of other debugging output.
Later calls to SDL functions using the (not opened) SDL structure caused the crash.

So my advice is to get the ALSA config right before trying to let rockboxui run.
One good test is "speaker-test -c 2" which will play white noise through the loudspeakers.

Cheers,
Hans-Martin
Title: Re: Vanilla svn simulator gives segmentation faults
Post by: iPodFoo on January 11, 2008, 01:34:17 PM
I never did get the ALSA to work before in debian in vmware, before recently it would play but in a kind of paused state.

Is there a proper tutorial for setting ALSA up?

Ill give it another go though, thanks for confirming.
Title: Re: Vanilla svn simulator gives segmentation faults
Post by: Hans-Martin on January 11, 2008, 02:16:42 PM
I got the knack of it by reading http://wiki.ubuntuusers.de/.asoundrc

Beware, it's in german!

Most helpful was the hint that if your sound card does not have a hardware mixer, you can configure ALSA to do the mixing, but the automatic tools (asoundconf) do not seem to do this for you.

I would attach my (working) .asoundrc which just contains the example settings given on that web page, but the forum software tells me the upload folder is full. Maybe the forum admins should check...
Title: Re: Vanilla svn simulator gives segmentation faults
Post by: AlexP on January 11, 2008, 02:22:48 PM
We have a stupidly small amount of space available for attachments (something like 10mb), so if you could host it elsewhere it'd be very helpful.
Title: Re: Vanilla svn simulator gives segmentation faults
Post by: Hans-Martin on January 11, 2008, 02:38:16 PM
Well it's just the examples on that page cut&pasted together, so it does not make much sense to host that file anywhere.
Title: Re: Vanilla svn simulator gives segmentation faults
Post by: iPodFoo on January 11, 2008, 05:22:33 PM
Tried to follow these instructions to get alsa on debian. http://www.larsen-b.com/Article/87.html. No luck. Wouldnt 'make', get errors.

Installing stuff in linux is such a b*tch.  >:(