"Failed to delete Buffers" - Error

Black'Tea

30-03-2008 18:28:00

Since I´ve updated (ca. 2 weeks ago), one of my sounds in my game produces a error. It´s strange, because befor it crashes, I can ca. 10 times create a sound with this soundfile and destroy it.

This is the way I destroy my sounds:
if (i->hitsound->isStopped() == true)
{
mSoundManager->destroySound(i->hitsound);
i->hitsound = NULL;
}


one of the errormessage in log:
OGRE EXCEPTION(40964:): Failed to delete Buffers, must still be in use.: OpenAL Error: There is no current context in OgreAL::Sound::~Sound

sounddetails:
705Kbit/s, 16 Bit, Mono, 44 kHz, PCM

Elenssar

23-04-2008 08:18:15

I'm having the same problem, same error in my log.

xen

23-04-2008 15:37:26

I wonder if the bugs reported in this and the previous threads are related.

I have the problem that playing the same sound twice crashes the program. The other people on the projects don't have the problem, it only seems to appear with my sound card.

OgreAL initialises fine:

16:25:09: *-*-* OgreAL Initialization
16:25:09: MovableObjectFactory for type 'OgreAL_Sound' registered.
16:25:09: MovableObjectFactory for type 'OgreAL_Listener' registered.
16:25:09: *-*-* Creating OpenAL
16:25:09: OpenAL Version: 1.1
16:25:09: Available Devices
16:25:09: -----------------
16:25:10: * SB Audigy 2 ZS Audio [C880]
16:25:10: * Generic Hardware
16:25:10: * Generic Software
16:25:10: Choosing: SB Audigy 2 ZS Audio [C880]
16:25:10: Supported Formats
16:25:10: -----------------
16:25:10: EAX 4.0 Detected
16:25:10: EFX Extension Found


When it plays a sound for the second time it crashes like this:

16:25:52: OGRE EXCEPTION(40964:): Failed to unqueue Buffers: OpenAL Error: There is no current context in OgreAL::Sound::unqueueBuffers
16:25:53: *-*-* OgreAL Shutdown
16:25:53: OGRE EXCEPTION(40964:): Failed to delete Buffers, must still be in use.: OpenAL Error: There is no current context in OgreAL::Sound::~Sound
16:25:53: OGRE EXCEPTION(40964:): Failed to delete Buffers, must still be in use.: OpenAL Error: There is no current context in OgreAL::Sound::~Sound
16:25:53: *-*-* Releasing OpenAL


Does anyone have an idea what could cause this?

xen

25-04-2008 11:45:52

I applied the patch suggested by stickymango here:

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=6905

Now it doesn't crash any more, but I get too many sounds.
I.e. when I play the sound the second time, it plays twice, the third time it plays three times, etc.

CaseyB, any idea what this could be? Why does it only fail on my soundcard and not on the hardware of the other team members?

I have a USB headset for skype. If I select that as the audio output device then it works. It only crashes on the Audigy 2 ZS device.

Gohla

26-04-2008 08:33:01

Same results here, it doesn't work on my main PC with a Creative X-Fi XtremeGamer. It does work on my other PC with some onboard soundcard, so I guess the problem is related to Creative hardware/drivers?

I tried some old X-Fi drivers, recent stable drivers and recent beta drivers but they all have the same problem.

xen

26-04-2008 09:45:45

That is interesting. I don't think I can blame the drivers since every other software I have works fine with that card. What is the difference between the Creative card and cheaper ones?

In the log ogreAL mentions that its finds EAX and EFX extentions. Can these be turned off, whatever they may be?

Elenssar

02-05-2008 06:14:53

Xen, I had the same problem before,

I wonder if the bugs reported in this and the previous threads are related.

I have the problem that playing the same sound twice crashes the program. The other people on the projects don't have the problem, it only seems to appear with my sound card.

OgreAL initialises fine:

Code:
16:25:09: *-*-* OgreAL Initialization
16:25:09: MovableObjectFactory for type 'OgreAL_Sound' registered.
16:25:09: MovableObjectFactory for type 'OgreAL_Listener' registered.
16:25:09: *-*-* Creating OpenAL
16:25:09: OpenAL Version: 1.1
16:25:09: Available Devices
16:25:09: -----------------
16:25:10: * SB Audigy 2 ZS Audio [C880]
16:25:10: * Generic Hardware
16:25:10: * Generic Software
16:25:10: Choosing: SB Audigy 2 ZS Audio [C880]
16:25:10: Supported Formats
16:25:10: -----------------
16:25:10: EAX 4.0 Detected
16:25:10: EFX Extension Found


When it plays a sound for the second time it crashes like this:

Code:
16:25:52: OGRE EXCEPTION(40964:): Failed to unqueue Buffers: OpenAL Error: There is no current context in OgreAL::Sound::unqueueBuffers
16:25:53: *-*-* OgreAL Shutdown
16:25:53: OGRE EXCEPTION(40964:): Failed to delete Buffers, must still be in use.: OpenAL Error: There is no current context in OgreAL::Sound::~Sound
16:25:53: OGRE EXCEPTION(40964:): Failed to delete Buffers, must still be in use.: OpenAL Error: There is no current context in OgreAL::Sound::~Sound
16:25:53: *-*-* Releasing OpenAL


Does anyone have an idea what could cause this?


I solved this in particular, setting the sound device to "Generic Software", but I couldn't by code (using SoundManager("Generic Software") ), I tested it changing it's value directly in the OgreAL library, I don't know why I cannot change it throught the SoundManager.
But still crashing when deleting after several plays.

Elenssar

02-05-2008 06:39:15

I found this thread

http://www.ogre3d.org/phpBB2addons/view ... hp?p=34136

where CaseyB said that the exception "Failed to delete Buffers, must still be in use." is not really a problem, it's only catched for information, but in my log, I got the crash after this exceptions and one more about binding:

11:25:37: OGRE EXCEPTION(40964:): Failed to delete Buffers, must still be in use.: OpenAL Error: There is no current context in OgreAL::Sound::~Sound
11:25:37: OGRE EXCEPTION(40964:): Failed to delete Buffers, must still be in use.: OpenAL Error: There is no current context in OgreAL::Sound::~Sound
11:25:52: OGRE EXCEPTION(40964:): Failed to bind Buffer: OpenAL Error: There is no current context in OgreAL::Sound::queueBuffers

So I gess the crash is produced when re-binding the buffer, isn't it?
If I understand the link's thread, this problem occurs when recreating a sound?
I checked the code, and I think the changes that CaseyB said in that thread are already done.
I'm a little confuse here, any ideas?... please.

xen

05-11-2008 20:08:09

I just wanted to report that my problems went away after a driver update.
I have a SB Audigy 2 ZS and Creative released new drivers recently.