Crash [build 2016-01-09.e7887b8]

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Message
Author
AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Crash [build 2016-01-09.e7887b8]

#16 Post by AndrewW »

Geoff the Medio wrote:I don't know what I'm looking at in that .trace file... it doesn't look like the usual stack traces that people post when diagnosing crashes...
Used strace for it. Would something else work better for you¿

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

Re: Crash [build 2016-01-09.e7887b8]

#17 Post by Geoff the Medio »

AndrewW wrote:Would something else work better for you¿
The stack traces I'm used to seeing look something like

Code: Select all

0   org.freeorion.FreeOrion       	0x0053c9d2 GG::Wnd::UpperLeft() const + 24
1   org.freeorion.FreeOrion       	0x0053ca11 GG::Wnd::Top() const + 17
2   org.freeorion.FreeOrion       	0x004ffe02 std::_Rb_tree<std::_List_iterator<GG::ListBox::Row*>, std::_List_iterator<GG::ListBox::Row*>, std::_Identity<std::_List_iterator<GG::ListBox::Row*> >, GG::ListBox::RowPtrIteratorLess, std::allocator<std::_List_iterator<GG::ListBox::Row*> > >::lower_bound(std::_List_iterator<GG::ListBox::Row*> const&) + 42
3   org.freeorion.FreeOrion       	0x004ffd09 std::_Rb_tree<std::_List_iterator<GG::ListBox::Row*>, std::_List_iterator<GG::ListBox::Row*>, std::_Identity<std::_List_iterator<GG::ListBox::Row*> >, GG::ListBox::RowPtrIteratorLess, std::allocator<std::_List_iterator<GG::ListBox::Row*> > >::erase(std::_List_iterator<GG::ListBox::Row*> const&) + 27
4   org.freeorion.FreeOrion       	0x004f5cf2 GG::ListBox::Erase(std::_List_iterator<GG::ListBox::Row*>, bool, bool) + 274
5   org.freeorion.FreeOrion       	0x004f5b9a GG::ListBox::ChildrenDraggedAway(std::vector<GG::Wnd*, std::allocator<GG::Wnd*> > const&, GG::Wnd const*) + 188
6   org.freeorion.FreeOrion       	0x004d5baa GG::GUIImpl::HandleMouseButtonRelease(unsigned int, GG::Pt const&, int) + 948
7   org.freeorion.FreeOrion       	0x004d8ced GG::GUI::HandleGGEvent(GG::GUI::EventType, GG::Key, unsigned int, GG::Flags<GG::ModKey>, GG::Pt const&, GG::Pt const&, std::string const*) + 463
8   org.freeorion.FreeOrion       	0x005295db GG::SDLGUI::HandleSystemEvents() + 699
9   org.freeorion.FreeOrion       	0x001d4c4c HumanClientApp::HandleSystemEvents() + 26
10  org.freeorion.FreeOrion       	0x001d5a86 non-virtual thunk to HumanClientApp::HandleSystemEvents() + 22
11  org.freeorion.FreeOrion       	0x004b36de GG::ModalEventPump::operator()() + 52
12  org.freeorion.FreeOrion       	0x00529e04 GG::SDLGUI::Run() + 54

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Crash [build 2016-01-09.e7887b8]

#18 Post by AndrewW »

From gdb:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
0x0000000041639b1a in ?? ()
(gdb) bt full
#0  0x0000000041639b1a in ?? ()
No symbol table info available.
#1  0x00007fed0e4af4b2 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.340.65
No symbol table info available.
#2  0x00007fed0e0923a8 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.340.65
No symbol table info available.
#3  0x0000000000531715 in CircleArc(GG::Pt const&, GG::Pt const&, double, double, bool) ()
No symbol table info available.
#4  0x000000000060dece in MapWnd::RenderSystems() ()
No symbol table info available.
#5  0x0000000000612eab in MapWnd::Render() ()
No symbol table info available.
#6  0x00007fed14c8e64c in GG::GUI::RenderWindow(GG::Wnd*) ()
   from /home/andrew/Games/freeorion/libGiGi.so
No symbol table info available.
#7  0x00007fed14c8f045 in GG::GUI::Render() ()
   from /home/andrew/Games/freeorion/libGiGi.so
No symbol table info available.
#8  0x00007fed14c5eff3 in GG::EventPumpBase::LoopBody(GG::GUI*, GG::EventPumpState&, bool, bool) () from /home/andrew/Games/freeorion/libGiGi.so
No symbol table info available.
#9  0x00007fed14c5f282 in GG::ModalEventPump::operator()() ()
   from /home/andrew/Games/freeorion/libGiGi.so
No symbol table info available.
#10 0x00007fed149142c8 in GG::SDLGUI::Run() ()
   from /home/andrew/Games/freeorion/libGiGiSDL.so
No symbol table info available.
#11 0x000000000047685e in mainSetupAndRun() ()
No symbol table info available.
#12 0x000000000043e5dc in main ()
No symbol table info available.

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

Re: Crash [build 2016-01-09.e7887b8]

#19 Post by Geoff the Medio »

In FreeOrion/UI/CUIDrawUtil.cpp locate the CircleArc function on line 301. Add a line to the start to output some debug info:

Code: Select all

void CircleArc(const GG::Pt& ul, const GG::Pt& lr, double theta1, double theta2, bool filled_shape) {
    std::cout << "CircleArc ul: " << ul << "  lr: " << lr << "  theta1: " << theta1 << "  theta2: " << theta2 << "  filled: " << filled_shape << std::flush << std::endl;
Then recompile, run from a command line so you can see the output, then produce the crash, and report back the last couple output lines from that call.

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Crash [build 2016-01-09.e7887b8]

#20 Post by AndrewW »

Geoff the Medio wrote:Then recompile, run from a command line so you can see the output, then produce the crash, and report back the last couple output lines from that call.

Code: Select all

CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1143, 260)  lr: (1146, 263)  theta1: 0  theta2: 6.28319  filled: 1
Segmentation fault

