Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to open Windows crash dumps?

How to open Windows crash dumps?

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 1.7k Views
  • 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.
  • Y Offline
    Y Offline
    Youda008
    wrote on 30 Jun 2023, 08:43 last edited by
    #1

    I have set up Windows to automatically produce a crash dump when an application crashes according to this guide https://www.meziantou.net/tip-automatically-create-a-crash-dump-file-on-error.htm

    Now my Qt application (debug build) has crashed and i have a .dmp file.
    But when i try to load it into QtCreator using "Start Debugging -> Load Core File", it says the file format is not recognized. I have noticed this ticket https://bugreports.qt.io/browse/QTCREATORBUG-8834 but it says it has been resolved in 2015, while my QtCreator was built in 2020.

    What am i doing wrong?

    J C C 3 Replies Last reply 30 Jun 2023, 09:20
    0
    • Y Youda008
      30 Jun 2023, 08:43

      I have set up Windows to automatically produce a crash dump when an application crashes according to this guide https://www.meziantou.net/tip-automatically-create-a-crash-dump-file-on-error.htm

      Now my Qt application (debug build) has crashed and i have a .dmp file.
      But when i try to load it into QtCreator using "Start Debugging -> Load Core File", it says the file format is not recognized. I have noticed this ticket https://bugreports.qt.io/browse/QTCREATORBUG-8834 but it says it has been resolved in 2015, while my QtCreator was built in 2020.

      What am i doing wrong?

      J Offline
      J Offline
      JonB
      wrote on 30 Jun 2023, 09:20 last edited by JonB
      #2

      @Youda008
      While you await a better answer. I don't use Windows. But under Linux at least "Load Core File" would be for a Linux core dump file. Do you have any evidence that Creator (the debugger) under Windows would accept a .dmp file for anything like this? My thought is it would not, they are likely completely different things.

      It also depends on what compiler and what debugger you use under Windows, which you don't say.

      The usual way is to run your program from Creator and wait for it to "crash". Then you will be able to investigate. If you have to only produce some external file from your program not running inside Creator under Windows then I suspect it may be "complicated" to get anything from that in Creator debugging. You might search the web for what you can do with Windows .dmp file to analyze it.

      EDIT
      LOL, per @Chris-Kawa below looks like I am quite wrong and .dmp files are acceptable core files under Windows. Sorry! I never knew this when used to develop for Windows...

      1 Reply Last reply
      0
      • Y Youda008
        30 Jun 2023, 08:43

        I have set up Windows to automatically produce a crash dump when an application crashes according to this guide https://www.meziantou.net/tip-automatically-create-a-crash-dump-file-on-error.htm

        Now my Qt application (debug build) has crashed and i have a .dmp file.
        But when i try to load it into QtCreator using "Start Debugging -> Load Core File", it says the file format is not recognized. I have noticed this ticket https://bugreports.qt.io/browse/QTCREATORBUG-8834 but it says it has been resolved in 2015, while my QtCreator was built in 2020.

        What am i doing wrong?

        C Offline
        C Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on 30 Jun 2023, 09:39 last edited by
        #3

        @Youda008 Is your app compiled using MinGW or MSVC compiler? Which version? Do you have a compatible kit selected (same Qt and compiler) when using Load Core File?
        Can you check if the dump file is valid (e.g. I've seen sometimes 0 size dmp files generated for some reason) and does it open in Visual Studio to see if that's a QtCreator issue or a file issue?

        @JonB .dmp is the standard format for crash dumps on Windows. QtCreator supports them.

        1 Reply Last reply
        2
        • Y Offline
          Y Offline
          Youda008
          wrote on 30 Jun 2023, 12:25 last edited by
          #4

          My toolchain is: mingw-w64-x86_64-gcc 13.1.0-7

          The dump file seems to be valid, it opens in Visual Studio correctly, but of course there are no symbols (only addresses in stack trace), because the symbols in the executable are not in the Microsoft pdb format.

          This crash is happening to a customer and is not reproducible on my machine, so i cannot debug it locally on a running application. And i don't think i can convince him to install the full development suite on his computer. Crash dump is all i can ask him.

          C 1 Reply Last reply 30 Jun 2023, 12:37
          0
          • Y Youda008
            30 Jun 2023, 12:25

            My toolchain is: mingw-w64-x86_64-gcc 13.1.0-7

            The dump file seems to be valid, it opens in Visual Studio correctly, but of course there are no symbols (only addresses in stack trace), because the symbols in the executable are not in the Microsoft pdb format.

            This crash is happening to a customer and is not reproducible on my machine, so i cannot debug it locally on a running application. And i don't think i can convince him to install the full development suite on his computer. Crash dump is all i can ask him.

            C Offline
            C Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on 30 Jun 2023, 12:37 last edited by
            #5

            @Youda008 I don't have a MinGW setup to try it, but it works ok with MSVC compiled app. Maybe QtCreator can't handle a dump from MinGW or there's something wrong with your debugger setup. I don't know, sorry.

            As a stopgap solution you might use a tool like cv2pdb to extract pdb from the debug executable and maybe you'll be able to diagnose this crash in Visual Studio.

            Y 1 Reply Last reply 30 Jun 2023, 14:43
            0
            • Y Youda008
              30 Jun 2023, 08:43

              I have set up Windows to automatically produce a crash dump when an application crashes according to this guide https://www.meziantou.net/tip-automatically-create-a-crash-dump-file-on-error.htm

              Now my Qt application (debug build) has crashed and i have a .dmp file.
              But when i try to load it into QtCreator using "Start Debugging -> Load Core File", it says the file format is not recognized. I have noticed this ticket https://bugreports.qt.io/browse/QTCREATORBUG-8834 but it says it has been resolved in 2015, while my QtCreator was built in 2020.

              What am i doing wrong?

              C Online
              C Online
              cristian-adam
              wrote on 30 Jun 2023, 13:11 last edited by
              #6

              According to https://stackoverflow.com/questions/5225579/crash-reporting-for-mingw-applications answered 12 years ago, it's up to your application to handle a crash when using MinGW.

              This is due to Windows being Windows and supporting only their own stuff.

              https://stackoverflow.com/questions/5814568/is-there-a-way-to-generate-a-gdb-readable-coredump-when-running-programs-compile provides also some information.

              Maybe DrMingw can be of help, but I think the best way would be for your application to handle the crash.

              1 Reply Last reply
              0
              • C Chris Kawa
                30 Jun 2023, 12:37

                @Youda008 I don't have a MinGW setup to try it, but it works ok with MSVC compiled app. Maybe QtCreator can't handle a dump from MinGW or there's something wrong with your debugger setup. I don't know, sorry.

                As a stopgap solution you might use a tool like cv2pdb to extract pdb from the debug executable and maybe you'll be able to diagnose this crash in Visual Studio.

                Y Offline
                Y Offline
                Youda008
                wrote on 30 Jun 2023, 14:43 last edited by Youda008
                #7

                @Chris-Kawa Tried that too, but it produced a PDB the VisualStudio couldn't load. See https://github.com/rainers/cv2pdb/issues/89

                1 Reply Last reply
                0
                • Y Offline
                  Y Offline
                  Youda008
                  wrote on 30 Jun 2023, 14:51 last edited by
                  #8

                  The QtCreator specifically says:

                  "E:/DoomRunner.exe.20012.dmp" is not a core dump: file format not recognized
                  

                  Seems like a bug in QtCreator

                  1 Reply Last reply
                  0

                  1/8

                  30 Jun 2023, 08:43

                  • Login

                  • Login or register to search.
                  1 out of 8
                  • First post
                    1/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved