Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Catching Crashes....

Catching Crashes....

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpcom
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Peter Weyzen
    wrote on last edited by
    #1

    Hi. I am feeling a bit overwhelmed at the moment, I could use a small amount of direction... :) How do I go about installing a crash handler into my own application? One that would catch crashes and generate a minidump? I've already got one that works in .net 2003 -- but will need to move on to the next devstudio sooner or later....

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)

    S L 2 Replies Last reply
    0
    • P Peter Weyzen

      Hi. I am feeling a bit overwhelmed at the moment, I could use a small amount of direction... :) How do I go about installing a crash handler into my own application? One that would catch crashes and generate a minidump? I've already got one that works in .net 2003 -- but will need to move on to the next devstudio sooner or later....

      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)

      S Offline
      S Offline
      Stephen Hewitt
      wrote on last edited by
      #2

      Don't. Dr.Watson already does this. To configure enter "drwtsn32" in the run dialog.

      Steve

      P 1 Reply Last reply
      0
      • P Peter Weyzen

        Hi. I am feeling a bit overwhelmed at the moment, I could use a small amount of direction... :) How do I go about installing a crash handler into my own application? One that would catch crashes and generate a minidump? I've already got one that works in .net 2003 -- but will need to move on to the next devstudio sooner or later....

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)

        L Offline
        L Offline
        Leah_Garrett
        wrote on last edited by
        #3

        How does the .Net 2003 one work? You could add exception handling to catch crashes. Not sure what information you might want in a "mini-dump" One place I worked at had a trace mode that users could turn on to log application execution. The trace would generate text for key function call points and variables. There was also an exception handler that would save the trace log out before closing.

        P 1 Reply Last reply
        0
        • S Stephen Hewitt

          Don't. Dr.Watson already does this. To configure enter "drwtsn32" in the run dialog.

          Steve

          P Offline
          P Offline
          Peter Weyzen
          wrote on last edited by
          #4

          DrWatson is really only appropriate in an environment I am in control of. I work on a commercial application.... which does crash from time to time. I wanna capture these crashes on user's machines out there in the real world... DrWatson is not appropriate for this situation. So, back to my original question...

          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)

          S 1 Reply Last reply
          0
          • P Peter Weyzen

            DrWatson is really only appropriate in an environment I am in control of. I work on a commercial application.... which does crash from time to time. I wanna capture these crashes on user's machines out there in the real world... DrWatson is not appropriate for this situation. So, back to my original question...

            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)

            S Offline
            S Offline
            Stephen Hewitt
            wrote on last edited by
            #5

            Look into the MiniDumpWriteDump[^] and SetUnhandledExceptionFilter[^] functions.

            Steve

            P 1 Reply Last reply
            0
            • L Leah_Garrett

              How does the .Net 2003 one work? You could add exception handling to catch crashes. Not sure what information you might want in a "mini-dump" One place I worked at had a trace mode that users could turn on to log application execution. The trace would generate text for key function call points and variables. There was also an exception handler that would save the trace log out before closing.

              P Offline
              P Offline
              Peter Weyzen
              wrote on last edited by
              #6

              A minidump is somethat can be generated by a windows api -- it's a binary file that contains the status of the program at the time of the crash. It contains registers, stack frames, list of modules loaded, etc... You can load the dump directly into visual studio, to see the conditions of the crash. It's very handy. We like to do this automatically -- if their program crashes, it generates this file and get's uploaded back to our servers. It's a handy way to see what problems our users are running into without having to interact with them...

              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)

              1 Reply Last reply
              0
              • S Stephen Hewitt

                Look into the MiniDumpWriteDump[^] and SetUnhandledExceptionFilter[^] functions.

                Steve

                P Offline
                P Offline
                Peter Weyzen
                wrote on last edited by
                #7

                Thanks for that. Our old crash handling code was kinda complex, but could be boiled down to just this... With the conversion from 2003 to 2005 there's lots of things to figure out, lots of things that were defined and are now not defined....

                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups