Crash Handler for Qt



  • 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.



  • What blog post are you referring to (URL)?





  • 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]



  • 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!



  • 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/



  • 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?



  • Bump, anyone?



  • Hi,

    where do you store your MyProject.sym file?



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.