Re: [AD] file loading

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


On 19 Apr 2009, at 16:27 , Evert Glebbeek wrote:
It's probably related to the assertions I'm getting:

Ok, maybe not. I don't know.

This is the problem I get:

al_install_system() tries to read the configuration file before initialising the system.
To read the configuration file, al_fopen() is called.
Because the file I/O interface is now a per-thread setting, al_fopen() calls into TLS to retrieve the file I/O driver. Because TLS is not initialised (on OS X) until the system has been initialised, the returned file I/O driver is NULL, triggering the assert.

There is also an associated problem of the TLS file I/O driver never being set on OS X, but the code aborts before it gets there. I'm going to work around the issue for the time being by simply returning a pointer to the stdio driver if TLS has not been initialised, but we should rethink the logic here.

Can we also go back to testing patches like this on ALL supported platforms before committing? Would have saved me half the afternoon.

Evert




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