flex-launcher icon indicating copy to clipboard operation
flex-launcher copied to clipboard

Flex Launcher sometimes closes itself when PC comes out of sleep mode

Open ricprd opened this issue 11 months ago • 3 comments

I noticed this intermittent issue: there are times when I wake my system and I see the desktop instead of Flex Launcher. However, Flex Launcher was open the last time I used it (most of the time I even activate sleep mode by using a shortcut added to Flex Launcher via ":sleep").

Is there a way to check why Flex Launcher might be quitting like this?

ricprd avatar Jan 29 '25 20:01 ricprd

Is it quitting, or is it actually crashing? This might be related to #23.

Flex Launcher stores image data in the GPU memory for rendering. The problem is that sometimes (likely depending on hardware or driver), the GPU memory is not preserved after a sleep/suspend operation. So when the PC wakes from sleep, Flex Launcher is tries to access the old GPU memory addresses which are now invalid, and causes the crash. This is my current theory.

The problem is that I can't replicate this issue in my setup. As I said above, it likely varies depending on hardware and/or driver. Could you try the build here and let me know if you still get the quit/crash behavior after sleep? That build uses CPU rendering instead of GPU rendering, which is less efficient, but it should isolate the GPU memory issue. So, if you don't experience the crash/quit, that would confirm the volatile GPU memory is the cause.

If that's the case, I can refactor the Flex Launcher code to free the GPU memory before sleeping, and re-render the images after waking up. That should provide a permanent fix for the issue.

complexlogic avatar Jan 30 '25 15:01 complexlogic

Is it quitting, or is it actually crashing? This might be related to #23.

I don't actually know. Is there a way to reliably check? The last time it happened, I checked the .log file but sadly it was blank.

The problem is that I can't replicate this issue in my setup. As I said above, it likely varies depending on hardware and/or driver. Could you try the build here and let me know if you still get the quit/crash behavior after sleep? That build uses CPU rendering instead of GPU rendering, which is less efficient, but it should isolate the GPU memory issue. So, if you don't experience the crash/quit, that would confirm the volatile GPU memory is the cause.

Thank you! I will check and report back :)

ricprd avatar Jan 30 '25 16:01 ricprd

That was quick, I already have an update: the issue happens even with this suggested build.

ricprd avatar Jan 31 '25 14:01 ricprd