Board index FlightGear Development Spaceflight

Space Shuttle - Flight

Discussion about development and usage of spacecraft

Re: Space Shuttle - Flight

Postby Thorsten » Sat Apr 04, 2020 5:36 am

i'm wondering what's happening if you leave it on... things should work properly with it on but if not, we (TINW) need to figure out why...


There's two observations which are possibly relevant:

1) I've noticed all sorts of random, non-reproducible glitches (SRB sep was and the boosters overtook the Shuttle, the AP at a transition went crazy, the sound stopped working, the launch monitoring routine referenced a property which it conceptually should not be able to and crashed...) - and that smells like a general memory corruption issue. These issues pretty much disappeared when switching the new Nasal GC off

2) eatdirt specifically has noted segfaults when trajectory predictions are computed. Since trajectory prediction uses thread.newthread() to not block the main loop, chances are that the threaded GC does not take into account the possibility that Nasal itself may run in its own thread and that occasionally causes a segfault - again these crashes did not occur when testing for 24 hours with the threaded Nasal GC off

I believe there's also been a backtrace posted on the mailing list for a #2 crash
Thorsten
 
Posts: 11748
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle - Flight

Postby eatdirt » Sat Apr 04, 2020 1:42 pm

Yep, fully agree with Thorsten. That nasal-gc-threaded=on is clearly not threadsafe, and then generates memory corruption and random errors. Even the AOA at qbarmax gets quite random too.

For the sound, I still have problems even with nasal-gc-threaded=off using latest versions of OpenAL, I would say there is another FG/openAL wide bug there. I've spotted a few other planes in FG having similar issues, like the Seafire. A bug was actually opened for the A320 on some sounds disappearing, exactly like what I am experiencing with the SpaceShuttle. It might be related to transition between exterior and interior sounds, sometimes, I am loosing sound in the cockpit while I still get them in the EVA view.
eatdirt
 
Posts: 653
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Flight

Postby legoboyvdlp » Sat Apr 04, 2020 1:55 pm

Are you on Mac by any chance?
User avatar
legoboyvdlp
 
Posts: 7784
Joined: Sat Jul 26, 2014 1:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Space Shuttle - Flight

Postby eatdirt » Sat Apr 04, 2020 6:05 pm

@lego, no, I am on linux :-/

I've opened a confusing bug report on openAL a while ago

https://github.com/kcat/openal-soft/issues/337

because the bug appeared at openal > 1.17 in my case, at fixed FG version. So it is a combination of what we do in FG with openal changes (the error message in the bug report is not related to the loss of some exterior/interior sounds).
eatdirt
 
Posts: 653
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Flight

Postby legoboyvdlp » Sun Apr 05, 2020 10:03 am

Ah, thanks,

I would have expected reports regarding the sound error on Linux as well, it may not be related. I will try and find the commit shortly that fixed the sounds and see what exactly the issue was there.
User avatar
legoboyvdlp
 
Posts: 7784
Joined: Sat Jul 26, 2014 1:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Space Shuttle - Flight

Postby GinGin » Sun Apr 05, 2020 5:29 pm

Sonic Boom

Image


Arriving into Orbit

Image



MECO, Bomb away :)

Image


Fasten your seatbelt

Image


Bumpy Entry

Image
GinGin
 
Posts: 1129
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Flight

Postby Richard » Mon Apr 06, 2020 1:06 pm

Thorsten wrote in Sat Apr 04, 2020 5:36 am:
There's two observations which are possibly relevant:

1) I've noticed all sorts of random, non-reproducible glitches ...

2) eatdirt specifically has noted segfaults when trajectory predictions are computed. Since trajectory prediction uses thread.newthread() to not block the main loop, chances are that the threaded GC does not take into account the possibility that Nasal itself may run in its own thread...


Firstly the background Nasal GC should still be considered to be experimental even though it is on by default at the moment so that these sort of problems come to light.

1. Theoretically the background Nasal GC should be the same as the "run when necessary" foreground GC - however clearly there is a problem with it - unfortunately it is the very worst sort of error to track down because of the lack of clarity / reproducible test case.

2. Assuming you mean the backtrace in this report viewtopic.php?f=87&t=35077&p=360053#p360035 - it appears to be GC related as the exception is in the allocation code. Generally Nasal threads should be fine as Nasal itself is supposed to be thread safe providing no external access (properties, avoid most Nasal API / lib functions, callbacks into the core etc).

I'm still working on the background Nasal GC - although I don't currently have much of an idea about these problems.
Richard
 
Posts: 785
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10

Re: Space Shuttle - Flight

Postby Hooray » Wed Apr 08, 2020 7:59 pm

