Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: MarcGuay on March 22, 2008, 09:57:16 AM

Title: VMWare: Segmentation Fault - Simulator chokes on audio
Post by: MarcGuay on March 22, 2008, 09:57:16 AM
Howdy,

I've been trying to build a simulator with logf() enabled to hunt down a playback.c bug and have run into a small problem.  I'm using VMWare with the RB image.  Everything works fine until I try to play a sound file and at that point I receive a "Segmentation Fault" message and the simulator ends.  I did some research and it appears this is because I don't have the proper SDL files for sound output, but the VMWare installation page states that the image includes "libsdl-dev (for the simulator)", so perhaps that's not the issue.  Any ideas?

Title: Re: VMWare: Segmentation Fault - Simulator chokes on audio
Post by: Domonoky on March 22, 2008, 11:39:22 AM
You could check if other soundoutput works in the vm.
I have heard of others, that had the same problem, and they didnt had a (virtual) soundcard in the vm :-)

greets
Title: Re: VMWare: Segmentation Fault - Simulator chokes on audio
Post by: MarcGuay on March 22, 2008, 03:12:21 PM
Any suggestions on how to test the sound?  I tried the "speaker-test" command recommended in another thread here but I guess it's not a function provided by the debian image.  (I should state at this point, perhaps, that I have no experience with linux).  I tried changing the line:

sound.virtualDev = "es1371" to sound.virtualDev = "sb16"

in the .vmx file because I have a soundblaster, not ensonic, sound card but that didn't do a thing.  Unfortunately I can play sound in the windows environment while VMWare is running, which seems to me a bad sign that VMWare hasn't been given control of the soundcard.  

Anyone have the experience and patience needed to help a brother out?
Title: Re: VMWare: Segmentation Fault - Simulator chokes on audio
Post by: nls on March 24, 2008, 11:49:20 AM
I get the same segfault here if I try to play anything with the sim in the VM _if_ logged on as 'user' if I log in as root all is fine so it seems like some kind of permission problem...

EDIT: I managed to fix it here, run the following as root:

Code: [Select]
usermod -G audio user
to add the user 'user' to the audio group.
Title: Re: VMWare: Segmentation Fault - Simulator chokes on audio
Post by: MarcGuay on March 24, 2008, 12:39:08 PM
Thanks chum!  Working nicely now after a few VM reboots and undoing some of the "maybe this'll make it work" change I made.  Now for the fun stuff... :)
Title: Re: VMWare: Segmentation Fault - Simulator chokes on audio
Post by: Travis on May 16, 2008, 01:41:19 AM
I get the same segfault here if I try to play anything with the sim in the VM _if_ logged on as 'user' if I log in as root all is fine so it seems like some kind of permission problem...

EDIT: I managed to fix it here, run the following as root:

Code: [Select]
usermod -G audio user
to add the user 'user' to the audio group.

Thanks, nls, fixed it. =)  Those new to linux -- Be sure to enter the "su" command before this (the password is 'rockbox' and this isnt needed if you are logged in as root), then you may run the usermod command. A restart of the virtual machine is necessary before this takes affect.  Re-login for the changes to take affect.
Title: Re: VMWare: Segmentation Fault - Simulator chokes on audio
Post by: gevaerts on May 16, 2008, 03:37:12 AM
A restart of the virtual machine is necessary before this takes affect.

Where did you find that (entirely wrong) information ? You just need to log in again
Title: Re: VMWare: Segmentation Fault - Simulator chokes on audio
Post by: Travis on May 16, 2008, 04:57:16 AM
A restart of the virtual machine is necessary before this takes affect.

Where did you find that (entirely wrong) information ? You just need to log in again

How is it entirely wrong? It worked for me.  Just trying to add a little bit more info on the subject for those (like myself) who are unfamiliar with linux.  Logging in would be faster, im sure, but it took me under 30 seconds to restart the VM.
Title: Re: VMWare: Segmentation Fault - Simulator chokes on audio
Post by: cool_walking_ on May 16, 2008, 05:32:55 AM
If you had just said "One way to effect the change is to restart the virtual machine" it would have been factual, but you said it "is necessary".