Cider-2 icon indicating copy to clipboard operation
Cider-2 copied to clipboard

Possible Memory Leak? Paged Pool keeps increasing after a while

Open theironraiden opened this issue 2 months ago • 9 comments

Preflight Checklist

  • [x] I agree to follow the Code of Conduct that this project adheres to.
  • [x] I have searched the issue tracker for a bug report that matches the one I want to file, without success.
  • [x] I have confirmed that no support FAQ resolves my issue.
  • [x] I have checked that the correct behavior occurs on Apple Music Web (if applicable).
  • [x] I have verified that my issue is with a supported version and that it is with the desktop app (Support for other areas can be found in our Discord / on the appropriate repo).

How did you download Cider?

itch.io

App Information

{"buildInfo":{"version":"3.1.5","commit":"53b47bd4a8d9e643b9d68fc840bd43f142dc1cca","branch":"main","buildDate":"1758927080767","changelogUrl":"3.1.0-release","codeName":"Gala"},"clientInfo":{"client":"dotnet","env":"production","arch":"AMD64","platform":"win32","platformFriendly":"Windows","build":"desktop","clientVersion":"310","capi":"f555f7fe-eb91-43b4-a685-fa789a7da5ee","subversion":"1"}}

Operating System

Windows

OS Version

Windows 11 25H2 26200.6584

How would you describe your issue?

Backend (Windows)

Commit Hash

No response

Describe the Bug

Hi,

Been using Cider2 since the first release and even before that Cider1. I haven't had this problem ever and it's kind of making me crazy.

Since around two months I've had a problem where my computer's memory was running out. After a lot of testing, I've narrowed it down to Cider.

When starting Cider, music will play normally and memory will not be affected. However, after some time (sometimes 4-5 hours or sometime a lot less, like 1h) the system memory usage (paged pool exactly) will start continuously rising while Cider is playing. Pausing Cider will make the rise of memory usage stop. Closing and reopening cider will stop this behaviour and reset the cycle (but will not free the used paged pool).

You can see it in action in this video:

https://1drv.ms/v/c/0f32b6370eeb46b2/EW5VktJvKEhIlR8DPrr3ZIEBrlVSHZHbLW5LJvGNfZL3Mg?e=KcBePc

You can see paged pool and memory usage rising until the 0:50 mark when it's paused. Once resumed at 1:46, memory use will start rising again.

This happens ONLY when cider is running and playing. Does not happen with Apple music, foobar or any other music player. Reinstalling Windows DID NOT HELP. Even with a clean from ISO reinstall of W11, the issue still occured.

I've gone back and forward with different drivers for network and graphics card in case it would be a driver memory leak, but that did not help either.

The worst thing is I can only reproduce it on my main computer, not on my secondary machine.

Steps to Reproduce

  1. Start cider
  2. Start playing music
  3. start task manager or process explorer
  4. listen to music for around a couple hours
  5. see memory usage rising
  6. pause music
  7. see memory usage stop rising

Anything else?

I've tried using rammap, logquery and event viewer to try to figure out what could be causing this, but to no avail.

theironraiden avatar Oct 05 '25 17:10 theironraiden

Cider uses streamed audio so what may be occurring here is that MusicKit isn't clearing source buffers like it should.

Therefore all those songs you've listened to fill up memory space until GC (Garbage Cleanup) can actually get around to flushing it.

This number and threshold can fluctuate on some systems due to memory capacity differences so while it may look like its leaking on a system with 32GB it actually isnt and just using a healthy process gap to retain smooth playback, and if another process needs more memory it'll cutback on its own usage.

Shouldn't be an issue in V4 however as we're writing our own MusicKit framework all together and will be able to manually invoke GC at any given moment after a transition.

cryptofyre avatar Oct 05 '25 17:10 cryptofyre

Hello again!

We've noticed that you haven't replied in a while. Unfortunately, our team isn't always able to address issues as quickly as we'd like. To help us assist you more efficiently, please provide the following information:

  1. Ensure your client is as up-to-date as possible. You can do this by using the experimental release on Taproom (if available) and the PTB release through the in-app updater.
  2. Let us know if the issue is still present. If it is, please provide the version you're using and mention any changes you've noticed since reporting the issue.

This information will help us identify whether the issue has already been resolved.

Please try to update us within the next 20 days; otherwise, we will close this issue.

Thanks for your help! :smiley:

cider-collective[bot] avatar Oct 18 '25 05:10 cider-collective[bot]

I just want to add that I am having the exact same issue. I just now went into the PTB and updated. If the issue remains I’ll keep you posted.

liltzu avatar Oct 19 '25 21:10 liltzu

I haven't been able to reproduce this on our working branch for V4, so i'm going to assume this is entirely MusicKit-faulted.

This issue will be closed alongside 4.x's release.

cryptofyre avatar Oct 19 '25 21:10 cryptofyre

I just want to add that I am having the exact same issue. I just now went into the PTB and updated. If the issue remains I’ll keep you posted.

I've switched to the PTB too, I will post my findings.

theironraiden avatar Oct 20 '25 17:10 theironraiden

I haven't been able to reproduce this on our working branch for V4, so i'm going to assume this is entirely MusicKit-faulted.

This issue will be closed alongside 4.x's release.

If this is so, when can we expect the 4.x release?

liltzu avatar Oct 20 '25 18:10 liltzu

Unable to provide an ETA as we're still relatively early in development.

Replacing MusicKit is a massive chore as it's a massive library that is completely obfuscated.

cryptofyre avatar Oct 20 '25 19:10 cryptofyre

Reporting back after about a week of testing. On the testing branch it only happened once so far. It really slowed down for me as well. I dont know if its gone for sure, ill still keep an eye on it and report back if it happens again.

liltzu avatar Oct 29 '25 07:10 liltzu

Hello again!

We've noticed that you haven't replied in a while. Unfortunately, our team isn't always able to address issues as quickly as we'd like. To help us assist you more efficiently, please provide the following information:

  1. Ensure your client is as up-to-date as possible. You can do this by using the experimental release on Taproom (if available) and the PTB release through the in-app updater.
  2. Let us know if the issue is still present. If it is, please provide the version you're using and mention any changes you've noticed since reporting the issue.

This information will help us identify whether the issue has already been resolved.

Please try to update us within the next 20 days; otherwise, we will close this issue.

Thanks for your help! :smiley:

cider-collective[bot] avatar Nov 09 '25 05:11 cider-collective[bot]

Hello!

We have closed this issue due to inactivity. If you are still experiencing this bug in a supported version, please open a new issue with the necessary information.

Thank you for your understanding! 👋

cider-collective[bot] avatar Nov 29 '25 05:11 cider-collective[bot]