Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
Why does isFinished() crash?

tjstreak123
Guest
Quote
2015-11-29 18:14:02

This is for C++

The code in question is:

irrklang::ISound *sound;
bool value = sound->isFinished();

Which leads to the program crashing with the code (0xC0000005). Return code is -1073741819.

Shouldn't isFinished() have a built in safe-check to make sure that it can do its job? I can't even find a way to tell if I can use isFinished() without crashing. Checking if sound is null does not matter and there is no built in function to check if sound is actually not empty

How do I make that function work? I mean it works fine if the sound is playing. But if I have an array filled with empty ISound objects and run through it to check for something it will crash at any point that it goes over an ISound pointer that is not loaded with a sound.


erik
Registered User
Quote
2015-11-30 04:25:44

The ISound object you are asking if it is finished is probably simply not existing anymore. You probably have dropped it. Don't call drop() to this object, if you still want to call another method on this later.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact