Pierre discovered important information about the issue: H events become crazy after a flight restart
- This is new in SU14 and a very recent regression
- There is a 100% repro case
- The issue does seem to be the index relationship that powers
setValueReg_Number
vssetValue_Number
is not fully cleared during flight restart.
Repro steps are:
- Load an aircraft (I used the JN4 for this test)
- Using the coherent console, open VCockpit01 (I think) context
- Register to see H:Events:
Coherent.on('OnInteractionEvent', (_, [name]) => {
console.log("test event received: " + name);
});
- Send an event:
SimVar.SetSimVarValue("H:TEST_EVENT_1","number",0);
- Observe
test event received: TEST_EVENT_1
- Now go to the menu and Restart the flight. Wait for the flight to load and press Fly Now.
- (same as step 3) Register to see H:Events.
- (same as step 4) Send an event:
SimVar.SetSimVarValue("H:TEST_EVENT_1","number",0);
- 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:
- Send these commands:
SimVar.g_bUseWatcher = false;
SimVar.SetSimVarValue("H:TEST_EVENT_1","number",0);
SimVar.g_bUseWatcher = true;
- Observe
test event received: TEST_EVENT_1