program crashes on exit
shadyvillian

When I exit my program in the release build version only of it crashes. Heres what the debugger says:

#0 00000000 0x00447482 in ??() (??:??)
#1 00000000 0x004419e6 in ??() (??:??)
#2 00000000 0x004010db in ??() (??:??)
#3 00000000 0x00401158 in ??() (??:??)
#4 75513C45 KERNEL32!AcquireSRWLockExclusive() (C:\Windows\system32\kernel32.dll:??)
#5 776137F5 ntdll!RtlInsertElementGenericTableAvl() (C:\Windows\system32\ntdll.dll:??)
#6 776137C8 ntdll!RtlInsertElementGenericTableAvl() (C:\Windows\system32\ntdll.dll:??)
#7 00000000 0x00000000 in ??() (??:??)

Any Ideas?

Trent Gamblin

Compile with debug info enabled.

shadyvillian

Do you mean use the compiler flag -g?

Edgar Reynaldo

If you're using gcc or MinGW, yes, compile with the -g flag. Did you mean to say that it doesn't crash in debug mode?

shadyvillian

Well I guess you could say that it doesn't crash in debug mode. Why would it crash in release doesn't in just optimize it or something?

EDIT: Well after some computer troubles followed by reformat and reinstall of windows the debug and release versions are crashing on exit. But now the debugger says its crashing on a al_destroy_font. I comment it out now a al_destroy_bitmap its crashing. Long story short I comment all of them out and it works fine. What causes it to crash from that?

Edgar Reynaldo

Could be a couple of things :
1) You're destroying fonts / bitmaps more than once.
2) You're destroying fonts / bitmaps after allegro has shut down.

Thread #607699. Printed from Allegro.cc