plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

In the upcoming flighting, we've changed the behaviour of the content.xml file. If your addon uses this file, please read this article!

Please take a moment to read the platform’s guidelines before you get started!


question

ChrisSMS avatar image
ChrisSMS asked ChrisSMS commented

Event ENGINE_AUTO_SHUTDOWN causes CDT...!

Hello everyone,

Everything is in the title: During different tests of the use of the Events quoted (>K:ENGINE_AUTO_SHUTDOWN), I systematically find myself with a CTD! It's a total shutdoun...! I should point out that this occurs on a small jet. I used this Event on a propeller plane with a standard engine without any problem...

Could the Asobo team examine the problem so that this Event only stops the engine...?

Thanks in advance, and good flights!

aircraftbugctd
2 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image FlyingRaccoon ♦♦ commented ·

Hello @ChrisSMS

Can you follow the guidelines given here and provide us with a full dump file please?
How to report a bug or crash - MSFS DevSupport (flightsimulator.com)

Where do you trigger that event? Behavior file? Wasm gauge?

Regards,
Sylvain

0 Likes 0 ·
ChrisSMS avatar image ChrisSMS FlyingRaccoon ♦♦ commented ·

Hi Sylvain,

Did you already download my dump...? I need space on OneDrive!


0 Likes 0 ·
ChrisSMS avatar image
ChrisSMS answered FlyingRaccoon commented

Hi Sylvain (@FlyingRaccoon),

Glad to see you are still here...!

The dump file (24392) is an engine shutdown after loading the plane on a runway... It can be downloaded on the following link:
https://1drv.ms/u/s!AsjJseRxO7gQqgAHmNqXqTIUjHhg?e=uA8a8e

Let me know when you have downloaded this file on OneDrive! I can give you a link to another dump file, which I couldn't put on OneDrive because of space constraints. This second dump file is a reactor shutdown after an automatic start (Ctrl+E), because I want to be able to manage a startup my way!
In both cases, it is simply an RPN code that is outside the Behavior file, in an xml gauge. Personally I prefer to have my RPN code in separate gauges from the Behavior, because I find it easier to find my way around due to the complexity of the code.

Thank you for continuing to help us!

Chris

7 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image FlyingRaccoon ♦♦ commented ·

Hi @ChrisSMS


I got your dump, you can clear it. :) Thank you.
Can you send me the xml gauge file or your package so I can try to reproduce the crash please?
The dump file confirms it happens in an XML gauge evaluation but I miss a bit of context.

Regards,
Sylvain

0 Likes 0 ·
ChrisSMS avatar image ChrisSMS FlyingRaccoon ♦♦ commented ·

Hi Sylvain,

Here is the very simple code:

<Element>
  <Select>
    <Value> 
      <!-- Arrêt du moteur si pas de haute pression -->
      (L:HautePression, bool) 0 == 
      (A:GENERAL ENG COMBUSTION:1, bool) 1 == and 
      if{
        (>K:ENGINE_AUTO_SHUTDOWN)

        <!-- permet le redémarrage en vol si réduction rapide -->
        (L:ReductionRapide, bool) 1 == 
        if{ 
          0 (>L:ReductionRapide, bool)
          0 (>L:CheckRPM, bool)
        } 
      }

    </Value>
  </Select>
</Element>



0 Likes 0 ·
FlyingRaccoon avatar image FlyingRaccoon ♦♦ ChrisSMS commented ·
@ChrisSMS I just tested this by creating an XML gauge for the SDK GaugeAircraft sample and didn't encounter any issue. The engine shut down as expected.

So I'll need your package sources to see if something else is causing the issue here.

Regards,
Sylvain

0 Likes 0 ·
Show more comments
ChrisSMS avatar image ChrisSMS FlyingRaccoon ♦♦ commented ·

If you want, I can send you the package..., knowing that it's really a work in progress. But I won't give the link here...! How could I send you that?

0 Likes 0 ·
Simbol avatar image
Simbol answered Simbol commented

Could be you missing the engine parameter to execute the shutdown?

R.

2 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

ChrisSMS avatar image ChrisSMS commented ·

What parameters...?


0 Likes 0 ·
Simbol avatar image Simbol ChrisSMS commented ·

Well you want to shutdown an engine, it is a jet.. which engine? I believe you have to pass this.. try passing the engine number or using the ENGINE event first with an engine number followed by the shutdown.. in passing looks like the documentation here is missing something..


