Deleting BITMAPs results in segfault

Bug #568851 reported by Patrik Schönfeldt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hexwars
Won't Fix
Medium
Patrik Schönfeldt

Bug Description

The destructor of class GraphicSet (as well as GraphicSet::setGraphicSet) calls unLoadGraphics which deletes all BITMAPs. But this does not work — instead the game segfaults.

(gdb) info stack
#0 0x00007ffff7ae8b42 in destroy_bitmap () from /usr/lib/liballeg.so.4.2
#1 0x000000000040c21c in GraphicSet::unLoadGraphics (this=0x652c70) at src/shared/gui/allegro/GraphicSet.cpp:54
#2 0x000000000040afd1 in ~GraphicSet (this=0x652c70, __in_chrg=<value optimized out>) at src/shared/gui/allegro/GraphicSet.cpp:24
#3 0x000000000040f0f5 in main () at src/shared/gui/engine/Engine-Test.cpp:70

Related branches

Revision history for this message
Patrik Schönfeldt (bauer87) wrote :

I worked around this problems by setting unused BITMAP*s to NULL. Since all BITMAP*s are (re)defined later this should not be required but it helped with the problem. I consider not to fix it and to live with this solution.

Changed in hexwars:
importance: Undecided → Medium
status: New → Won't Fix
assignee: nobody → Patrik Schönfeldt (bauer87)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.