Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 174013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:26:44+00:00 2026-05-11T13:26:44+00:00

I’m working with a somewhat unreliable (Qt/windows) application partly written for us by a

  • 0

I’m working with a somewhat unreliable (Qt/windows) application partly written for us by a third party (just trying to shift the blame there). Their latest version is more stable. Sort of. We’re getting fewer reports of crashes, but we’re getting lots of reports of it just hanging and never coming back. The circumstances are varied, and with the little information we can gather, we haven’t been able to reproduce the problems.

So ideally, I’d like to create some sort of watchdog which notices that the application has locked up, and offers to send a crash report back to us. Nice idea, but there are problems:

  • How does the watchdog know the process has hung? Presumably we instrument the application to periodically say ‘all ok’ to the watchdog, but where do we put that such that it’s guarenteed to happen frequently enough, but isn’t likely to be on a code path that the app ends up on when it’s locked.

  • What information should the watchdog report when a crash happens? Windows has a decent debug api, so I’m confident that all the interesting data is accessible, but I’m not sure what would be useful for tracking down the problems.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:26:44+00:00Added an answer on May 11, 2026 at 1:26 pm

    You want a combination of a minidump (use DrWatson to create these if you don’t want to add your own mini-dump generation code) and userdump to trigger a minidump creation on a hang.

    The thing about automatically detecting a hang is that its difficult to decide when somethings hung and when its just slow or blocked by IO wait. I personally prefer to allow the user to crash the app deliberately when they think its hung. Apart from being a lot easier (my apps don’t tend to hang often, if at all 🙂 ), it also helps them to ‘be part of the solution’. They like that.

    Firstly, check out the classic bugslayer article concerning crashdumps and symbols, which also has some excellent information regarding what’s going on with these things.

    Second, get userdump which allows you to create the dumps, and instructions for setting it up to generate dumps

    When you have the dump, open it in WinDBG, and you will be able to inspect the entire program state – including threads and callstacks, registers, memory and parameters to functions. I think you’ll be particularly interested in using the ‘~*kp‘ command in Windbg to get the callstack of every thread, and the ‘!locks’ command to show all locking objects. I think you’ll find that the hang will be due to a deadlock of synchronisation objects, which will be difficult to track down as all threads tend to wait on a WaitForSingleObject call, but look further down the callstacks to see the application threads (rather than ‘framework’ threads like background notifications and network routines). Once you’ve narrowed them down, you can see what calls were being made, possibly add some logging instrumentation to the app to try and give you more information ready for the next time it fails.

    Good luck.

    Ps. Quick google reminded me of this: Debugging deadlocks. (CDB is the command line equivalent of windbg)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.