I send H:Event `A` but all instruments instead receive H:Event `B`

Pierre discovered important information about the issue: H events become crazy after a flight restart

  1. This is new in SU14 and a very recent regression
  2. There is a 100% repro case
  3. The issue does seem to be the index relationship that powers setValueReg_Number vs setValue_Number is not fully cleared during flight restart.

Repro steps are:

  1. Load an aircraft (I used the JN4 for this test)
  2. Using the coherent console, open VCockpit01 (I think) context
  3. Register to see H:Events:
Coherent.on('OnInteractionEvent', (_, [name]) => {
  console.log("test event received: " + name);
});
  1. Send an event: SimVar.SetSimVarValue("H:TEST_EVENT_1","number",0);
  2. Observe test event received: TEST_EVENT_1
  3. Now go to the menu and Restart the flight. Wait for the flight to load and press Fly Now.
  4. (same as step 3) Register to see H:Events.
  5. (same as step 4) Send an event: SimVar.SetSimVarValue("H:TEST_EVENT_1","number",0);
  6. Observe that no event is received.

At this point you can observe that H:TEST_EVENT_2 (a not-previously-used event) is working fine.

You can also observe that Pierre’s fix works:

  1. Send these commands:
SimVar.g_bUseWatcher = false;
SimVar.SetSimVarValue("H:TEST_EVENT_1","number",0);
SimVar.g_bUseWatcher = true;
  1. Observe test event received: TEST_EVENT_1
2 Likes