Memory leak, CachyOS
I have a pretty severe memory leak when using SONE installed via flatpak on the latest version of cachy os. Cant run the app for more than 2 minutes without it going over 20GB and causing the app to crash.
My system is using cachyos latest, KDE plasma, wayland, nvidia 595.58.03, amd cpu
Damn this looks bad. I'm out for next 3-4 weeks. Will fix when I come back.
Sone shows high virtual memory usage on NixOS (KDE Plasma), but so does many other process show. I am bit confused what this memory consumption is since swap is still zero and I can remember buying 1.4TB RAM yet. But Sone CPU usage is very high (50%).
The issue likely stemming from webkit and wayland. Starting the app with WEBKIT_DISABLE_DMABUF_RENDERER=1 should fix it. New release by default sets it.
Lmk if the issue is persisting.
@pvchean @Jylpah
@lullabyX I had tried that before to no avail. Although something I noticed was that to face the memory leak I specifically had to start playing music from my collection/Loved Tracks. This list has 1333 tracks if it helps.
I'm having the same issue, my loved tracks has 380 songs. One of my playlists with 500 songs plays fine however. I tried looking for 2 hours to just something useful but there really isnt anything to go by. I noticed you marked this issue as flatpak specific however i installed sone from the aur and its still present, also when i compile the source manually.
I’m seeing a very similar issue on NixOS with Plasma (Wayland session).
The leak only happens when playing from Loved Tracks: WebKitWebProcess memory keeps increasing until the app becomes unresponsive.
Other playlists work fine and do not trigger the leak.
I've installed it using the official flake. I have also tried building from source. Behavior is the same with both.
Same issue on Sone ver 0.21.0-1 Fedora 44 GNOME NVIDIA GPU installed via dnf only caused when trying to play from loved tracks. Playing with the "> Play" button plays only the first song (does not fetch the next), but pressing the "Shuffle" button does not load a random song, the memory-leaking starts and the UI freezes.
Tried the suggested WEBKIT_DISABLE_COMPOSITING_MODE=1 and WEBKIT_DISABLE_DMABUF_RENDERER=1.
sone_r00051.log
Issue #72 seems related.
I can confirm this issue exactly as @MeinChef latest description is: Playing from Loved track lead to more than 10Gb of RAM usage and stuck interface (Althrough sounds keeps ok). Carnage of QTWeb* process kills browser inside panel but music keeps playling. Sounds like electron when crashes.
If needed, I can help with debug.
The latest version leaks memory very quickly, in the span of a few seconds it jumps from 1 GiB to 12 GiB
I managed to track down the issue to this fetchRemaining function in FavoritesView.tsx:
https://github.com/lullabyX/sone/blob/0488f97d003430c6e84ea9edb42b8da66fe6d269/src/components/FavoritesView.tsx#L297-L338
Removing any logic related to loading new tracks fixes the memory leak for me, but then of course only the first 100 tracks are being loaded.
I also noticed that the totalNumberOfItems returned by the API seems to be incorrect. It tells me I have 82 tracks in my favorites, but only 7 are being listed. I confirmed this by manually calling the API endpoint with curl and this issue is also present there. From my understanding, SONE uses this value to calculate if more items need to be loaded, so I assume this logic is affected by this problem.
Indeed, the totalNumberOfItems issue I described above seems to be the root of the problem.
I just tried setting the value to the actual number of items in my playlist, and the memory leak is gone. I assume that this happens because songs that have been removed from Tidal are still counted towards the total number, but are not actually returned. SONE then gets stuck in a loop trying to load the nonexistent items, causing the memory leak.
Maybe using v2 of the API fixes this; I haven't tried it. I would kindly ask other people who encounter this problem to report whether the total number of tracks at the bottom actually matches the number of items in the playlist.
hey! I have also landed in this trap of having "five" tracks in my Loved Tracks but only 2 actually present on the platform, causing it to balloon my memory usage till it OOMs over and over. Unfortunate, as this app is truly fantastic!
same thing here, loving the app, hoping this gets fixed soon! 🙇