Segfault and prerequisites for partially unlock missing

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderators: Oberlus, Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Message
Author
Scara
Space Kraken
Posts: 140
Joined: Thu Apr 23, 2015 11:21 am

Re: Segfault and prerequisites for partially unlock missing

#16 Post by Scara » Thu Mar 03, 2016 7:24 pm

Then you should have a backtrace.
Yeah, I did it. I ran freeorion compiled as debugging version and used gdb.
Here is the complete result:
http://s000.tinyupload.com/?file_id=050 ... 0245119134
Hope it is useful!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12527
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Segfault and prerequisites for partially unlock missing

#17 Post by Geoff the Medio » Thu Mar 03, 2016 7:34 pm

A bit of a guess, but in TextLinker.cpp around line 247, can you remove the & on the lines

Code: Select all

    const std::string& LINK_TYPE = m_links[sel_link].type;
    const std::string& DATA = m_links[sel_link].data;

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: Segfault and prerequisites for partially unlock missing

#18 Post by dbenage-cx » Thu Mar 03, 2016 8:25 pm

UI/LinkText.cpp

worked here, tried various links both in and out of production window.
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.

Scara
Space Kraken
Posts: 140
Joined: Thu Apr 23, 2015 11:21 am

Re: Segfault and prerequisites for partially unlock missing

#19 Post by Scara » Thu Mar 03, 2016 9:31 pm

Great work! After changing the suggested code, I wasn't able to reproduce the crash any more and on the first glance it's working fine now! Thumbs up! :D

Scara
Space Kraken
Posts: 140
Joined: Thu Apr 23, 2015 11:21 am

Re: Segfault and prerequisites for partially unlock missing

#20 Post by Scara » Tue Mar 15, 2016 5:31 pm

Hi,

after playing some more, I again encountered segfaults, first time I guess was a week ago I couldn't reproduce the error and lost the logs. Now I'm always playing in the gdb enviroment to get some more info when it suddenly happens again. I tried in gdb enviroment with the compiled Debug version but it's not really playable in a fair time. Well just had a segfault again and as it just hang without quiting to the shell directly in the gdb environment, I could take a screeny of the situation. Haven't tried to reproduce the error yet, but have saved closely before.
I try to describe my normal procedure choosing growth planets, when I often experience segfaults:
I got some new outposters build and I want to look up some growth planets. I first check my planets in objects sorting the focus column and look up the growth specials I already have.
Then I always open the the pedia -> Specials and go down the list in alphabetical order, checking in all growth specials I need. At the pedia entry of any growth special, I look if there are available planets. If there are I click on them, to see where they are. I look at one of the planets and use the back button at the pedia corner to get back to the growth special description and get a look at an other planet. This time I came to native elyrium, so I checked the other growth specials before.

Here's the backtrace:
pure virtual method called
terminate called without an active exception

Program received signal SIGABRT, Aborted.
0x00007ffff42a7cc9 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt full
#0 0x00007ffff42a7cc9 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1 0x00007ffff42ab0d8 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2 0x00007ffff4bb2535 in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#3 0x00007ffff4bb06d6 in ?? ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#4 0x00007ffff4bb0703 in std::terminate() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#5 0x00007ffff4bb11bf in __cxa_pure_virtual ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#6 0x00000000005f6088 in TextLinker::GetLinkUnderPt(GG::Pt const&) ()
No symbol table info available.
#7 0x00000000005f892d in TextLinker::LDoubleClick_(GG::Pt const&, GG::Flags<GG::ModKey>) ()
No symbol table info available.
#8 0x00007ffff6d19cde in GG::Wnd::HandleEvent(GG::WndEvent const&) ()
from /home/juls/Schreibtisch/alles/spiele/freeorion/libGiGi.so
No symbol table info available.
#9 0x00007ffff6ca2d69 in GG::GUIImpl::HandleMouseButtonRelease(unsigned int, GG::Pt const&, int) ()
from /home/juls/Schreibtisch/alles/spiele/freeorion/libGiGi.so
No symbol table info available.
#10 0x00007ffff691254d in GG::SDLGUI::HandleSystemEvents() ()
from /home/juls/Schreibtisch/alles/spiele/freeorion/libGiGiSDL.so
No symbol table info available.
#11 0x000000000045d9f3 in HumanClientApp::HandleSystemEvents() ()
No symbol table info available.
#12 0x00007ffff6c69969 in GG::ModalEventPump::operator()() ()
from /home/juls/Schreibtisch/alles/spiele/freeorion/libGiGi.so
No symbol table info available.
#13 0x00007ffff690fe18 in GG::SDLGUI::Run() ()
from /home/juls/Schreibtisch/alles/spiele/freeorion/libGiGiSDL.so
No symbol table info available.
#14 0x000000000047d8cc in mainSetupAndRun() ()
No symbol table info available.
#15 0x0000000000448555 in main ()
No symbol table info available.

