crash when calling "al_reserve_samples"
frafra800

Hi, in my pc when i start my allegro program it crash with segmentation fault when i call the allegro function "al_reserve_function(1);". In other pc it doesn't happen then i have read the code of this function and it crash when try it "if(_al_kcm_driver->allocate_voice(voice) != 0)" then the problem can be caused by the audio driver. How i can check this?

I have Ubuntu 14.04 and i use codeblocks.

Thanks.

beoran

Do you call al_install_audio properly and check it's return value before calling al_reserve_samples? If al_install_audio returns false for some reason, you can't use any audio functions.

frafra800

yes, the problem is in al_install_audio, i tryed to install libpulse-dev but don't work... and thanks for the answer :)

beoran

Do you compile Allegro yourself? You could paste a copy of the make output here, perhaps that will bring more clarity...

frafra800

I use codeblocks, in the build log there aren't problems, what i can do to post more informations?

beoran

I assume audio otherwise works correctly on that computer? Could you try the audio-related Allegro examples and see if they work or not? If not, it may be an Allegro bug.

Dizzy Egg

Try setting the default mixer BEFORE reserving samples, something like:

frafra800

The problem is the al_install_audio(), it return always false also in a simple project.
Declaring first the mixer the problem persist.

Dizzy Egg

Ahh ok sorry - have you installed these?

libogg-dev
libvorbis-dev
DUMB

SiegeLord
beoran said:

Do you compile Allegro yourself?

This is the important question to be answered. Ubuntu is basically the best supported platform for Allegro, so it all should just work assuming Allegro was built/installed properly.

EDIT: I should also say, that for starting, I'd recommend using our PPA: https://wiki.allegro.cc/index.php?title=Install_Allegro_from_Ubuntu_PPAs

frafra800

nothing, the problem persist... ??????
I try to format and install ubuntu 15.04.

SiegeLord

Well, fwiw I use Ubuntu 14.04 and I have no problems :P.

frafra800

Problem solved! I have installed the 15.04 version.;D

beoran

Most likely is was a driver problem then? Too bad we couldn't figure it out. But anyway, good to hear it works for you now.

Thread #615393. Printed from Allegro.cc