Could you elaborate what exactly you have done/tried so far ?
Also, is there anything platform specific to this ? I am asking because the wrapper uses different implementations for Windows/Linux.
Can thread.newthread() be reliably used to repro the bug ? If so, how about adding your changes to the standalone Nasal interpreter and see what's happening, i.e. MINUS fgfs etc ?

At the very least, nasal-bin should be much easier to run inside a dedicated debugger than running all of fgfs.
If Thorsten managed to run the trajectory computation inside a thread, it's presumably self-contained already. So it might even help to produce log files for both version of nasal-bin and see what's happening there.

Speaking in general, this is indeed a dirty thing to debug, because Nasal plays some really low-level pointer tricks to mark its data structures (pools) and keep them in a linked list for re-allocation purposes.

In other words, I don't think there's a good way to troubleshoot this inside fgfs, a standalone nasal-bin build really is our best bet, as is a stripped-down test-case.
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: 11972
Joined: Tue Mar 25, 2008 8:40 am

Re: Space Shuttle - Flight

Postby GinGin » Mon Apr 13, 2020 6:22 pm

Easter Launch from... Easter Island ;)

Image

Image



Chasing the Moon

Image
GinGin
 
Posts: 1129
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Flight

Postby Vinny002 » Thu Apr 16, 2020 1:10 am

Guys, I got a problem with the FG space shuttle launch, the space shuttle stack is standing in the vertical position going for launch, I ran through the checklist, as soon the space shuttle stack lift off from the ground the master alarm coming on, the space shuttle stack started pitching down causing a crash. I got the pitch, roll, and yaw set to auto. Thanks! Cheers!
Vinny002
 
Posts: 67
Joined: Mon Jul 01, 2019 8:55 pm

Re: Space Shuttle - Flight

Postby GinGin » Thu Apr 16, 2020 9:08 am

Vinny002 wrote in Thu Apr 16, 2020 1:10 am:Guys, I got a problem with the FG space shuttle launch, the space shuttle stack is standing in the vertical position going for launch, I ran through the checklist, as soon the space shuttle stack lift off from the ground the master alarm coming on, the space shuttle stack started pitching down causing a crash. I got the pitch, roll, and yaw set to auto. Thanks! Cheers!


Answered you there:

https://forum.flightgear.org/posting.php?mode=reply&f=87&t=35079
GinGin
 
Posts: 1129
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Flight

Postby GinGin » Fri Apr 17, 2020 5:55 pm

Golden Sky

Image



One more Launch

Image



Objective Moon

Image
GinGin
 
Posts: 1129
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Flight

Postby eatdirt » Tue Apr 21, 2020 2:31 pm

Very nice pictures Gingin, as usual!

I've tried Paro (VQPR), it's nice scenery, did not know that one either. I am finding it fine for the Shuttle, it is long enough with an early touch down and "small" flight path angles.

Is that the one you were talking about on the Space Shuttle surprise visit thread?

PARO.webm

Image

Cheers,
chris
eatdirt
 
Posts: 653
Joined: Wed Aug 15, 2018 2:06 pm

Re: Space Shuttle - Flight

Postby GinGin » Tue Apr 21, 2020 3:27 pm

Very nice one.You are becoming skilled :)
Is it a custom scenery ?


Still working on fine tunning the launch ap to meet new SSME performances.
I just touched inital pitch angles of stage 2 and MECO altitude/Gamma ( 340 kfeet for normal one, 360 kfeet for TAL, which were standard value for last STS ops) . And it is easily adjustable by lofting into mission.xml

RTLS and TAL work still really nicely.
ATO really needs OMS assist for early one.


Hot

Image


Image




I really like that one, with elevon downwards for first stage load alleviation. Small detail, but accurate.

Image



And I love the sky color without smog

Image
GinGin
 
Posts: 1129
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Flight

Postby eatdirt » Tue Apr 21, 2020 8:26 pm

Is it a custom scenery ?


Nope, it's standard terrasync but with "Scenery Objects" enabled in the Rendering options. I don't know why, but all your pictures with the "white" ET looks to me extremely photo realistic, it really does add a strong effect to the whole! Super nice!

Very nice one.You are becoming skilled :)


Just get used to how the Shuttle "fly". But each time I am jumping into something not falling like a stone, like a std airliner, I have troubles to land them, they don't want to "fall" by themselves. Fortunately, there is ILS :D
Last edited by eatdirt on Thu Apr 23, 2020 12:10 pm, edited 1 time in total.
eatdirt
 
Posts: 653
Joined: Wed Aug 15, 2018 2:06 pm

PreviousNext

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 1 guest