chkaufmann 17 Posted September 9, 2019 I have a strange problem, not sure if it is because of Win10 or Delphi Rio 10.3.2. For some users my application gets blocked completely when not used for some time and when there are other applications running on that computer. Now I found out, that my application has a green leaf symbol in the task manager with the hint "UWP process group is suspending". Now I don't find a clear answer but it looks like my application is sent to a suspended mode by Windows in some cases. - How can I avoid that? - Are there any Windows messages I have to handle so I can ensure my application is not blocking? Christian Share this post Link to post
Clément 148 Posted September 9, 2019 1 hour ago, chkaufmann said: I have a strange problem, not sure if it is because of Win10 or Delphi Rio 10.3.2. For some users my application gets blocked completely when not used for some time and when there are other applications running on that computer. Now I found out, that my application has a green leaf symbol in the task manager with the hint "UWP process group is suspending". Now I don't find a clear answer but it looks like my application is sent to a suspended mode by Windows in some cases. - How can I avoid that? - Are there any Windows messages I have to handle so I can ensure my application is not blocking? Christian This might shed some light: https://superuser.com/questions/1406692/what-does-the-leaf-symbol-in-the-status-column-of-the-task-manager-mean "Do note, the faster your computer is, the less likely it is that windows needs to suspend processes. So some users with fast pc's may not see any suspended process, while people with a slower pc may see a lot of them." HTH Share this post Link to post
chkaufmann 17 Posted September 10, 2019 Thanks for the link, but my questions remain since I cannot tell the user to buy a faster computer and/or not to run any other applications. Somebody writes "Only Apps will be suspended." So my question is, why my application is considered as an app? I didn't find any flag in the project settings for this. I compiled it as regular VCL Win32 application. And when my application is suspended, why is it blocked and not activated again automatically? Somehow it looks like the message queue is not handled anymore. Christian Share this post Link to post
Remy Lebeau 1398 Posted September 10, 2019 (edited) 14 hours ago, chkaufmann said: So my question is, why my application is considered as an app? Because it has a visual UI: How does Task Manager categorize processes as App, Background Process, or Windows Process? Quote I didn't find any flag in the project settings for this. I compiled it as regular VCL Win32 application. It is exactly because it is a VCL Win32 project that it gets categorized as an App. Quote And when my application is suspended, why is it blocked and not activated again automatically? Because it is doing something internally that is preventing it from processing window messages in a timely manner. You need to debug your app and figure out what that something is. Task Manager is merely reacting to the fact that your app is no longer processing messages. It is not the one suspending your app, a bug in your app is. You need to find the bug and fix it. Quote Somehow it looks like the message queue is not handled anymore. Exactly. So figure out why the message queue is getting blocked in your code. Edited September 10, 2019 by Remy Lebeau Share this post Link to post
David Heffernan 2345 Posted September 11, 2019 On 9/9/2019 at 8:16 PM, Clément said: This might shed some light: https://superuser.com/questions/1406692/what-does-the-leaf-symbol-in-the-status-column-of-the-task-manager-mean The answer in that link appears factually misleading at best, probably downright incorrect. Share this post Link to post
Clément 148 Posted September 11, 2019 12 hours ago, David Heffernan said: The answer in that link appears factually misleading at best, probably downright incorrect. the icon is called "econo mode" and when you hover over the leaf icon in Task Manager’s Status column, you will now see a tooltip describing what it means (this app is suspending processes to help improve system performance). My machine shows 2 applications with that leaf (Settings and Cortana). Both applications are responding. Here's another link with a better article:https://technidad.com/what-is-this-new-green-leaf-icon-in-task-manager-of-windows-10/ How the Green Leaf feature works and what it actually does As you know, the task manager is a window in which you can view all the processes. You can view all your running apps and also the different background processes. The processes that have a Green Leaf icon beside them are a bit different from the other processes. These are the processes which are actually ‘suspended’. This can save your computers RAM, without significantly affecting the performance of the processes. You could say that Windows puts these applications in the ‘Ready state’ or ‘blocks’ them from being executed by the processor. Windows could do it when the app requires a human input/output. Also, you won’t feel any lag because of the Green Leaf feature while switching between processes. A blessing for computers with lower specs It is expected that the introduction of this new feature in several versions of Windows 10 will be a blessing for computers with lower specs. The feature is so smart that it can turn your RAM more efficient than before and you can enjoy faster speeds of computing and reduced lags. By suspending the apps until you launch them the Green Leaf feature does a really good job.Also, after the app is launch you will notice in the task manager that the Green Leaf icon disappears. hth, Share this post Link to post
chkaufmann 17 Posted September 16, 2019 On 9/10/2019 at 9:51 PM, Remy Lebeau said: So figure out why the message queue is getting blocked in your code. In the end, that's what I was afraid of 😞. Any hints on how to isolate that? Especially on a users computer since I never had it on my own machine. The number of places something wrong happens are almost endless in a huge application. All I know is, often when it happens, the computer comes back from screen saver mode. Christian Share this post Link to post
aehimself 396 Posted September 24, 2019 When my applications stop processing Windows messages it's always a very long processing in the VCL thread. Like reconnecting to a database, refreshing a huge dataset or I simply messed something up and my code got in an endless loop 🙂 This is when correct logging can save your life: I'm usually logging when an action starts and when it ends. When the application freezes just check which action started, which did not report back as finished. 1 Share this post Link to post