User avatar
Vezzra
Release Manager, Design
Posts: 5489
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Crash [build 2016-01-09.e7887b8]

#21 Post by Vezzra »

Looks like a crash in the graphics driver...

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Crash [build 2016-01-09.e7887b8]

#22 Post by AndrewW »

Vezzra wrote:Looks like a crash in the graphics driver...
Hadn't changed anything on this end. Did go and update the system after the crashes started, though that didn't happen to include any updates for the Nvidia drivers.

User avatar
Vezzra
Release Manager, Design
Posts: 5489
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Crash [build 2016-01-09.e7887b8]

#23 Post by Vezzra »

AndrewW wrote:Hadn't changed anything on this end. Did go and update the system after the crashes started, though that didn't happen to include any updates for the Nvidia drivers.
Hm, can you try to find out at which commit exactly those crashes start to happen? Because e7887b8 doesn't make much sense, that's just new graphics for the Basic Small Hull. The issue must have been introduced by some earlier commit...

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

Re: Crash [build 2016-01-09.e7887b8]

#24 Post by Geoff the Medio »

AndrewW wrote:
Geoff the Medio wrote:Then recompile, run from a command line so you can see the output, then produce the crash, and report back the last couple output lines from that call.

Code: Select all

CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1143, 260)  lr: (1146, 263)  theta1: 0  theta2: 6.28319  filled: 1
Segmentation fault
Could you include a few more preceeding lines?

Maybe try adding an early abort check if you can identify conditions like a small enough lr - ul difference with filled = 1 that are required to get a crash?

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Crash [build 2016-01-09.e7887b8]

#25 Post by AndrewW »

Geoff the Medio wrote:Could you include a few more preceeding lines?
No problem: (You did specify a couple initially)

Code: Select all

CircleArc ul: (1126, 253)  lr: (1129, 256)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1137, 264)  lr: (1140, 267)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1137, 264)  lr: (1140, 267)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1143, 260)  lr: (1146, 263)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1143, 260)  lr: (1146, 263)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1127, 259)  lr: (1130, 262)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1126, 253)  lr: (1129, 256)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1137, 264)  lr: (1140, 267)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1137, 264)  lr: (1140, 267)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1143, 260)  lr: (1146, 263)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1143, 260)  lr: (1146, 263)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1127, 259)  lr: (1130, 262)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1126, 253)  lr: (1129, 256)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1137, 264)  lr: (1140, 267)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1137, 264)  lr: (1140, 267)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1143, 260)  lr: (1146, 263)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1143, 260)  lr: (1146, 263)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1127, 259)  lr: (1130, 262)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1126, 253)  lr: (1129, 256)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1137, 264)  lr: (1140, 267)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1137, 264)  lr: (1140, 267)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1143, 260)  lr: (1146, 263)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1143, 260)  lr: (1146, 263)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1127, 259)  lr: (1130, 262)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1126, 253)  lr: (1129, 256)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1137, 264)  lr: (1140, 267)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1137, 264)  lr: (1140, 267)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 1
CircleArc ul: (1119, 260)  lr: (1122, 263)  theta1: 0  theta2: 6.28319  filled: 0
CircleArc ul: (1143, 260)  lr: (1146, 263)  theta1: 0  theta2: 6.28319  filled: 1
Segmentation fault
Not seeing any where theta1 or theta2 change, filled is always 0 or 1 (even back further).

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

Re: Crash [build 2016-01-09.e7887b8]

#26 Post by Geoff the Medio »

Looks like the crash doesn't just depend on the size of the circle being drawn either... plenty are the same 4x4 pixels.

You could try as I suggested above, and put an early abort at the start of the function that doesn't do the rendering if the box is that small, though. Might help? Not sure if it will make a noticable difference in the rendered map, so might be worth testing...

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Crash [build 2016-01-09.e7887b8]

#27 Post by AndrewW »

Geoff the Medio wrote:You could try as I suggested above, and put an early abort at the start of the function that doesn't do the rendering if the box is that small, though. Might help? Not sure if it will make a noticable difference in the rendered map, so might be worth testing...
Willing to give it a try. What would be the code and where to put it?

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

Re: Crash [build 2016-01-09.e7887b8]

#28 Post by Geoff the Medio »

AndrewW wrote:What would be the code and where to put it?
Same place. Check if Value(ul.x - lr.x) < 5 || Value(ul.y - lr.y) < 5. If so, return.

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Crash [build 2016-01-09.e7887b8]

#29 Post by AndrewW »

Ok, got back to this.

Did another system wide update (which included an update to the video driver this time around), tried again same problem. Built a new version [build 2016-01-23,39534a3], still has the same issue.

Can crash it if I simply zoom all the way out while it's Creating AI clients:

Code: Select all

FreeOrion server waiting for network events
CircleArc ul: (522, 381)  lr: (525, 384)  theta1: 0  theta2: 6.28319  filled: 1
Segmentation fault

User avatar
Vezzra
Release Manager, Design
Posts: 5489
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Crash [build 2016-01-09.e7887b8]

#30 Post by Vezzra »

Vezzra wrote:Hm, can you try to find out at which commit exactly those crashes start to happen?
Andrew, have you been able to track down the commit introducing the issue? It might help narrowing down the cause if we now which changes triggered the problem...

Post Reply