Screeny:
http://s000.tinyupload.com/index.php?fi ... 3802773729

Savegame and Logs attached

Hope it is helpfull!

P.S. Build 2016-03-13.e6da013

P.P.S. I couldn't reproduce the crash... somehow guessed it :?
Attachments
freeoriond.log
(438 KiB) Downloaded 14 times
freeorion.log
(555.13 KiB) Downloaded 14 times

[The extension sav has been deactivated and can no longer be displayed.]


User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12527
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Segfault and prerequisites for partially unlock missing

#21 Post by Geoff the Medio » Fri Mar 18, 2016 5:36 pm

Scara wrote:#4 0x00007ffff4bb0703 in std::terminate() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#5 0x00007ffff4bb11bf in __cxa_pure_virtual ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#6 0x00000000005f6088 in TextLinker::GetLinkUnderPt(GG::Pt const&) ()
No symbol table info available.
#7 0x00000000005f892d in TextLinker::LDoubleClick_(GG::Pt const&, GG::Flags<GG::ModKey>) ()
No symbol table info available.
#8 0x00007ffff6d19cde in GG::Wnd::HandleEvent(GG::WndEvent const&) ()
from /home/juls/Schreibtisch/alles/spiele/freeorion/libGiGi.so
No symbol table info available.
I'm not sure, but that looks like a pure virtual function call issue. I don't know why this would occur, as there is a definition for that function (and it's used often for link clicking...). But I added some dummy implementations of the base class pure virtual functions anyway, in case it helps.

Scara
Space Kraken
Posts: 140
Joined: Thu Apr 23, 2015 11:21 am

Re: Segfault and prerequisites for partially unlock missing

#22 Post by Scara » Sun Mar 20, 2016 12:26 pm

Hello,

got the crash again, once on yesterdays build and it just happend again on build 447ff04 from today. The backtrace looks exactly the same as last time except of the memory addresses.
But this time I was just sorting out where kraken nests are located using the pedia. I opened the pedia by right clicking the first kraken nest I found. Then I went through the four entrys by clicking the planet link and using the back arrow to choose the next.
Here is the actual situation it happend on click (I actually cut the screeny a bit to save space):
cut.png
cut.png (276.71 KiB) Viewed 420 times

Scara
Space Kraken
Posts: 140
Joined: Thu Apr 23, 2015 11:21 am

Re: Segfault and prerequisites for partially unlock missing

#23 Post by Scara » Sun Mar 20, 2016 1:00 pm

Last reported one isn't reproducible...
One thing that came to my mind is that it often happens when I haven't used the wiki long time.
Normally I know what I want and primerly use sitrep, production and research, so I expand and only rarely use pedia for suitability checks.
It never crashes with these. In this case I checked for monster nests before checking growth boni.
But at some point when I have some more detection range and scouted farther regions I look for growth boni.
Now the crashes appear mostly when I'm middle in the game (Turn90-150) and starting to make use of the pedia.
Except of the one reported crash I could reproduce after loading, I fail to reproduce the crash, but get it regular.
I never, except the one reported crash, had a crash after loading a savegame and sorting out things with pedia in all detail.
Today with the kraken nest was a bit surprising, but considering being middle of the game beginning to make use of the pedia, I shouldn't wonder.
Yesterday before looking up growth boni I would have bet that I would happen. Accidentally I wasn't running gdb so I couldn't get a back trace or screenshot from that crash.

Scara
Space Kraken
Posts: 140
Joined: Thu Apr 23, 2015 11:21 am

Re: Segfault and prerequisites for partially unlock missing

#24 Post by Scara » Sun Mar 20, 2016 7:41 pm

Had another one of these crashes on turn 147 same game as above... unexpected this time in research.
Just wanted to look up the Electromagnetic Damper in the Research screen pedia.
Backtrace again says exactly the same.
I haven't included the logs yet as they are rather big files, if they are necessary I have stored them, aswell a savegame.
cut.png
cut.png (64.06 KiB) Viewed 409 times

Post Reply