Version: 1.36.2 (recent regression)
Context: All aircraft using H:Events, in flight.
H:Events are confused when SimVar.GetRegisteredId is used across flight restart. See the second post in this thread for repro steps and investigation.
Hello. Multiple times now I have gone to debug a problem with my aircraft, and in the process of testing each part, I discover that one of my unique H:Events does not have the correct effect. Using an instrument which prints ‘interaction’ events to
console.log, I find that while I send one event by name, a differently named event is immediately received, it is an entirely different unrelated event. I have only ever seen a single impacted H:Event at a time. The incorrect H:Event name is a valid string, in this most recent case it was an H:Event for something used in RPN when clicking a knob.
I’m sending events with an unmodified
SimVar.SetSimVarValue and receiving events to
BaseInstrument!onInteractionEvent. The erroneous event is received on all instruments, not just the instrument from which the event was sent. I am sending these using the Coherent console, which rules out any internal string confusion within my compiled js assets.
UPDATE See my second post in this thread for repro steps
Unfortunately for this bug I don’t have the specific repro case, but I wanted to report this anyway because I am doubtful that I’m the only person to have seen this behavior. If there is some internal event confusion, then the actual root cause could explain many different behaviors that are inconsistently displayed across users. Restarting the sim causes the event to start working again, and for the issue to evaporate, evading further analysis. I can’t think of what components in my aircraft could impact this, but I do use
execute_calculator_code to dispatch H:Events from WASM since I don’t know of another approach. Notably though, the specific H:Events that I have observed with the faulting behavior aren’t touched via WASM.
Additionally, I didn’t have an empty Community folder, I had the GTN750 addon loaded. That is a pure JS avionics suite. I expect that means the same APIs I am working with above, so I don’t see how it could be a conflict of any kind. As I said when I reload the sim the bug is already gone.