Pressing delete to self-destruct while ship has armour causes a segfault.

Issue #93 resolved
VoxelStorm Bug Submitter created an issue

Submitted by Norgg from IRC (~norgg on norgg.org)

Comments (5)

  1. Norgg
    Program received signal SIGSEGV, Segmentation fault.
    std::list<entity::armour*, std::allocator<entity::armour*> >::remove (this=0x3fe3a90, __value=@0x7fffffffdd18: 0x3fe4c90) at /usr/include/c++/5/bits/list.tcc:291
    291       ++__next;
    (gdb) bt
    #0  std::list<entity::armour*, std::allocator<entity::armour*> >::remove (this=0x3fe3a90, __value=@0x7fffffffdd18: 0x3fe4c90) at /usr/include/c++/5/bits/list.tcc:291
    #1  0x000000000045aff8 in entity::ship::base::remove_armour (this=<optimised out>, thisarmour=thisarmour@entry=0x3fe4c90)
        at /home/norgg/gamedev/sphereface/entity/ship/base.cpp:73
    #2  0x0000000000417add in entity::armour::~armour (this=0x3fe4c90, __in_chrg=<optimised out>) at /home/norgg/gamedev/sphereface/entity/armour.cpp:38
    #3  0x0000000000417af1 in entity::armour::~armour (this=0x3fe4c90, __in_chrg=<optimised out>) at /home/norgg/gamedev/sphereface/entity/armour.cpp:40
    #4  0x0000000000495c28 in sphere::clean_destroyed (this=this@entry=0x3f5a1c0) at /home/norgg/gamedev/sphereface/sphere.cpp:322
    #5  0x0000000000498485 in sphere::update (this=0x3f5a1c0) at /home/norgg/gamedev/sphereface/sphere.cpp:305
    #6  0x00000000004c7103 in universe::update (this=this@entry=0x3a49d60 <root>) at /home/norgg/gamedev/sphereface/universe/universe.cpp:542
    #7  0x00000000004b5ccc in universe::loop_main (this=this@entry=0x3a49d60 <root>) at /home/norgg/gamedev/sphereface/universe/loop_main.cpp:19
    #8  0x00000000004b3c4d in universe::loop_dispatcher (this=this@entry=0x3a49d60 <root>) at /home/norgg/gamedev/sphereface/universe/loop_dispatcher.cpp:12
    #9  0x000000000048344f in main () at /home/norgg/gamedev/sphereface/main.cpp:14
    
  2. Riot

    Merge branch 'master' of https://SlowRiot@bitbucket.org/voxelstorm/sphereface.git

    By John Turner

    Via John Turner

    • 'master' of https://SlowRiot@bitbucket.org/voxelstorm/sphereface.git: Move AI base function into ship::base and add a speed limit to powerups. Fix cycle weapons backwards unsigned int modulo error (fixes #110). Move self destruct into ship update (actually fixes #93).

    Conflicts: version.h

    → <<cset ff45da28e406>>

  3. Log in to comment