Jump to content

Photo

[Solved] Crashing when opening Inventory or Record

gemrb BGT

10 replies to this topic

#1 stevo1977

stevo1977
  • Members
  • 8 posts
  • Gender:Male
  • Location:Pacific NW

Posted 25 July 2017 - 10:08 PM

I just cloned and compiled/installed GemRB from the master branch on git about three days ago, so I believe that's 0.8.4? I have modded BG1 and BG2 together for the Baldur's Gate Trilogy. I am running Debian Linux.

 

Everything works great through character creation, saving, and playing the beginning of the game. But it crashes as soon as I try to open the Inventory or Player Record (the Map, Mage Spellbook, and Druid Spellbook all open fine). This happens whether I click on the icon or use the hotkey ('I' or 'R', respectively). I have attached my gemrb.log (Attached File  GemRB.log   56KB   44 downloads). You will notice that it ends abruptly in the middle of a line. When I run it from a terminal the only additional output is 'Segmentation Fault'.

 

Any help in identifying the problem would be much appreciated. Thanks!

 

Cheers,

stevo


Edited by stevo1977, 28 July 2017 - 06:20 AM.


#2 lynx

lynx
  • Modders
  • 3110 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 26 July 2017 - 04:44 AM

Hmm, so initially it worked and only later in the game they started crashing? Sounds like a mod added effect could be the culprit, since those two screens don't have much in common.

 

Can you rebuild with -DCMAKE_BUILD_TYPE=Debug and reproduce the crashes through gdb? It'll be almost impossible to address without stack traces.


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...

#3 stevo1977

stevo1977
  • Members
  • 8 posts
  • Gender:Male
  • Location:Pacific NW

Posted 26 July 2017 - 06:57 AM

Thanks for the quick reply, lynx!

 

All of the character creation stuff works fine, and once in Candlekeep I can play the game normally and even save it. But as soon as I try to open either the Inventory or the Player Record it crashes.

 

I rebuilt gemrb with the 'debug' option you listed. I ran the game and the same thing happened, but the GemRB.log looks exactly like before. How do I run it to get the stack traces and stuff? What do you mean by "through gdb"?

 

Cheers,

Steve



#4 lynx

lynx
  • Modders
  • 3110 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 26 July 2017 - 09:11 AM

- install gdb

- run gemrb from the command line like before, but prepend gdb (like with nice or strace)

- a new gdb shell will open; type r as in run

- play the game until it crashes

- type bt, which is short for backtrace

- paste it here


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...

#5 stevo1977

stevo1977
  • Members
  • 8 posts
  • Gender:Male
  • Location:Pacific NW

Posted 26 July 2017 - 03:18 PM

Got it. Please find the log file attached (Attached File  gdb.txt   4.4KB   32 downloads) and pasted below.

Starting program: /usr/local/bin/gemrb 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe8a7d700 (LWP 9989)]
[Thread 0x7fffe8a7d700 (LWP 9989) exited]
[New Thread 0x7fffe8a7d700 (LWP 9990)]
[New Thread 0x7fffe8a7d700 (LWP 9991)]
[Thread 0x7fffe8a7d700 (LWP 9990) exited]
[New Thread 0x7fffe827c700 (LWP 9992)]
[New Thread 0x7fffd37e7700 (LWP 9993)]
[New Thread 0x7fffd1c8c700 (LWP 9999)]

Thread 1 "gemrb" received signal SIGSEGV, Segmentation fault.
0x00007ffff7ad00a5 in GemRB::Label::SetAlignment (this=0x5555563ce7a0, 
    Alignment=33 '!')
    at /home/****/Games/BaldursGate/gemrb/gemrb/core/GUI/Label.cpp:88
88		if (Height <= font->LineHeight) {
#0  0x00007ffff7ad00a5 in GemRB::Label::SetAlignment (this=0x5555563ce7a0, 
    Alignment=33 '!')
    at /home/****/Games/BaldursGate/gemrb/gemrb/core/GUI/Label.cpp:88
#1  0x00007ffff7acfc83 in GemRB::Label::Label (this=0x5555563ce7a0, frame=..., 
    font=0x0, string=L"")
    at /home/****/Games/BaldursGate/gemrb/gemrb/core/GUI/Label.cpp:42
#2  0x00007fffed69280f in GemRB::CHUImporter::GetWindow (this=0x55555589cf50, 
    wid=2)
    at /home/****/Games/BaldursGate/gemrb/gemrb/plugins/CHUImporter/CHUImporter.cpp:400
#3  0x00007ffff7a1b783 in GemRB::Interface::LoadWindow (this=0x555555768c80, 
    WindowID=2)
    at /home/****/Games/BaldursGate/gemrb/gemrb/core/Interface.cpp:2658
#4  0x00007fffeb7a2af8 in GemRB_LoadWindow (args=0x7fffe912ba50)
    at /home/****/Games/BaldursGate/gemrb/gemrb/plugins/GUIScript/GUIScript.cpp:953
#5  0x00007fffeb278091 in PyEval_EvalFrameEx ()
   from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#6  0x00007fffeb3df15c in PyEval_EvalCodeEx ()
   from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#7  0x00007fffeb3335b0 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#8  0x00007fffeb2cb543 in PyObject_Call ()
   from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#9  0x00007fffeb3de587 in PyEval_CallObjectWithKeywords ()
   from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#10 0x00007fffeb7c71ad in GemRB::CallPythonObject (Function=0x7fffd2b91b18, 
    args=0x0)
    at /home/****/Games/BaldursGate/gemrb/gemrb/plugins/GUIScript/PythonHelpers.cpp:120
#11 0x00007fffeb7c7235 in GemRB::CallPython (Function=0x7fffd2b91b18, args=0x0)
    at /home/****/Games/BaldursGate/gemrb/gemrb/plugins/GUIScript/PythonHelpers.cpp:134
