Memory leak with f.lux 4.100 and Windows 10 version 1903



  • For the past month or so, I've noticed that f.lux 4.100 (not the beta) has been using more and more memory the longer it runs. Using Sysinternal Process Explorer, I've seen it get well over 1GB of memory. The issue is that this is eating up enough memory that it causes issues with my system and I have to restart f.lux. I don't normally shut down my system and generally reboot only to install OS upgrades, and occasionally at other times.

    I've noticed that when I first start, it takes up about 10MB of Private Bytes with a working set of 24MB, both of which seem reasonable. But at some point it will start to use more and more memory.

    I've noticed that it will consume memory quickly when the application is open, although that's not something I normally do, so I assume that it must be constantly leaking as it runs.

    I am part of the Windows Insider program currently running Windows 10 version 1903 build 18362. I believe the issue started when I got an update, but I didn't realize that f.lux was the application that was consuming the memory for a while so I can't tie the release with the memory like conclusively. I should note that I do not have the Windows "Night Light" feature enabled.



  • Thanks for the report. We have not seen this on older versions of Windows 10.

    Can you post f.lux options > driver info so we can see the exact configuration?



  • We have reproduced it here. Will let you know what we find.



  • @herf Thanks for the responnse.

    In case it helps, here's my driver info:

    NVIDIA 26.21.14.3000: NVIDIA GeForce GTX 750 Ti (20190314)

    Generic PnP Monitor, 509 x 286mm, built 2015
    Chromaticities:
    R=0.635742 0.333008
    G=0.302734 0.625977
    B=0.153320 0.070313
    W=0.313477 0.329102

    sRGB gamut: 100%, AdobeRGB gamut: 70%

    ViewSonic VX2450 Series, 525 x 297mm, built 2011
    Chromaticities:
    R=0.643555 0.338867
    G=0.310547 0.614258
    B=0.152344 0.067383
    W=0.313477 0.329102

    sRGB gamut: 91%, AdobeRGB gamut: 63%

    Windows Build: 18362



  • Thank you - this appears to be a leak in a windows call, basically one we cannot work around. Depending how long a fix takes from Microsoft we may need to make f.lux restart periodically (silently of course).



  • @herf Thanks for letting me know. For the time being, I'll manually restart every few days. Let me know if I can help beta test the new version.



  • We have a beta (4.101) that is trying to reduce the impact and reports f.lux ram usage once per day to us, so we can figure out how bad it is.

    I am not restarting yet because I want to be careful about that.



  • @herf I've opted in for the beta and now have that, so you'll be getting my stats.



  • @dkozinn do you have a color profile installed? We have some machines with 18362 that are not leaking and some that are, so hmm.



  • @herf I have not installed a color profile. I assume you're talking about a Windows color profile, not Custom Colors in f.lux?



  • Okay we have posted 4.102, which has a "watchdog" process that restarts f.lux whenever RAM usage goes >128MB. I don't like doing this, but it is a lot better than letting this leak go unchecked.

    We did our best not to flash the screen when the restart happens, but you might see a tiny flash.



  • I found another problem (looking for changes in the system so we can fix them quickly) that was causing most of the leaking.

    Fortunately it means that the leak will be a lot slower, but unfortunately, this means that we may have some new bugs.

    Please let me know if you see any unexpected behavior from 4.103 (posting now).



  • @herf I've got the new version now and I'll let you know if I see anything unusual. Thanks!



  • I can also confirm this behavior on Windows version 190318-1202, F.lux has been using as much as 1.7 Gb of memory in the background, which I've seen using Resource Monitor. It is a constant problem when running the app. For the time being, I'm going to try and downgrade back to v3 to avoid the conflict on my machine, it's very annoying and renders the app too much of a cost for me.



  • We've mostly worked around this on all the "current" versions:

    • Windows build 18362 and later
    • f.lux version 4.103

    If you have (windows build) 18362 you will get an update to 4.103 automatically. Some people are on 18361 or older, and they are still having problems, but Windows should upgrade you in that case?



  • I'll check on the windows store, perhaps i'm missing an update on there



  • It is not live there yet, but is submitted.

    Generally if you are running Insider windows, we recommend beta f.lux from our website. That's where we test things out.



  • v4.103 is live on the website and in the Windows Store.
    We want 18362 to be as stable as possible, even though it's not officially released yet.



  • @herf I'm now on 4.103 but I haven't seen issues since the automatic restart process was implemented in the previous version. Is the leak fixed in 4.103 or is it still doing the periodic restarts?



  • Restarter is still there but the leak is now slowed down - there were two API calls leaking and we were able to reduce the use of one of them.



  • Has the specific memory leak been reported to Microsoft? I created a feedback hub entry a while ago, in case someone may want to upvote it, go ahead: gdi32 Get/SetDeviceGammaRamp leaks Memory since Win10 1903 update (link opens Win10 feedback hub) https://aka.ms/AA65mre

    Possibly related (although I'm not sure if f.lux is affected): WcsGetUsePerUserProfiles and WcsSetUsePerUserProfiles leak registry key handles internally since 1903 update (link opens Win10 feedback hub) https://aka.ms/AA5wk9z



  • @fhoech yes we reported both of them. I do need to check on the profile leak also - we went from checking for profile changes frequently to once per day (so really, if you change your profile you need to restart f.lux).


Log in to reply