Deleting BITMAPs results in segfault

Bug #568851 reported by Patrik Schönfeldt on 2010-04-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hexwars
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

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  Edit
Everyone can see this information.

Other bug subscribers