H events become crazy after a flight restart

We are using some H events posted from one HTML gauge and triggered in another one.
That works fine until we issue a flight restart.
Then the posted H event is not the one sent to the other gauge by the engine.
We have found a workaround that consists of disabling the SimVar watcher feature:

postHEvent(event) {
    let useWatcher = SimVar.g_bUseWatcher;
    if(useWatcher)
        SimVar.g_bUseWatcher = false;
    SimVar.SetSimVarValue("H:" + event, "number", 0);
    if(useWatcher)
        SimVar.g_bUseWatcher = true;
}

I suspect that a flight restart doesnā€™t reset some internal engine H event table indexed by number.
We suspect this error to occur from SU14 but we are not sure about that. We never seen it before. It currently happens on v1.36.2.0

1 Like

If I understand you correctly, itā€™s the same behavior I reported here: I send H:Event `A` but all instruments instead receive H:Event `B`

Iā€™m curious about your workaround but my issue was not 100% repro. I restart after SDK rebuild though so most of my tests will be on a ā€˜restartā€™ flight, very curious you also found this detail.

Yes, it looks to be the same issue. Sorry I didnā€™t see your post.
Maybe both could be merged.
Happy to see that Iā€™m not the only one.
I think this is a real bug in the engine. Not a detail because that breaks some part of our product.
Waiting for a fix, you could try the workaround even if not really ā€œelegantā€.