Board index FlightGear Support Interfacing

Help with logging

Connecting two computers, using generic protocol, connecting with Matlab?

Help with logging

Postby Zequinha » Sat Jan 25, 2020 12:30 am

Hi folks,

I am trying to follow the logging procedure described in

https://www.youtube.com/watch?v=HSCp5WfFMo4&t=1s

However, when i click "debug -> logging -> enable logging" FlightGear crashes in versions 2019.1.1 and apparently also on 2018.3.2.

The procedure to enable logging, as described in the video, used to work at least up to version 2017.2.1.

Why is the "enable logging" not working?


Thanks!
Zequinha
 
Posts: 193
Joined: Sun Mar 13, 2016 4:26 pm
OS: GNU

Re: Help with logging

Postby wkitty42 » Sat Jan 25, 2020 4:01 pm

the file writing security was adjusted back in 2017.3.1 to avoid CVE-2017-13709...
Re: [Flightgear-devel] custom logging output file / fix for CVE-2017-13709
CVE-2017-13709 Detail

i think you can tell FG that certain directories are allowed to be written to but i'm unable to easily find this information in the wiki and my google-fu seems to be off this morning :(

when i attempt the same as you describe, i see the following logged in the console and in the fgfs.log file...

Code: Select all
   55.96 [ALRT]:general    The FGLogger logging system, via the '/logging/log/filename' property, was asked to write to 'fg_log.csv', however this path is not authorized for writing anymore for security reasons. Please choose another location, for instance in the $FG_HOME/Export folder (/home/myuser/.fgfs/Export).


the segmentation fault happens afterward when a shutdown appears to be automatically triggered... i have backtraces for the crashing scenario and will forward them to the mailing list for analysis and remediation... [Flightgear-devel] SIGSEGV when attempting to use F10->Debug->Logging with unwritable output path

if i specify a proper and writable path to the output file as given in the error output (/home/myuser/.fgfs/Export/fg_log.csv), there is no problem, no crash, and a proper csv file is written in the specified directory... i did try using "$FG_HOME/Export/fg_log.csv" but the $FG_HOME macro is not expanded and the defect is triggered as well...

for now, the easiest thing to do is to specify a proper path that FG can write the desired output file to...

thanks for the report!

[edited to add link to the dev mailing list thread]
[edited to add link to CVE-2017-13709 Detail]
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6493
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Help with logging

Postby Zequinha » Sat Jan 25, 2020 10:29 pm

Thanks wkitty42!

How do you specify a valid and writeable path? Is that in the Qt launcher?
Zequinha
 
Posts: 193
Joined: Sun Mar 13, 2016 4:26 pm
OS: GNU

Re: Help with logging

Postby wkitty42 » Sat Jan 25, 2020 11:22 pm

you simply write it in the field provided at the top of the form... by default if contains only "fg_log.csv" so you edit the field to put in the path to your $FG_HOME/Export directory with the file name...

eg: /home/myuser/.fgfs/Export/fg_log.csv

the above is for linux which uses ~/.fgfs for $FG_HOME... check the wiki for the location on windows or mac...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6493
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5


Return to Interfacing

Who is online

Users browsing this forum: Google [Bot] and 1 guest