Board index FlightGear Support Tools FGRun

Sqlite error, FG crashes

FGRun is a no-longer maintained graphical frontend to run FlightGear.

Re: Sqlite error, FG crashes

Postby Hooray » Wed Oct 21, 2015 2:55 pm

We did have a discussion about exactly this a few months (or even years) ago - I suppose that the underlying SQLite tables simply got corrupted - presumably due to some FG related crash during startup or at run-time. Subsequently, that would prevent the SQLite database from being closed properly - looking at the way our atExit() handlers are structured, we are literally begging for trouble here - i.e. it is not exactly clear if/how certain code paths are actually triggered, depending on how the program terminates (fgcommand/exit, vs. window manager closing, vs. segfault/exception) - all of these may very well end up triggering different exit routines, which /may/ contribute to the SQLite becoming corrupted, especially on a OS that does not close files automatically when the process is terminated.

At some point I suggested to integrate SQLite debugging code/statements (EXPLAIN etc) and build FG by default with it included, but the people involved in that code basically disagreed that this would be needed back then:

Subject: Nasal bugfixes - for 2.12?
Hooray wrote:Maybe, there's some SQLite env variable that can be set to dump even more stuff at the SQLite layer ? Like I said, that's on a fairly powerful system and came as a surprise to me, because I didn't expect to see this on Linux at all. If other people can confirm this being the case for them, too I'd seriously consider disabling POI in 2.12 by default until this is solved, simply because it could be a major showstopper for people entirely new to FG, if they have to wait between 5-10 minutes for FG to start up, while looking totally unresponsive ...

As previously mentioned elsewhere, I think we need to look into using SQLite profiling and/or "EXPLAIN QUERY PLAN" to get to the bottom of this, because this has been affecting a number of users/platforms during the last release cycles. Is there a single place where I can patch SQL statements to have the "EXPLAIN QUERY PLAN" prefix and register callbacks for profiling ?
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

Previous

Return to FGRun

Who is online

Users browsing this forum: No registered users and 2 guests