[AD] [ alleg-Bugs-2907435 ] Destroying samples while they're playing crashes

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Bugs item #2907435, was opened at 2009-12-02 23:11
Message generated for change (Settings changed) made by tjaden
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2907435&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 4.9
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Peter Wang (tjaden)
Assigned to: Nobody/Anonymous (nobody)
Summary: Destroying samples while they're playing crashes

Initial Comment:
Reported by Trent on AD:

"I noticed this on the iphone, not sure if it affects other platforms. I fixed it by adding
al_stop_sample calls before destroying any samples that have been played. I couldn't really find
the root of the problem though. kcm_audio is still swimming in my head, I don't fully understand
it. Just reporting here for reference (Or maybe someone can fix it...)."

----------------------------------------------------------------------

>Comment By: Peter Wang (tjaden)
Date: 2010-03-11 23:52

Message:
I guess this crash was because al_destroy_sample() was called while a
sample *instance* was still playing that sample. But there could be any
number of sample instances referring to that sample, and we would need some
way to find them. So it's the user's responsibility to stop them; often
al_stop_samples() will do. Added a comment in the docs.

Yes, I just made the same mistake.


----------------------------------------------------------------------

Comment By: Peter Wang (tjaden)
Date: 2009-12-07 10:20

Message:
I couldn't reproduce it on Linux.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2907435&group_id=5665




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/