Board index FlightGear Support Compiling

[SOLVED] Again? basic_string::_M_construct null not valid

Building FlightGear from source, and in the need for help?

[SOLVED] Again? basic_string::_M_construct null not valid

Postby mifi » Tue Apr 30, 2019 6:22 am

hi all

I am normally compiling flightgear and simgear from the latest sources, so I am running a development version on Ubuntu 18.04.
During the past couple of days, I am getting the following error:

basic_string::_M_construct null not valid


And then it crashes with a segfault and dumps core.
This happens pretty soon after starting fgfs, during initialisation. It never gets me into the gui, so I cannot reproduce the version strings or numbers.

I have searched the board for this, but the last time this occurred seems to have been in 2015.
Has this been noticed by anybody else?

I am willing to look and the core with gdb, but it has been a while, so I have to find out how to leave the symbols in the binary first. I wanted to check if this error has already been inspected before I dive into the details.
Last edited by mifi on Wed May 01, 2019 7:09 am, edited 1 time in total.
mifi
 
Posts: 316
Joined: Mon Jul 23, 2007 3:24 pm
Location: NL
Version: git next
OS: Ubuntu 16.04.x Gnome

Re: Again? basic_string::_M_construct null not valid

Postby AndersG » Tue Apr 30, 2019 7:28 am

How often do you build FG? If you haven't tried it, do a "make clean" and rebuild all of SG and FG. You might also try to run cmake again.

I built SG and FG on April 27 and it seems to work fine - but that may well be due to the gcc version - "gcc version 8.3.0 (Debian 8.3.0-2)" for me.
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2448
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Again? basic_string::_M_construct null not valid

Postby rominet » Tue Apr 30, 2019 7:53 am

It's a real bug that became visible (on April 27!) when ENABLE_HID_INPUT was switched to ON by default (FG commit 9d71d0907227eb8e79e8ee02f539248baf79016a). Compile with -DENABLE_HID_INPUT=OFF and you won't see the problem. It has been reported here (you need to comment out the try ... catch in main() [flightgear/src/Main/bootstrap.cxx] in order to be able to get a backtrace with gdb instead of the “Fatal exception” message box... that's why this recurring problem is particularly annoying, added to the fact that the error is silent on OS X, apparently).
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Again? basic_string::_M_construct null not valid

Postby mifi » Tue Apr 30, 2019 4:15 pm

AndersG wrote in Tue Apr 30, 2019 7:28 am:How often do you build FG? If you haven't tried it, do a "make clean" and rebuild all of SG and FG. You might also try to run cmake again.


I normally build almost every day, but I have not explicitly run cmake.
mifi
 
Posts: 316
Joined: Mon Jul 23, 2007 3:24 pm
Location: NL
Version: git next
OS: Ubuntu 16.04.x Gnome

Re: Again? basic_string::_M_construct null not valid

Postby mifi » Tue Apr 30, 2019 4:19 pm

rominet wrote in Tue Apr 30, 2019 7:53 am:It's a real bug that became visible (on April 27!) when ENABLE_HID_INPUT was switched to ON by default (FG commit 9d71d0907227eb8e79e8ee02f539248baf79016a). Compile with -DENABLE_HID_INPUT=OFF and you won't see the problem. It has been reported here (you need to comment out the try ... catch in main() [flightgear/src/Main/bootstrap.cxx] in order to be able to get a backtrace with gdb instead of the “Fatal exception” message box... that's why this recurring problem is particularly annoying, added to the fact that the error is silent on OS X, apparently).


Ok, thanks for the confirmation. It was already reported, including stacktrace etc.. Great.
Thanks a lot.
No need for me to dive into the debugging process again.

The -DENABLE_HID_IPUT=OFF is a good workaround, no doubt. I will try that. Thanks again.
mifi
 
Posts: 316
Joined: Mon Jul 23, 2007 3:24 pm
Location: NL
Version: git next
OS: Ubuntu 16.04.x Gnome

Re: Again? basic_string::_M_construct null not valid

Postby rominet » Tue Apr 30, 2019 4:48 pm

Don't forget the N in INPUT. :wink:

By the way, people using an up-to-date download_and_compile.sh script can do the following:
Code: Select all
FG_CMAKEARGS='-DENABLE_HID_INPUT=OFF' download_and_compile.sh <usual options>

(and in <usual options>, -j$(nproc) is quite useful and not really as notorious as it would deserve, I believe).
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Again? basic_string::_M_construct null not valid

Postby mifi » Tue Apr 30, 2019 5:12 pm

rominet wrote in Tue Apr 30, 2019 4:48 pm:Don't forget the N in INPUT. :wink:

By the way, people using an up-to-date download_and_compile.sh script can do the following:
Code: Select all
FG_CMAKEARGS='-DENABLE_HID_INPUT=OFF' download_and_compile.sh <usual options>

(and in <usual options>, -j$(nproc) is quite useful and not really as notorious as it would deserve, I believe).


Ehhh, right :-)

Thanks. the -DENABLE_HID_INPUT=OFF did it. I can fly again. Thanks again.
m
mifi
 
Posts: 316
Joined: Mon Jul 23, 2007 3:24 pm
Location: NL
Version: git next
OS: Ubuntu 16.04.x Gnome

Re: [SOLVED] Again? basic_string::_M_construct null not val

Postby rominet » Sat May 25, 2019 3:08 pm

The workaround isn't needed anymore.
rominet
 
Posts: 557
Joined: Sat Nov 01, 2014 1:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: [SOLVED] Again? basic_string::_M_construct null not val

Postby mifi » Sun May 26, 2019 4:11 pm

rominet wrote in Sat May 25, 2019 3:08 pm:The workaround isn't needed anymore.


Thanks!
mifi
 
Posts: 316
Joined: Mon Jul 23, 2007 3:24 pm
Location: NL
Version: git next
OS: Ubuntu 16.04.x Gnome


Return to Compiling

Who is online

Users browsing this forum: No registered users and 0 guests