Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Crash Handler for Qt

    Tools
    6
    10
    8037
    Loading More Posts
    • 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.
    • M
      MGHawksworth last edited by

      I have an RSS feed for the above but no blog entry exists about it anymore, should I avoid looking at this (entry deliberately removed) or has the blog post just gone walkabout?

      Michael.

      1 Reply Last reply Reply Quote 0
      • L
        loladiro last edited by

        What blog post are you referring to (URL)?

        1 Reply Last reply Reply Quote 0
        • M
          MGHawksworth last edited by

          http://labs.qt.nokia.com/2011/08/03/crash-handler-for-qt/

          1 Reply Last reply Reply Quote 0
          • L
            loladiro last edited by

            Looks like it has been removed. If you still want to read it, here it is:
            [quote]
            For QtCreator we are researching a cross plattform crash handler and finally picked Google Breakpad. There were some request for Qt support for Breakpad so we decided to provide a little solution as a labs project. Please read first the Google Breakpad introduction. The scope of article is the client side, if you are interested for a server look at the Mozilla Socorro or write your own.
            First steps

            Breakpad needs the symbol information to generate his own platform neutral symbol files. So we added to qmake the possibility to compile applications with debug symbols, to extract them and than strip the binaries. All what you need is to checkout some packages and set some environment variables:

            Check out Python >= 2.6 if it is not installed

            Check out Google Breakpad: svn checkout http://google-breakpad.googlecode.com/svn/trunk/ google-breakpad

            Check out QtBreakpad:

            Check out Poster for Python: easy_install poster or install it by hand

            Set some environment variables

            Linux/Mac:
            

            @
            export QT_BREAKPAD_ROOT_PATH="$HOME/dev/qt-breakpad"
            export BREAKPAD_ROOT_PATH="$HOME/dev/google-breakpad"
            export BREAKPAD_UPLOAD_URL="http://crashserver/submit-symbols"
            export BREAKPAD_USER_NAME="login"
            export BREAKPAD_USER_PASSWORD="password"
            @
            Windows:
            @
            set QT_BREAKPAD_ROOT_PATH "BUILDPATH/dev/qt-breakpad"
            set BREAKPAD_ROOT_"PATHBUILDPATH/dev/google-breakpad"
            set BREAKPAD_UPLOAD_URL "http://crashserver/submit-symbols"
            set BREAKPAD_USER_NAME "login"
            set BREAKPAD_USER_PASSWORD "password"
            @
            Your Application

            Put flow lines in the project file of the application:

            @
            QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
            !isEmpty(QT_BREAKPAD_ROOT_PATH) {
            include($$QT_BREAKPAD_ROOT_PATH/qtbreakpad.pri)
            }
            @

            Add the header:

            @
            #ifdef ENABLE_QT_BREAKPAD
            #include
            #endif
            @

            In you main function:

            @
            QApplication app(argc, argv);

            #ifdef ENABLE_QT_BREAKPAD
            QtSystemExceptionHandler systemExceptionHandler;
            #endif
            @

            Here a snippet to add the crash handler application to your project:

            @
            TEMPLATE = subdirs

            QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
            !isEmpty(QT_BREAKPAD_ROOT_PATH) {
            SUBDIRS += qtcrashhandler
            }
            @

            And the corresponding project file:
            @
            TARGET = qtcrashhandler

            TEMPLATE = app
            QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
            include($${QT_BREAKPAD_ROOT_PATH}/qtcrashhandler.pri)
            @
            [/quote]

            1 Reply Last reply Reply Quote 0
            • T
              tiho_d last edited by

              Hi Guys,
              Excuse me if I am asking something obvious. Can you please give me a hint which real path should I use for: export QT_BREAKPAD_ROOT_PATH="$HOME/dev/qt-breakpad". I could not find QtBreakpad inside Qt/QtCreator/google-breakpad and naturally I cannot resolve the project include files 'qtbreakpad.pri', 'qtcrashhandler.pri'. Any hint where to find the sources of QtBreakpad will be very helpful.
              Thanks!

              1 Reply Last reply Reply Quote 0
              • L
                ludek.vodicka last edited by

                Hi there,

                For all who seek how to integrate breakpad with Qt I wrote step-by-step article at my blog. I spent a lot of time with search and testing breakpad on Mac/Linux/Windows, so hopefully it will help to someone else.

                "http://blog.inventic.eu/2012/08/qt-and-google-breakpad/":http://blog.inventic.eu/2012/08/qt-and-google-breakpad/

                1 Reply Last reply Reply Quote 0
                • W
                  wesblake last edited by

                  Hello all. I am going in circles trying to actually use the breakpad dmp files, I'm hoping someone can help.

                  First of all, I am working with a Windows app, Qt Creator, Qt 5.3.1, Mingw. I followed ludek.vodicka's blog post and got breakpad up and running. A couple beta testers have experienced crashes and sent me the dmp files generated.

                  I'm having a heck of a time getting symbols though so I can analyze the dmp files. We have symbols for all of our dll's (those were created by another team in MSVC) so I'm talking about the actual Qt/App

                  I have use the following in my pro file and handed off the debug exe to those beta users:
                  #Causes include of debug info into release build
                  QMAKE_CXXFLAGS_RELEASE += -g
                  QMAKE_CFLAGS_RELEASE += -g
                  QMAKE_LFLAGS_RELEASE =

                  But I'm trying to use dump_syms, etc to get the symbols so I can analyze. Ive tried both ludek's instructions and those found here: https://code.google.com/p/google-breakpad/wiki/LinuxStarterGuide#Producing_symbols_for_your_application
                  Here's what I'm getting when I try to get the symbols per instructions:

                  C:\Users\myuser\Documents\Projects\google-breakpad-read-only\src\tools\windows
                  binaries>dump_syms.exe C:\Users\myuser\Documents\Projects\MyProjectrelease\release\MyProject.exe > MyProject.sym
                  loadDataForPdb and loadDataFromExe failed for C:\Users\myuser\Documents\Project
                  s\MyProjectrelease\release\MyProject.exe
                  Open failed

                  I've also tried various other posts I've found and run into dead ends (i.e., objcopy which I just dont have on a Windows machine!).

                  Can anyone help? If I have dmp files generated by breakpad from a release exe with debug info in it, how do I actually analyze it now?

                  1 Reply Last reply Reply Quote 0
                  • W
                    wesblake last edited by

                    Bump, anyone?

                    1 Reply Last reply Reply Quote 0
                    • O
                      onibox last edited by

                      Hi,

                      where do you store your MyProject.sym file?

                      1 Reply Last reply Reply Quote 0
                      • W
                        wesblake last edited by

                        That's my problem, I'm trying to generate MyProject.sym file, which its my understanding that dump_syms.exe is supposed to do.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post