I’m writing a audio sampler on raspberry pi.
Everything works but i have this strange ‘segmentation fault’ error while loading GIF files.
So at first I used only SoundPlayer to play audio samples.
And sample loading taking super long time. ( s.loadSound(“sounds/s1.mp3”); )
When I was trying to load more than 7 samples (about 30 sec each/mp3) - i had an error. I don’t really remember the exact error but I thought it cause of the RAM. I thought so coz loading is taking really long time. i mean about 1-2min. I thought its just not enough memory but I also could be wrong and it could be something else. At that moment I didn’t’ find that error in google. I just decided to load less files coz it worked for my case.
But now I also trying to load some GIF files for animation with ofxGifDecoder. Everything work on OSX machine but on raspberry its taking also long time and after loading 6 audio files and 2 GIF files the app crashes with ‘Segmentation fault’.
Do you have any ideas?
I have Raspberry B+. and I installed raspbian and oF on my older one (B) and then just using the same SD card. Maybe I can reinstall Raspbian and recompile oF and it will give me more RAM or maybe it’s not related.
I really wanna know why I have this problem. If its only coz of the memory then Ill try to buy raspbery pi 2
Came across similar issues when building an openCV project. Allocated too much memory so Pi would seg fault, you could try and load fewer objects to begin with, then add them back in gradually finding at what point the seg fault happens. Otherwise you could increase the CPU RAM. How is the memory currently split?
you could try and load fewer objects to begin with, then add them back in gradually finding at what point the seg fault happens.
this is what i already did. i kinda loading as much as i can. 1 more file and i get seg fault.
How is the memory currently split?
i dunno) is there way to check that?
also im not sure that its a memory problem but could be. i’m loading .mp3 and .gif files but the library decoding them probably into something bigger. maybe which takes too much memory.
Otherwise you could increase the CPU RAM
how can i do that on RPi?
its written: How much memory should GPU have ?
and chosen 64
i switched to different values:
256, rebooted and could load even less files
128, rebooted and could load same amount of files but had message
AL lib : ALSAProc: mmap commit error: Broken pipe
and then seg fault
64 - same
32 - same
16 - nothing is working / there is message
ofAppEGLWindow: init(): X11 not available on RPI yet, using a native window instead
… window is not initialized