project-navigation
Personal tools

Author Topic: Segmentation fault Item::getReactionFireWeaponType (this=0x0)  (Read 6229 times)

Offline apo

  • Rookie
  • ***
  • Posts: 64
    • View Profile
Hi,

we had to recompile ufoai a few days ago because of the bug in ufo2map which we had discussed in a separate thread. Now the following happens: If I start a skirmish, I can already see the map but before all team members appear ufoai crashes with a segmentation fault. This is Debian bug https://bugs.debian.org/861979.

gdb shows a null pointer and some memory that can't be accessed. Any ideas why the game is suddenly crashing at this position? My debug.log is attached.




Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Segmentation fault Item::getReactionFireWeaponType (this=0x0)
« Reply #1 on: May 07, 2017, 06:36:39 pm »
Thanks for reporting!

I managed to reproduce the problem in Campaign mode by removing the weapon from the first soldiers hand. The issue happens when the UI tries to check the reaction fire mode for the soldier who has no weapon in hand. Apparently we patched the code in 2013 already, but it wasn't good enough.

I got it fixed in 9cad041f0931b1f49e0c70f32e351a7227f0d2ff in branch ufoai_2.5. I'm going to check if the master branch is affected.

Thanks again!
-geever

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Segmentation fault Item::getReactionFireWeaponType (this=0x0)
« Reply #2 on: May 07, 2017, 06:56:09 pm »
Master didn't crash for me, but the code was affected, so I applied the patch there too (1258171073b5049c5699c80bbfad52362b4f3b80) - just in case.

-geever

Offline apo

  • Rookie
  • ***
  • Posts: 64
    • View Profile
Re: Segmentation fault Item::getReactionFireWeaponType (this=0x0)
« Reply #3 on: May 07, 2017, 07:36:22 pm »
Thank you for the quick fix!