Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

Severe memory leak crashing computer #5

Open
mlidbom opened this issue Dec 12, 2020 · 11 comments
Open

Severe memory leak crashing computer #5

mlidbom opened this issue Dec 12, 2020 · 11 comments

Comments

@mlidbom
Copy link

mlidbom commented Dec 12, 2020

My computer just went belly up completely for the second time in a week. This time I looked into it. The first error in the chain of the total crash was this:

Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: tidal-lyrics.exe (22328) consumed 63648477184 bytes, oracle.exe (8108) consumed 21085532160 bytes, and vmmem (25552) consumed 3110047744 bytes.

64 Gigabytes. That's a lot for a lyrics display program :)

@mlidbom mlidbom changed the title Severe memory leak crashing computer at 64GB memory usage. Severe memory leak crashing computer Dec 12, 2020
@mlidbom
Copy link
Author

mlidbom commented Dec 12, 2020

OK, I'm running it again now while carefully monitoring memory usage. No leak so far. If it was going to reach 64GB through linear growth I should have seen a clear growth by now. So the leak is, at a guess, triggered by some exceptional circumstance which causes a rapid growth. So this might turn out to be very problematic to reproduce and diagnose. And thus I'm not comfortable leaving it running. Computer crashes can have unfortunate consequences.

Here's what I would suggest as an interim amelioration: Make the builds 32bit so that only the tidal-lyrics.exe process goes down if this happens rather than users computer.

@1nikolas
Copy link
Owner

Hello. First of all thanks for all the feedback, I really appreciate it.

About the memory leak. Next time this happens, try to take a screenshot of the task manager with the "tidal-lyrics" expanded
image
If there are too many items (cmd processes), then it's related to the script running periodically (the app uses a script to get the song info from the Tidal window title). If it's just one tidal-lyrics sub-process taking all the ram, then it's related to the code and I could probably somehow detect that and restart the app if it happens (or even fix it if it's possible).

I'm trying to avoid 32bit builds because the Electron framework isn't known about its good performance. There is a big discussion about Electron if it should be used or not mainly due to its performance issues. So I think making it 32bit won't be a good idea.. But let's try to diagnose the problem first

@mlidbom
Copy link
Author

mlidbom commented Dec 12, 2020

Now I really appreciate this program and the work you're doing. But In the current state I'm not willing to run it except while being there and specifically using and monitoring it.

Given a couple of crashes per week when it was running constantly the odds of catching the problem during short running sessions seems quite small. I cannot be on high alert non-stop to try and catch the problem when it occurs. There is no warning. Once the screen started glitching there was nothing I could to. My workstation did not respond to input and down it went.

My workstation suddenly crashing hard due to an out of memory state is not a small thing to me. I may lose work, I may get corrupted drives, vital work programs that don't work etc. I may end up having to reinstall my workstation from scratch costing days of work time since it contains various software that is quite time consuming and quirky to get up and running and configured. This lyrics app is not valuable enough for me to risk that.

@1nikolas
Copy link
Owner

I totally understand.. But this problem has never occurred to me even though I use this app on a daily basis. If you think that a 32bit version can fix that problem I can get send you one (and add a 32bit build on future versions)

@mlidbom
Copy link
Author

mlidbom commented Dec 12, 2020

Well I just thought that a 32 bit program cannot go above 3GB or so of memory usage, thus it should not be able to bring down my computer. But if the problem occurs through many forked processes. Well....
If a 32 bit build is not hard for you to produce I would be willing try leaving it running and hopefully only that process will crash. If my workstation still crashes hard though I'm bailing from the experiment :)

@1nikolas
Copy link
Owner

Okay I'll send you a 32bit build

@1nikolas
Copy link
Owner

Okay, that took a while. I had to setup a 32bit Windows VM and build it from there. And because it was a Windows 7 VM I realized that it's not even working on Windows 7 (oh no!). Anyway the installer maker was failing for some reason so here is a zip version of the app (just extract it somewhere and run tidal-lyrics.exe. Also: Right click the exe -> Send to -> Desktop (Create Shortcut) -> Put the shortcut wherever you like)
https://www.dropbox.com/s/qvv5xffdl594zyy/tidal-lyrics-win32-ia32.zip?dl=0

So theoretically this version should have the same problem with the 64bit version, but it won't crash the whole computer and instead be "not responding" after using 3gb of ram, right? But that's only if there is a memory leak in the program itself. If it's spamming cmds, it could still crash the computer. I don't think this would happen though, I programmed it to wait 1 second before opening the next cmd. So even if the cmds remain open, it will take lots of time to fill up the ram. And on top of that it shouldn't open any extra cmd if another is running (I had my computer freeze lots of times in the making of the app due to cmd spam that's why I added that safety measure). So yeah that's 99% a code/Electron memory leak..

Anyway, I suggest you try the program when you are not doing anything important just to be sure so at least you won't loose any files etc

@mlidbom
Copy link
Author

mlidbom commented Dec 12, 2020

Awesome.
I replaced the files in my old install folder with these, and it worked like a charm in a test run.
Thank for going to all that effort. Sure hope I'll be able to help with debugging this.
It will have to wait until tomorrow though and there are zero guarantee about if or when it happens again.
I'll let you know as soon as I have anything more meaningful to share.

Thank you :)

@mlidbom
Copy link
Author

mlidbom commented Jan 2, 2021

FYI: Unfortunately there will most likely be no more updates from me on this issue any time soon. My trial of Tidal has expired and I have decided not to keep the subscription.
Thanks for all the effort you put into this. Sorry I wont be able to help any more.

@1nikolas
Copy link
Owner

1nikolas commented Jan 2, 2021

@mlidbom It's okay. Thanks for all your help on this project. And happy new year

@mlidbom
Copy link
Author

mlidbom commented Jan 2, 2021

@1nikolas Happy new year :)

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

No branches or pull requests

2 participants