daniel-birket / audible-adventure

An accessible Adventure-like game & engine with a hybrid text & audio user interface.
GNU General Public License v3.0
3 stars 0 forks source link

PySDL2: Segmentation Fault When Not Running With sudo Privileges on Linux #5

Open lawrenceper opened 1 year ago

lawrenceper commented 1 year ago

Hi all,

This issue was created to address an issue with PySDL2 on Linux during my experimentation. The issue occures when a WAV file is trying to load. When pysdl.sdlmixer is loading an audio file without root privileges, it fails to load with a "segmentation fault" error. However, the issue does not occure when run with the propper permissions, E.G. sudo permissions. See /sandbox/SDL_AudioPlay/audio2.py.

I don't yet know if this issue occurs on other operating systems like Windows or Mac. Experimentation with /sandbox/SDL_AudioPlay/audio2.py on those operating systems would be greatly appreciated. I saw a post online that suggests to try installing PySDL2 without the "pip install" utility by putting the PySDL2 binaries in a custom folder (Nordeide, 2014). I may try that suggestion on a blank Raspbian installation in the future.

Does anyone have any other suggestions for a fix?

Thanks!

References

Nordeide, L.M., (2014, Feb 10). PySDL2: Playing a sound from a WAV file take two - using SDL2_mixer. Retrieved from https://larsnordeide.com/python/pysdl2-playing-a-sound-from-a-wav-file-with-sdlmixer.html