Re: [AD] file loading

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


On 19 Apr 2009, at 11:52 , Milan Mimica wrote:
Just wanted to point out that in current SVN, most (but not all) examples that
load a file fail at it.

$ ./ex_stream_file Rear_Center.wav
Voice created.
Mixer created.
Assert failed at line 76 of /home/mimix/Documents/4.9/src/file.c
Aborted

$ ./ex_gldepth
$ cat allegro.log | grep Error
Error loading `data/fixed_font.tga'


Examples that use mysha seem to work though.

It's probably related to the assertions I'm getting:

$ ./ex_bitmap
Assert failed at line 13 of /Users/eglebbk/Program/Allegro5/4.9/src/ file.c
Abort trap

This assertion triggers when al_fopen() is called while "al_get_new_file_interface()" returns NULL. I'm not sure what that means, but presumably it means that al_fopen() is called before Allegro has been initialised. Relevant backtrace from gdb:

#5 0x000fd22e in al_fopen (path=0x153b6c "allegro5.cfg", mode=0x152b36 "r") at /Users/eglebbk/Program/Allegro5/4.9/src/file.c:13 #6 0x000e4a40 in al_load_config_file (filename=0x153b6c "allegro5.cfg") at /Users/eglebbk/Program/Allegro5/4.9/src/config.c:343 #7 0x001145e8 in read_allegro_cfg () at /Users/eglebbk/Program/ Allegro5/4.9/src/system_new.c:134

I think Thomas' code had some logic in place to make the stdio driver work as default even before Allegro was initialised, but I'm not sure. I'm also not sure what change exactly broke this. Peter?

Evert




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