invernyx / smartcars-3-bugs

The bug tracker for the smartCARS 3 application
3 stars 0 forks source link

[BUG] - SmartCars3 crashes every time #374

Open atanneberg opened 5 months ago

atanneberg commented 5 months ago

Describe the bug

After a fresh start of XP12 and a fresh start of SC3, connected to my VA and to XP12, flight started SC3 uses 162 MB of RAM which seems normal.

But to me it looks like there is a memory leak in the SC3 App as it constantly increases the RAM-usage over the runtime and it finally crashed during flight at around 14Gb RAM (!!!) usage which is more than the XP12 itself with orthos and other add-ons needs ( XP12 was using about 9-10GB during this flight)

My Mac has 32GB of RAM and the crash happened shortly after the physical RAM was completely used and the system started to use memory swapping.

Attached you will find the MacOS Crash-Log for SC3 – the SC3 I am using is the latest available from your website, version 3.1.1 which is still Intel only , so it uses rosetta to run.

I really would like to use SC3, but as it crashes every flight it is unusable at the moment.

How do you reproduce this bug?

It is happening every time. After SC3 has occupied all available memory during flight it crashes

Expected behavior

No excessive memory use during run-time, not crashing

Screenshots

No response

Operating system

MacOS Sonoma

Community airline

Walker Air

smartCARS Version

3.1.1

Plugins installed

chat, flight center, flight tracking, logbook, map, simbrief

Additional context

There was already a mail-thread to the ticket no: Ticket 18705 with further information, no solution provided so far but ticket closed

atanneberg commented 5 months ago

SC3 MacOS Crash-Log.txt

GenericNerd commented 5 months ago

@Thien42 can you look into this when you get the time please?

tinroof commented 5 months ago

This appears to be related to issue #352. Can SC3 be launched from a command line in Mac? Doing so in Linux is informative prior to the SC3 crash.

atanneberg commented 5 months ago

This appears to be related to issue #352. Can SC3 be launched from a command line in Mac? Doing so in Linux is informative prior to the SC3 crash.

I tried to replicate the crash today while having started SC3 from the terminal. As always as soon as you start the flight the RAM use of SC3 increases permanently and the crash happened as expected after the RAM use exceeded more than 12 GB in activity monitor - a lot more than the whole XP12 was using at that time... Additionally the CPU usage of SC3 is above 50% during the whole flight which also seems to be way to much for it.

Attached two logs; one is the MacOS Crash Report for SC3, the other is the terminal ouput of the whole flight until the crash happened.

Error Report SC3_Feb_05_2024.txt

Terminal_Output SC3_run_via-Terminal_Feb_05_2024.txt

GenericNerd commented 4 months ago

Per @Thien42's recent testing, we can confirm that there is a memory consumption issue which appears to only be present in MacOS. This is important since the same increase in memory consumption is not present in Windows or Linux under similar steps to reproduce.

With this being said, we believe there is an issue with a memory leak in one of our dependencies specifically on MacOS (the most likely being Electron). We'll keep this thread up to date as there are developments.

atanneberg commented 4 months ago

Thanks for the confirmation

GenericNerd commented 4 months ago

@atanneberg It's absolutely fine, I'm sorry we really don't have anything else to say at the moment!

tinroof commented 1 month ago

I've reported this elsewhere however for completeness I also add this here.

I have recently been able to isolate the SC3 CTD behavior to tracking flights whilst logged into my TFDI Pro Account. With the release of 3.2 the time frame for CTD has yet to exceed an hour. Shortest being 20 mins.

If I skip logging into my TFDI account and instead log in to a community account, flights can be tracked indefinitely as far as I can tell. I just completed a 10+ hour long haul without incident flying with Compass Virtual. Until I established this I was finding myself unable to fly with SC3 on my own and for a VA. At least with this knowledge I can return to contributing to a VA.

I am running Linux and others reporting this are running MacOS. I have been informed by a fellow Windows pilot that this CTD issue had been plaguing his attempts to record flights. He also benefited by not logging into his TFDI account. So OS may not be a contributing factor here.

Hopefully this proves informative to the developers

Rusty