1654810733611.png

R.

0 Likes 0 ·
1654810733611.png (14.0 KiB)
Simbol avatar image
Simbol answered ChrisSMS commented

You have also the ignition switches.. for each engine.. try those

1654811051650.png


1654811051650.png (23.3 KiB)
1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

ChrisSMS avatar image ChrisSMS commented ·

Raul,

I just tried your first suggestion: CDT...! I specify that on a propeller engine, with carburetor, old model, the ENGINE_AUTO_SHUTDOWN command works without problem, and without any preparation. Moreover, if I have to do a lot of manipulation with a shutdown..., it is not automatic anymore....!

But thanks for your help! I will wait for the result of the dump sent to Sylvain...

0 Likes 0 ·
RXP avatar image
RXP answered RXP edited

Wouldn't this be a situation where having a log file would help having the context of what is happening, in which order, and causing what outcome?


re: Add a way to view CTD (crash) logs to identify the cause - MSFS DevSupport (flightsimulator.com)

4 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

EPellissier avatar image EPellissier ♦♦ commented ·
If the dump file Sylvain looked at is not enough to identify the issue precisely, I doubt a log file would help a lot.

Best regards,

Eric / Asobo

0 Likes 0 ·
RXP avatar image RXP EPellissier ♦♦ commented ·

I agree with you and I never doubt that with a dmp and the pdb(s), you'd be able to, and certainly better than any of us!

I meant for us only, 3rd party devs, especially if these types of CTDs can be due to conflicting mods or malformed entries, and if the log file would show what was loaded prior and what operation was taking place prior.

0 Likes 0 ·
FlyingRaccoon avatar image FlyingRaccoon ♦♦ RXP commented ·
We will consider dumping what's displayed in the devmode console in a file.

Doesn't hurt anyone and it can be useful in a few cases.
But I doubt it will be of any use in the case of end user CTD.

Regards,
Sylvain

1 Like 1 ·
Show more comments
FlyingRaccoon avatar image
FlyingRaccoon answered ChrisSMS commented

Hello @ChrisSMS

I made some progress on this. Here's what I found.

The crash occurs because the Gauge RPN evaluation function is re-entrant but not designed for it.
The unique RPN evaluator context is altered when you send an event that is also listened to in your Trap_Events.xml gauge.
The evaluator starts to execute the StartupMSFS.xml RPN code, sends the K event, then immediately starts to execute the event callback RPN code in Trap_Events.xml, overwriting the StartupMSFS context and that's causing the crash.

This code has not been modified by Asobo so I'm not sure how it could work with FSX. I need to do further investigations for this as this is not something we will modify without strong knowledge on the consequences.

In the meantime, you can either:

- Remove any call to an event you are watching in Trap_Events.xml or remove the callback itself
or
- Use Behavior's InputEvents Bindings to handle events callbacks instead of the legacy gauge <Keys>

Regards,
Sylvain

3 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

ChrisSMS avatar image ChrisSMS commented ·

Sylvain,
I also continued my tests, and I see that the problem is not really the interception of the "ENGINE_AUTO_START" Event via <KEYS>: This interception works fine. But, (>K:ENGINE_AUTO_SHUTDOWN) in an .xml gauge systematically crashes the simu. If the (>K:ENGINE_AUTO_SHUTDOWN) is placed in the Behavior..., it works without any CDT...!

I hope this will help you to find the problem!

Greetings, and good flights!
Chris

0 Likes 0 ·
FlyingRaccoon avatar image FlyingRaccoon ♦♦ ChrisSMS commented ·

"the problem is not really the interception of the "ENGINE_AUTO_START" Event via <KEYS>: This interception works fine. But, (>K:ENGINE_AUTO_SHUTDOWN) in an .xml gauge systematically crashes the simu."

It's a combination of both. The game crashes if the gauge sends an event that it also watches. Removing the send or the watch solves the issue.

And moving one of those to the Behavior solves the issue as the Behavior processor has been designed by Asobo to handle this case.

0 Likes 0 ·
ChrisSMS avatar image ChrisSMS FlyingRaccoon ♦♦ commented ·

OK..., I understand the problem better! In the meantime, I found a solution for my startup by intercepting the automatic startup by <KEYS>, and placing the automatic stop in the Behavior; now everything works fine...

Thanks for taking the time to respond Sylvain! I really appreciate it.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.