#12 0x00007fffeb7c70b4 in GemRB::PythonObjectCallback<GemRB::Control>::operator() (this=0x555555bcdd90, ctrl=0x555555a6ce80)
    at /home/****/Games/BaldursGate/gemrb/gemrb/plugins/GUIScript/PythonHelpers.cpp:98
#13 0x00007ffff7ac5f2e in GemRB::ControlEventHandler::operator() (
    this=0x7fffffffdf68, ctrl=0x555555a6ce80)
    at /home/****/Games/BaldursGate/gemrb/gemrb/core/GUI/Control.h:185
#14 0x00007ffff7ac5abd in GemRB::Control::RunEventHandler (
    this=0x555555a6ce80, handler=...)
    at /home/****/Games/BaldursGate/gemrb/gemrb/core/GUI/Control.cpp:166
#15 0x00007ffff7ac0701 in GemRB::Button::OnMouseUp (this=0x555555a6ce80, x=33, 
    y=14, Button=1, Mod=0)
    at /home/****/Games/BaldursGate/gemrb/gemrb/core/GUI/Button.cpp:531
#16 0x00007ffff7ac7075 in GemRB::EventMgr::MouseUp (this=0x55555577bdc0, x=36, 
    y=157, Button=1, Mod=0)
    at /home/****/Games/BaldursGate/gemrb/gemrb/core/GUI/EventMgr.cpp:338
#17 0x00007ffff5ff1754 in GemRB::SDLVideoDriver::ProcessEvent (
    this=0x5555557ad4e0, event=...)
    at /home/****/Games/BaldursGate/gemrb/gemrb/plugins/SDLVideo/SDLVideo.cpp:357
#18 0x00007ffff6049b80 in GemRB::SDL12VideoDriver::ProcessEvent (
    this=0x5555557ad4e0, event=...)
    at /home/****/Games/BaldursGate/gemrb/gemrb/plugins/SDLVideo/SDL12Video.cpp:276
#19 0x00007ffff5ff0f38 in GemRB::SDLVideoDriver::PollEvents (
    this=0x5555557ad4e0)
    at /home/****/Games/BaldursGate/gemrb/gemrb/plugins/SDLVideo/SDLVideo.cpp:152
#20 0x00007ffff5ff0edc in GemRB::SDLVideoDriver::SwapBuffers (
    this=0x5555557ad4e0)
    at /home/****/Games/BaldursGate/gemrb/gemrb/plugins/SDLVideo/SDLVideo.cpp:143
#21 0x00007ffff604981e in GemRB::SDL12VideoDriver::SwapBuffers (
    this=0x5555557ad4e0)
    at /home/****/Games/BaldursGate/gemrb/gemrb/plugins/SDLVideo/SDL12Video.cpp:201
#22 0x00007ffff7a13f3d in GemRB::Interface::Main (this=0x555555768c80)
    at /home/****/Games/BaldursGate/gemrb/gemrb/core/Interface.cpp:1017
#23 0x000055555555506b in main (argc=1, argv=0x7fffffffe338)
    at /home/****/Games/BaldursGate/gemrb/gemrb/GemRB.cpp:100

Thanks again for your help.

 

Cheers,

stevo



#6 lynx

lynx
  • Modders
  • 3110 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 26 July 2017 - 10:41 PM

Did you install any font mods?

Once you have the stack trace, what do these commands say:

p font

p Height


Edited by lynx, 26 July 2017 - 10:43 PM.

GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...

#7 stevo1977

stevo1977
  • Members
  • 8 posts
  • Gender:Male
  • Location:Pacific NW

Posted 27 July 2017 - 05:44 AM

I did not install any mods specifically for fonts, but I could not say whether some of the mods I installed modified fonts.

(gdb) p font
$1 = (GemRB::Font *) 0x0

(gdb) p Height
$2 = 13


#8 lynx

lynx
  • Modders
  • 3110 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 27 July 2017 - 12:13 PM

It looks like a gui mod has a reference to an invalid or missing font. You'd need to break in the label's construction in CHUImporter::GetWindow, but it would be an involved process.

 

You can instead first try just working around it.

Open gemrb/core/GUI/Label.cpp at line 86 and change the first if block to:

    if (!font || Height <= font->LineHeight) {

and run make again (and make install, if you're not running from the build dir)


Edited by lynx, 27 July 2017 - 12:15 PM.

GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...

#9 stevo1977

stevo1977
  • Members
  • 8 posts
  • Gender:Male
  • Location:Pacific NW

Posted 27 July 2017 - 01:58 PM

Success! You did it! lynx, I cannot thank you enough for your patient and detailed help. I recently rebuilt my system from scratch, and I opted not to back up all the fonts I used to have installed, so it makes sense that that could be a hangup.

 

Out of curiosity, two questions if you don't mind:

  1. How did you figure out a font was the problem?
  2. Is there anyway to tell which font might be missing? I'm not overly concerned, now that the game is running, just curious.

Thanks again!

 

Cheers,

stevo



#10 lynx

lynx
  • Modders
  • 3110 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 28 July 2017 - 04:14 AM

From the backtrace data and the code. To find which font/gui is the problem, more debugging would be needed as written above. Do note that this is not affected by system fonts and the usual ones were found, so it's quite curious. Maybe one is corrupted.


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...

#11 stevo1977

stevo1977
  • Members
  • 8 posts
  • Gender:Male
  • Location:Pacific NW

Posted 28 July 2017 - 06:12 AM

Curious indeed. Well, thanks again, lynx. You are a gentleman and a scholar.

 

Cheers,

stevo





Reply to this topic



  



Also tagged with one or more of these keywords: gemrb, BGT

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users