[AD] [ alleg-Bugs-3102497 ] al_destroy_sample crashes if sample still playing |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: noreply@xxxxxxxxxx
- Subject: [AD] [ alleg-Bugs-3102497 ] al_destroy_sample crashes if sample still playing
- From: "SourceForge.net" <noreply@xxxxxxxxxx>
- Date: Wed, 03 Nov 2010 22:33:56 +0000
Bugs item #3102497, was opened at 2010-11-04 08:56
Message generated for change (Comment added) made by tjaden
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3102497&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: Addons
Group: 4.9
Status: Open
Resolution: None
Priority: 9
Private: No
Submitted By: Trent Gamblin (trentg)
Assigned to: Nobody/Anonymous (nobody)
Summary: al_destroy_sample crashes if sample still playing
Initial Comment:
I didn't notice this problem until I started testing my game on Windows, specifically when compiling with MSVC. I'm reasonably confident that this is the cause of the crashes I was getting. The majority of them I fixed with a single al_stop_sample, and played for quite a while before getting the same (garbled) stack trace. I looked at the code (for the mini game) and it had the same pattern as the code I fixed before. So I'm reasonably sure that stopping the sample before destroying it is necessary.
----------------------------------------------------------------------
>Comment By: Peter Wang (tjaden)
Date: 2010-11-04 09:33
Message:
Yes, this is documented. This is really a bug in the user program, like
destroying a parent bitmap while a sub-bitmap still points to it, although
the user is less likely to make that mistake.
I have a slightly ugly patch that would stop sample instances
automatically, but there's a *very* rare corner case where the automatic
stopping behaviour might be unwanted. When you have two sample pointing to
the same underlying buffer; start two sample instances; destroy one of the
samples. Because the underlying buffer is the same, both sample instances
would be stopped... like I said, very rare case...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3102497&group_id=5665