Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suspected memory leak related to joystick axis #1849

Open
tigert opened this issue Oct 28, 2024 · 1 comment
Open

suspected memory leak related to joystick axis #1849

tigert opened this issue Oct 28, 2024 · 1 comment

Comments

@tigert
Copy link
Contributor

tigert commented Oct 28, 2024

Describe the bug
It seems that joystick axis are leaking memory somewhere - we had a case in discord where user reports MF stopping functioning mid-flight and then turns out they have several joystick axis configured as inputs.

I can reproduce it myself.

For me I need to enable either info or debug log, and then move the axis back and forth, and with the above ~256 copies of the input config, everything works, but memory footprint grows 28MB each time I move the axis back and forth.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Add an input config for a joystick axis, @ 2.0001 / 16383 - -16383 max 16383 min (>K:ELEVATOR_SET)

  2. Duplicate the input config say 100-200 times (ctrl-a, right click -> duplicate, ctrl-a .... repeat 10 times and you got enough..)

  3. Enable logging

  4. See memory footprint in task manager while moving the joystick axis.

Expected behavior
Do not grow the memory footprint constantly

Actual behavior
Memory footprint grows when joystick axis is moved. This seems related to logging for me, but the user who reported this on discord sees this also without logging.

Details

  • MobiFlight Version: 10.4.0
  • FlightSim: irrelevant (happens with MF variables too, even when no sim is running)
@tigert
Copy link
Contributor Author

tigert commented Nov 8, 2024

Comment from MavOne96 on discord: the memory leak happens for them even when logging is turned off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant