Re: [AD] al_stop/al_uninstall_timer later fails |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 21 April 2010 11:25, Trent Gamblin <trent@xxxxxxxxxx> wrote:
> On Tue, April 20, 2010 6:37 pm, Peter Wang said:
>> On 21 April 2010 08:15, Trent Gamblin <trent@xxxxxxxxxx> wrote:
>>> With my recent change to the AQueue driver, I noticed that when I manually call
>>> al_stop_timer and then al_uninstall_timer on a timer that was running, during
>>> al_uninstall_system it tries to destruct that timer again, resulting in a crash. Any
>>> more info you need I'd be happy to provide.
>>
>> I can't reproduce it with ex_timer.
>
> It looks like it's an intermittent error, and happens sometimes whether or not
> the timer is uninstalled.
>
> I get the following:
>
> Assertion failed: (found), function _al_unregister_destructor, file
> /Users/trent/4.9/iphone-xcode/../src/dtor.c, line 178.
Is it possible to get a backtrace?
> Running ex_stream_file with the AQueue driver (on iPhone).
>
> It doesn't happen every time, in fact out of 4 tries right now it happened once.
>
> It broke from revision 13288 to present (in aqueue.m), but I don't see the error. Is
> everything I'm doing thread safe? I've attached the difference for convenience:
It looks okay, other than the fact it's overkill :-P
You could just use (al_current_time() - last_time).
al_get_next_event() is non-blocking so checking al_event_queue_is_empty()
is redundant.
Peter