sonixd icon indicating copy to clipboard operation
sonixd copied to clipboard

White Screen Crash (memory leak?)

Open whorfin opened this issue 3 years ago • 4 comments

Describe the bug After running for some time [with continuously looped playback of mostly FLAC albums], Sonixd will stop playing. When I go to look, I see the app is just displaying a white screen - the top menu bar is still present on macOS, but the app is just a white screen which won't respond. With electron apps this sometimes means the "render process" crashed? And indeed I get a Sonixd Helper (Renderer) crash file, one of which is attached. I see v8::internal::FatalProcessOutOfMemory and a colossal 37.3G Virtual Size, so perhaps there is a memory leak?

Desktop (please complete the following information):

  • OS: macOS 10.13.6
  • Version 0.11.0

Sonixd Helper (Renderer)_2022-01-17-195748_musicbox.crash.txt

whorfin avatar Jan 18 '22 23:01 whorfin

I haven't personally experienced any significant memory leak, but I also don't have access to a macOS device to test your specific environment.

I have some suspicions on what could be causing it, but without being able to reproduce it on my side makes it hard to troubleshoot. If anyone else is experiencing this on any OS please let me know!

jeffvli avatar Jan 19 '22 07:01 jeffvli

It takes 5 days of running continuously for the crash to happen. A few things I've noticed: after running for a few days the (Renderer) app was at 1.17GB memory usage When quit/relaunched and back to playing the same albums, it was at approximately 272MB Watching "Total Memory" consumption of that process while running, I see it consume approximately .01MB every 4 seconds or so; it will stop leaking for periods of time then start back up

Behavior on Windows is quite different - the --type=renderer process starts at lower memory, but I do notice it slowly grow on track changes. FWIW on Windows i'm using Sysinternals "Process Explorer" and observing "Working Set" size. The pattern isn't such a clear slow growth, but it does seem to be very slowly growing. I'm using the "Gapless" preset for what it's worth, and a non-default audio interface. Within 10 minutes it's grown from approx 127M to 195M. I'll let it run on windows for a while and see what happens.

whorfin avatar Jan 19 '22 21:01 whorfin

6 hours later, hovering around 240-243MB so it certainly seems there is a leak but it behaves differently on different platforms

whorfin avatar Jan 20 '22 03:01 whorfin

Thanks for testing! I'll leave this open for now since it could be a multitude of reasons for the memory leak (including chromium itself). I'm not sure I have a specific plan to debug this as of now since it would require quite a bit of time investment to troubleshoot and disabling/enabling features.

jeffvli avatar Jan 20 '22 15:01 jeffvli