Possible memory leak in fsEvents KeyEventHandler

Version: 1.3.23.0

Frequency: Consistently

Severity: High

Context: Any wasm gauge in flight

Bug description:

After a call to fsEventsRegisterKeyEventHandler in gauge init, I observe that the amount of allocated memory for that gauge increases by a small chunk with every event received. The numbers quickly add up if there’s lots of events going around. Doesn’t matter what’s the content of the actual event handler function, can be empty.

Repro steps:

  1. Define:

    void keyHandler(FsEventId eventId, FsVarParamArray* param, void* userParam)
    {
    }

  2. call in gauge init:

fsEventsRegisterKeyEventHandler(keyHandler, nullptr);

  1. Simply interact with the sim or add a code that sends key/axis events with every gauge update. Monitor gauge memory debugs.

Attachments:

1 Like