Re: [AD] aRts "pure virtual function call" |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Selon tjaden@xxxxxxxxxx:
> If it's the same problem as the SVGAlib module, then your patch won't work.
After your explanation of the SVGAlib case, I checked: the problem is not the
same. After some tests, it appears the arts module is unloaded *after* the call
to remove_sound(). And I double checked, even if I disable module unloading for
arts, the crash still happens.
The problem is similar, though. Arts registers its own shutdown function with
atexit, and does so *after* allegro has registered allegro_exit with atexit
(because install_sound is called *after* allegro_init). The result is that when
the program ends, arts shuts itself down, and *then* allegro tries to
remove_sound(), making the program crash.
> The sound system could be shut down whilst leaving the module loaded in
> memory.
Yes, but I tried and unfortunately leaving the module in memory doesn't help.
Anyway, the patch I sent Works For Me (TM) :-). But it register itself again
with atexit every time the sound is installed. I can make it register itself
only once, but then it relies on the fact that arts itself registers itself only
once.
--
Julien Cugnière