Board index FlightGear Development Canvas

Segfault of the day ...

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Segfault of the day ...

Postby Hooray » Sun Nov 10, 2013 12:03 am

This is probably triggered via some rogue Nasal code, I assume that there could be listeners still running when the canvas is no longer valid (see the backtrace), but haven't checked thoroughly:

I'm getting this segfault (reproducably) when using the airport selection dialog, closing and re-opening it seems to trigger the listener - so it's certainly bad Nasal code in combination with some C++ code that doesn't seem hardened enough:

Code: Select all
#0  0x0000000000dd98e5 in simgear::canvas::Element::getParentStyle(SGPropertyNode const*) const ()
#1  0x0000000000dd9a1f in simgear::canvas::Element::childRemoved(SGPropertyNode*, SGPropertyNode*) ()
#2  0x0000000000fd5e0d in SGPropertyNode::fireChildrenRemovedRecursive() ()
#3  0x0000000000fd0f27 in simgear::PropertyBasedMgr::childRemoved(SGPropertyNode*, SGPropertyNode*) ()
#4  0x0000000000fd9e60 in SGPropertyNode::removeChild(int, bool) ()
#5  0x0000000000fda0db in SGPropertyNode::removeChildren(char const*, bool) ()
#6  0x00000000009daf1a in f_removeChildren(Context*, naRef, int, naRef*) ()
#7  0x0000000000fafd9f in setupFuncall ()
#8  0x0000000000fb204c in run ()
#9  0x0000000000fb4398 in naCall ()
#10 0x0000000000fb44a4 in naCallMethodCtx ()
#11 0x0000000000fb45d2 in naCallMethod ()
#12 0x00000000009cbaeb in FGNasalListener::call(SGPropertyNode*, naRef) ()
#13 0x00000000009cbbb3 in FGNasalListener::valueChanged(SGPropertyNode*) ()
#14 0x0000000000fdf5a8 in SGPropertyNode::set_string(char const*) ()
#15 0x0000000000fdd157 in SGPropertyNode::setStringValue(char const*) ()
#16 0x0000000000fdd551 in SGPropertyNode::setStringValue(char const*, char const*) ()
#17 0x00000000009ca67e in f_setprop(Context*, naRef, int, naRef*) ()
#18 0x0000000000fafd9f in setupFuncall ()
#19 0x0000000000fb204c in run ()
#20 0x0000000000fb4398 in naCall ()
#21 0x0000000000fb44a4 in naCallMethodCtx ()
#22 0x0000000000fb45d2 in naCallMethod ()
#23 0x00000000009cb9be in FGNasalSys::handleCommand(char const*, char const*, char const*, SGPropertyNode const*) ()
#24 0x0000000000798131 in CanvasWidget::CanvasWidget(int, int, int, int, SGPropertyNode*, std::string const&) ()
#25 0x00000000007b2076 in FGPUIDialog::makeObject(SGPropertyNode*, int, int) ()


(don't bother looking at the Nasal code, we're rewriting it anyway - so this is just about the C++ side)
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Segfault of the day ...

Postby TheTom » Sun Nov 10, 2013 5:16 pm

I'm not completely sure about the cause, but I have pushed something to SimGear which possibly fixes it.
TheTom
 
Posts: 322
Joined: Sun Oct 09, 2011 11:20 am

Re: Segfault of the day ...

Postby Hooray » Mon Nov 11, 2013 3:17 am

thanks for looking into it, I updated OSG/SG/FG + fgdata, but still seeing this - for example, when viewing the route layer in the airport selection dialog and panning way out of range

Code: Select all
#0  0x0000000000dda4ae in simgear::canvas::Element::getParentStyle(SGPropertyNode const*) const ()
#1  0x0000000000dda5ef in simgear::canvas::Element::childRemoved(SGPropertyNode*, SGPropertyNode*) ()
#2  0x0000000000fd73ed in SGPropertyNode::fireChildrenRemovedRecursive() ()
#3  0x0000000000fd2507 in simgear::PropertyBasedMgr::childRemoved(SGPropertyNode*, SGPropertyNode*) ()
#4  0x0000000000fdb440 in SGPropertyNode::removeChild(int, bool) ()
#5  0x0000000000fdb6bb in SGPropertyNode::removeChildren(char const*, bool) ()
#6  0x00000000009db9ba in f_removeChildren(Context*, naRef, int, naRef*) ()
#7  0x0000000000fb137f in setupFuncall ()
#8  0x0000000000fb362c in run ()
#9  0x0000000000fb5978 in naCall ()
#10 0x0000000000fb5a84 in naCallMethodCtx ()
#11 0x0000000000fb5bb2 in naCallMethod ()
#12 0x00000000009cc58b in FGNasalListener::call(SGPropertyNode*, naRef) ()
#13 0x00000000009cc653 in FGNasalListener::valueChanged(SGPropertyNode*) ()
#14 0x0000000000fe0b88 in SGPropertyNode::set_string(char const*) ()
#15 0x0000000000fde737 in SGPropertyNode::setStringValue(char const*) ()
#16 0x0000000000fdeb31 in SGPropertyNode::setStringValue(char const*, char const*) ()
#17 0x00000000009cb11e in f_setprop(Context*, naRef, int, naRef*) ()
#18 0x0000000000fb137f in setupFuncall ()
#19 0x0000000000fb362c in run ()
#20 0x0000000000fb5978 in naCall ()
#21 0x0000000000fb5a84 in naCallMethodCtx ()
#22 0x0000000000fb5bb2 in naCallMethod ()
#23 0x00000000009cc45e in FGNasalSys::handleCommand(char const*, char const*, char const*, SGPropertyNode const*) ()
#24 0x00000000009ca881 in FGNasalSys::handleCommand(SGPropertyNode const*) ()
#25 0x0000000000fede8f in SGBinding::innerFire() const ()

Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Canvas

Who is online

Users browsing this forum: No registered users and 3 guests