lynx Posted November 11, 2014 Share Posted November 11, 2014 Huh, you say you're running the git version, main (master) branch? I see no calls of VerbalConstant from InitDialog. It's clear how the code can fail and how to avoid it though. A reinstall make no sense yet. Mods are a great way to test our resilience to unusual or bad data. Link to comment
SyntaxError Posted November 11, 2014 Share Posted November 11, 2014 I see no calls of VerbalConstant from InitDialog There arent any in the other (recent) branch either. Compiler optimization? optimizations are clearly enabled in that output. I highly doubt he checked out one of the ancient branches. Why are those lingering around anyway? Link to comment
lynx Posted November 11, 2014 Share Posted November 11, 2014 history, that's why. Since we already exchanged fixes it would be really odd if he wasn't on our current master. But that must be the case, since the logs don't contain the version either. TDouglas, where did you download from? Link to comment
TDouglas Posted November 11, 2014 Author Share Posted November 11, 2014 My actual download command(taken directly from the GemRB website): git clone git://github.com/gemrb/gemrb.git which should be checking out from the master (at least for the normall site ... I don't have access to developer obviously). It's been a couple days since I've recompiled (09 NOV) but hopefully that isn't causing any problems. EDIT: I'm recompiling from git even now ... will post back if the output differs Link to comment
TDouglas Posted November 11, 2014 Author Share Posted November 11, 2014 Sorry folks, looks like the same error with the new compile (just different code block numbers) ... walk on the stairs to trigger the dialog and get the following: [DialogHandler/WARNING]: Errors occuring while in dialog mode cannot be logged in the MessageWindow. Program received signal SIGSEGV, Segmentation fault. GemRB::Actor::ResolveStringConstant (this=0xb11b70, Sound=0x7fffffffd8f0 "bgfeml30", index=4294967295) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:7818 7818 if (csound[index]) { (gdb) bt #0 GemRB::Actor::ResolveStringConstant (this=0xb11b70, Sound=0x7fffffffd8f0 "bgfeml30", index=4294967295) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:7818 #1 0x00007ffff7b6467b in GemRB::Actor::VerbalConstant (this=0xb11b70, start=0, count=0) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:3500 #2 0x00007ffff7acafd0 in GemRB::DialogHandler::InitDialog (this=0x8e9bf0, spk=<optimized out>, tgt=0xb11b70, dlgref=<optimized out>) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/DialogHandler.cpp:132 #3 0x00007ffff7b36cb8 in GemRB::BeginDialog (Sender=0xb11b70, parameters=<optimized out>, Flags=24) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/GameScript/GSUtils.cpp:1151 #4 0x00007ffff7b3ad97 in GemRB::GameScript::ExecuteAction (Sender=0xb11b70, aC=0x23b8730) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/GameScript/GameScript.cpp:2373 #5 0x00007ffff7b80633 in GemRB::Scriptable::ProcessActions (this=this@entry=0xb11b70) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Scriptable.cpp:551 #6 0x00007ffff7b8076a in GemRB::Scriptable::Update (this=0xb11b70) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Scriptable.cpp:324 #7 0x00007ffff7b00728 in GemRB::Map::UpdateScripts (this=0x13e3320) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Map.cpp:747 #8 0x00007ffff7ad656d in GemRB::Game::UpdateScripts (this=0x9c1020) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Game.cpp:1430 #9 0x00007ffff7aecc85 in GemRB::Interface::Main (this=0x603070) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Interface.cpp:1153 #10 0x0000000000400e93 in main (argc=1, argv=0x7fffffffdcf8) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/GemRB.cpp:100 Link to comment
lynx Posted November 11, 2014 Share Posted November 11, 2014 huh. Ok, retry and when you get the crash, type: f 2 it will switch to frame #2, so we can see where InitDialog called VerbalConstant. Link to comment
TDouglas Posted November 11, 2014 Author Share Posted November 11, 2014 (gdb) f 2 #2 0x00007ffff7acafd0 in GemRB::DialogHandler::InitDialog (this=0xb332d0, spk=<optimized out>, tgt=0xb101c0, dlgref=<optimized out>) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/DialogHandler.cpp:132 132 tar->DialogInterrupt(); Link to comment
lynx Posted November 11, 2014 Share Posted November 11, 2014 ok, great, that at least matches the other output. Looks like optimisations really are the cause for the code reshuffling. There's no way that function gets called with a count of 0 from there unless a memory corruption happened right away. Please don't tell me you have gcc 4.3? Link to comment
SyntaxError Posted November 11, 2014 Share Posted November 11, 2014 Indeed, it does look like a case of memory corruption, i cant see a compiler getting released into the wild with a bug like this. The gcc 4.3 bug was something about failing to 0 initialize POD structs. Sounds like a job for valgrind or AddressSanitizer. Link to comment
lynx Posted November 11, 2014 Share Posted November 11, 2014 TDouglas: the first thing you can try is to compile a debug build. That will disable any optimisations and exclude compiler bugs in those passes. Rerun cmake with what you had, but add -DCMAKE_BUILD_TYPE=Debug #. Link to comment
TDouglas Posted November 11, 2014 Author Share Posted November 11, 2014 Will do. The native compiler is as follows: COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.7/lto-wrapper Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.7 --enable-ssp --disable-libssp --disable-libitm --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --program-suffix=-4.7 --enable-linux-futex --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux Thread model: posix gcc version 4.7.2 20130108 [gcc-4_7-branch revision 195012] (SUSE Linux) Will recompile and test again ASAP. Link to comment
TDouglas Posted November 12, 2014 Author Share Posted November 12, 2014 I downloaded the latest git, recompiled for a debug build per your instructions and started the save game. Stepped on the trigger and ... Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7b2a938 in GemRB::Actor::ResolveStringConstant (this=0xb10240, Sound=0x7fffffffd710 "bgfeml30", index=4294967295) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:7823 7823 if (csound[index]) { (gdb) bt #0 0x00007ffff7b2a938 in GemRB::Actor::ResolveStringConstant (this=0xb10240, Sound=0x7fffffffd710 "bgfeml30", index=4294967295) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:7823 #1 0x00007ffff7b1d23d in GemRB::Actor::VerbalConstant (this=0xb10240, start=0, count=0) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:3505 #2 0x00007ffff7b1e3b8 in GemRB::Actor::DialogInterrupt (this=0xb10240) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:3877 #3 0x00007ffff7a1ee38 in GemRB::DialogHandler::InitDialog (this=0x8fafe0, spk=0xb10240, tgt=0xb10240, dlgref=0x974ff8 "player1") at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/DialogHandler.cpp:132 #4 0x00007ffff7ad407f in GemRB::BeginDialog (Sender=0xb10240, parameters=0x974fc0, Flags=24) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/GameScript/GSUtils.cpp:1151 #5 0x00007ffff7ac3bc8 in GemRB::GameScript::StartDialogue (Sender=0xb10240, parameters=0x974fc0) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/GameScript/Actions.cpp:2150 #6 0x00007ffff7adef87 in GemRB::GameScript::ExecuteAction (Sender=0xb10240, aC=0x974fc0) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/GameScript/GameScript.cpp:2373 #7 0x00007ffff7b3b611 in GemRB::Scriptable::ProcessActions (this=0xb10240) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Scriptable.cpp:551 #8 0x00007ffff7b3ac35 in GemRB::Scriptable::Update (this=0xb10240) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Scriptable.cpp:324 #9 0x00007ffff7a715d5 in GemRB::Map::UpdateScripts (this=0x95cf20) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Map.cpp:747 #10 0x00007ffff7a30330 in GemRB::Game::UpdateScripts (this=0x9c3f60) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Game.cpp:1430 #11 0x00007ffff7a5178b in GemRB::Interface::GameLoop (this=0x603070) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Interface.cpp:3202 #12 0x00007ffff7a489f5 in GemRB::Interface::Main (this=0x603070) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Interface.cpp:1153 #13 0x0000000000401029 in main (argc=1, argv=0x7fffffffdcf8) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/GemRB.cpp:100 (gdb) f 2 #2 0x00007ffff7b1e3b8 in GemRB::Actor::DialogInterrupt (this=0xb10240) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:3877 3877 VerbalConstant(VB_INITIALMEET, 1); Link to comment
TDouglas Posted November 12, 2014 Author Share Posted November 12, 2014 Since I'm getting three more instances from gdb with the debug compile, I've rerun to add the following: (gdb) f 11 #11 0x00007ffff7a5178b in GemRB::Interface::GameLoop (this=0x603070) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Interface.cpp:3202 3202 game->UpdateScripts(); (gdb) f 12 #12 0x00007ffff7a489f5 in GemRB::Interface::Main (this=0x603070) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Interface.cpp:1153 1153 GameLoop(); (gdb) f 13 #13 0x0000000000401029 in main (argc=1, argv=0x7fffffffdcf8) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/GemRB.cpp:100 100 core->Main(); Just in case it helps Link to comment
TDouglas Posted November 12, 2014 Author Share Posted November 12, 2014 Oops, forgot this: #3 0x00007ffff7a1ee38 in GemRB::DialogHandler::InitDialog (this=0x13f39d0, spk=0xb10330, tgt=0xb10330, dlgref=0x23b58f8 "player1") at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/DialogHandler.cpp:132 132 tar->DialogInterrupt(); #5 0x00007ffff7ac3bc8 in GemRB::GameScript::StartDialogue (Sender=0xb10330, parameters=0x23b58c0) at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/GameScript/Actions.cpp:2150 2150 BeginDialog( Sender, parameters, BD_STRING0 | BD_TALKCOUNT | BD_SETDIALOG ); Link to comment
lynx Posted November 12, 2014 Share Posted November 12, 2014 See, that's the funny bit right there. Our code does: VerbalConstant(VB_INITIALMEET, 1); // with VB_INITIALMEET always being a 0 and it ends up with #1 /.../ VerbalConstant (start=0, count=0) So in the space of a few instructions, a (count) 1 is converted to 0. When you have time, please come to #gemrb on freenode, it'll be easier to follow up interactively. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.