How to generate a System Event when a program hangs RRS feed

  • Question

  • Greetings all - 

    Win7/64Pro Question

    I am looking for a short term solution for automatic intervention. Longer term is to address the stability issue within a specific custom application.

    There is a two computer setup, where a custom interactive application lives on each PC, and interacts through a asynchronous server application installed on one of the two PC's. A particular application installed in a kiosk with touch screen, occasionally hangs. The visual results are the on screen animation stops, yet everything all continues to work between both PC's.

    Without interacting with the application, I can bring up the Task Manager, and see the the application is not responding from the [Applications] tab. I can also see the application is not responding from the [CPU] tab of the resource monitor.

    Once I touch / interact with the hung application, I get a dialog box, asking me to either close the app or wait longer for it to respond. When you select close, the application closes, and an EVENT is generated. I currently use this EVENT [Application / "Application Hang" / ID:1002] to trigger a reboot scripts for both machines. This process still requires the manual action of someone pressing the close button on the hung process. I would like the reboot sequence to happen automatically, once the application hangs.

    Finally... My Question:
    1. Is there a way to generate an EVENT (that I can trigger on) when an application hangs or is not responding. I am currently looking through the local group policy editor, but have yet to find anything.

    2. If I can generate an EVENT from a hung application (as in Q1), can I specify which application to monitor for such a state?

    Thank in advance
    Thursday, January 7, 2016 3:58 PM

All replies

  • Hi,

    About your question, we need to get a confirm from you, what’s the meaning of generate an EVENT?

    Do you mean that when this app hangs, another process or app would be generated at this time.

    Since this program is developed by yourself. I advise you refer to Windows Error Reporting(WER) to generate the certain events for application hang. The following link tells us what is WER.


    What’s more, one thing we need to notice, Windows system supplies an event log for users to diagnose an app’s issue.

    We can go to Event Viewer to see the event log, when an app crashed or hung, this behavior would be recorded in event log, you could get some prompt from it, then, find out the solution to deal with it.

    There is an official article introduces What information appears in event logs? (Event Viewer), please refer to it.


    As you said, the app occasionally hangs, and you see the EVENT [Application / "Application Hang" / ID:1002]. I think the event log should be more detailed, and you could see more information from it. If it’s convenient, please paste the complete event log in your reply, we can use it to assist you with current condition.

    Hope my clarification is clear.

    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Sunday, January 10, 2016 4:19 AM
  • Thank you for your feedback.

    I have since come up with a work around, that works well, for the short term.

    While this application usually chugs along, occasionally it enters a "non responsive state". With the resource monitor, I can see its still burning cycles, but no longer communicating with the system. I can detect this "non responsive state" using the TASKKILL command. I have a scripts that runs every minute to check for this condition.

    TASKKILL /F /IM <application_name.exe> /FI "STATUS eq Not Responding" /T

    Once the application is killed, an event is generated, from which I trigger a task to reboot the systems(s). From the perspective of someone approaching  the touchscreen, the animation will no longer be found in a frozen state.

    The original developer has been engaged to update ( /w bug fixes) the application. Hopefully, I won't need this work around for much longer.


    Friday, February 5, 2016 11:59 AM