Jump to content

BG2 Segfault


mark

Recommended Posts

Hi, I found a segfault in BG2: In AR1514 underneath Spellhold where the party is encountered by Bodhi and two vampires, the main character becomes the Slayer for the first time, and shortly after his transformation, gemrb segfaults:

 

(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x00007f25dae95001 in GemRB::Actor::RefreshEffects (this=0xc31120, fx=0x0)
at /home/mark/opt/gemrb/gemrb/core/Scriptable/Actor.cpp:2606
2606			if (PrevStats[iE_PUPPETID]) {
(gdb) where
#0  0x00007f25dae95001 in GemRB::Actor::RefreshEffects (this=0xc31120, fx=0x0)
at /home/mark/opt/gemrb/gemrb/core/Scriptable/Actor.cpp:2606
#1  0x00007f25dae233d7 in GemRB::Map::UpdateEffects (this=0xad7380)
at /home/mark/opt/gemrb/gemrb/core/Map.cpp:1300
#2  0x00007f25dae08e3a in GemRB::GlobalTimer::Update (this=0x793aa0)
at /home/mark/opt/gemrb/gemrb/core/GlobalTimer.cpp:193
#3  0x00007f25dae10eac in GemRB::Interface::GameLoop (this=0x728050)
at /home/mark/opt/gemrb/gemrb/core/Interface.cpp:3292
#4  0x00007f25dae17caa in GemRB::Interface::Main (this=0x728050)
at /home/mark/opt/gemrb/gemrb/core/Interface.cpp:1151
#5  0x0000000000400e78 in main (argc=1, argv=0x7fff3ab7a2d8)
at /home/mark/opt/gemrb/gemrb/GemRB.cpp:89

If I use the Ctrl+R cheatkey after the transformation, it also segfaults (same backtrace)

Link to comment

99ae910d2cef378a83fde6aaa2b0b2988b9c8075 is the last working revision

 

Meh, thanks. This was my last commit. I wonder why prevstats isn't alive there...

Probably GetSafeStat(IE_PUPPETID) would fix this. (replace all PrevStats usage with GetSafeStat)

using GetSafeStat only creates compile errors

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...