edgetx icon indicating copy to clipboard operation
edgetx copied to clipboard

Companion crashes when a SoarETX F5J model is active for 10min

Open neuhausj opened this issue 1 year ago • 3 comments

Is there an existing issue for this problem?

  • [X] I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Companion

Current Behavior

  1. The F5J model from SoarETX has a memory leak which leads to a "Lua disabled" message. When restarting the simulator, the whole Companion app crashes.

This is repeatable on both Mac and Linux with latest build (2.10.4)

Expected Behavior

Simulator should not crash Companion but restart "fresh". SoarETX F5J model should be check for a potential memory leak.

Steps To Reproduce

  1. Start Companion and hit New button
  2. Start the simulator
  3. Create a new F5J model from SoarETX_v2
  4. Wait ~10min, simulator will displayed "Lua disabled"
  5. Click on restart simulator
  6. Simulator+Companion will both crash

This is repeatable on both Mac and Linux with latest build (2.10.4)

Version

2.10.4

Transmitter

RadioMaster TX16S / TX16SMK2

Operating System (OS)

macOS, Windows

OS Version

MacOS 14.6.1 and Windows 11 23H2

Anything else?

This is the Lua crash after ~10min: image Restarting the simulator will lead to a full Companion+Simulator crash

neuhausj avatar Sep 03 '24 22:09 neuhausj

I can't reproduce this on my Mac - are you using the latest version of SoarETX_v2?

philmoz avatar Sep 03 '24 23:09 philmoz

I just double checked again, and used EdgeTX buddy to redownload the whole SD card content for the simulator. I stopped it after 2000s (~30min) without having any Lua error.

I then compared the content of the SD card with my previous one. Only diff was a personal template added (should make no ) + luac files for a few widgets.

On the brand new simulated SD, I then opened and closed all menus of the SoarETX widget and Lua got disabled after a few minutes. I retried everything from scratch (redownload SD card content) and got the same result again after opening all menu from F5k SoarETX_v2 and letting the simulator run. Here is the crash log and the SD card content (brand new from EdgeTX + only luac compiled for the F5k menus):

What is an effective way to debug memory usage in lua?

logCrashSimu.txt SDSim3.zip

neuhausj avatar Sep 04 '24 12:09 neuhausj

Will take a look at this.

frankiearzu avatar Sep 14 '24 03:09 frankiearzu