strange error when running app

Hello,
I can compile and run an sfml 2 app just fine on raspbian but after compiling on diet pi I will sporadically get the following error when trying to run it.

  • failed to add service - already in use?
    AL lib: ReleaseALC: 1 device not closed.

Its sporatic though.
App will run 20 times then after a reboot start giving me the error.
Its an audio error related to openal but that is all I can gleam from the web.

Any ideas?

Thanks.

Hi Nitrogen,

I’ve personally never used the sfml2 library in Linux, only with Visual Studio/Windows using c++, so my knowledge of SFML in linux is limited.

I did a quick search for some things you might want to try:

* failed to add service - already in use?

http://www.instantsupportsite.com/self-help/raspberry-pi/raspberry-failed-service/
There are lots of references to the memory split in RPi causing this in GPU programs. Might be worth trying to increase GPU memory using dietpi-config > display options.

I can compile and run an sfml 2 app just fine on raspbian but after compiling on diet pi I will sporadically get the following error when trying to run it.

Dietpi is made with the official Raspbian image, it sounds like it may just be an issue with a missing package/libary or dev package due to missing dependencies in the RPi repo.
Bit of a long shot, but it might be worth checking dpkg -l and compare both package lists on Raspbian and DietPi (looking for openal libarys and versions etc).

I did a apt-cache search openal. Just double check these are installed:
libopenal-data
libopenal-dev
libopenal1

What language are your coding SFML2 with? if its Java, take a look at this:

Thats all i can think of at the minute for you to try. Let me know how you get on, would be nice to get to the bottom of this issue.

The memory thing could be it.
i’m using a 64/192 split on a rpib (256mb)
I think i got the error after I Installed Samba & proftp.
Maybe I need to up the swap because those services have taken away just enough to cause the problem?

I had that stuff turned off on raspbian & in fact never enabled it.
I also was using JWM but didn’t think I had to on diet pi because it was running fairly good.
I switched to diet pi because even though I could get rasbian down to low memory usage it was still taking up a good chunk of the SD with the install.

I’m not the coder for the app but it’s c++ I believe.
It’s actually the Attract Mode emulator front end & i’m testing it out on the rpi.

I’ll see if I can get this going again.
Thanks!

Hi Nitrogen,

You can check the memory/resource usage of your system by running:

  • htop
    Swap and memory usage are listed at the top.

You can change the swapfile size by running:

  • dietpi-config
  • Select Advanced Options
  • Select SwapFile Size

Hopefully that resolves it, let me know how you get on, or if the issue still occurs.

Imma dummy. :smiley:
I was only giving 16 mb to the GPU.
I put it back to 64 mb where I used to have it and I’m back in business.
I changed it somehow without realizing it.

Thanks and great distro.
The retro pi script is a nice touch.

Hi Nitrogen,

Great to hear you got the issue resolved!
DietPi defaults to 16mb GPU. If Kodi/RetroPie/Desktop are installed, this gets bumped up during install. You can always change it manually in dietpi-config > display options.

The retro pi script is a nice touch.

I cant take any credit for RetroPie as its not my work.
DietPi simply downloads the script for you and sets up folders and a few optimizations. The rest is down to the great work the RetroPie guys have done.

AHA!
so that’s why the GPU memory changed.
good to know.

Yeah I know you didn’t make retropi but just adding the script plus other things was a nice touch.
Also, further testing suggests I need more than 64MB for the GPU with certain roms so i’m tweaking that now. 256 MB doesn’t give me a lot of wiggle room.
The class 10 SD card I just got does make a noticeable difference though when it comes to dipping into swap.

Thanks again!