Archive 17/01/2023.

[Solved] What causes ‘waiting for application’

friesencr

What causes an application, while doing some intense processing, to pop a dialog and say that the application may not be responding? How do you prevent from happening. In this case I am loading up a bunch of custom geometries. I am having a hard time knowing what to call this and can’t really find information on it because of it.

Thanks :smiley:

jmiller

It seems that could be a Desktop Window Manager “feature”.
You can kill dwm.exe or stop the service, but will lose “desktop composition” - transparency etc.
I don’t care for the popup either. Maybe there’s a specific setting for that, but I kinda doubt it…

weitjong

How about “hang” or “freeze”? At least it appears to be in that state to the operating system, so it pops the warning. Probably your app does not yield enough.

cadaver

I would assume this is when the main thread is doing a long continuous processing and doesn’t pump window messages, which causes Windows to think the program is unresponsive. A typical solution would be to do the heavy processing in another thread and let the main thread stay pumping events normally. Unfortunately this is not really applicable to CustomGeometries as they’re not safe to create from other threads, so what comes to mind next is to have a timer and break the operation if “enough” time is passed, and continue on the next frame.

friesencr

I ended up rewriting the iterator to hold its state so it could resume like you all suggested. The solution is straight forward and only slightly annoying. The more annoying thing is how often it seems that I have to over engineer everything I am working on. A precarious pattern :confused:

Thank you.