Important: Please read the Qt Code of Conduct -

Stack traces and code source

  • I would like to analyse the Stack Traces information that is present in the Google Play Console but I can't do it.

    I compiled the apk with the "-DEBUG" parameter and then opened the apk file in Android Studio, but when I paste the stack trace into the "stack trace or thread dump" tool in Android Studio everything appears in red and I can't display any hyperlinks to my source code.

    I would like to know, for example, which line of the code corresponds to "processCalculs()+94776".

    How to do this?

    With my thanks,


    *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    pid: 0, tid: 0 >>> net.XXXXXX <<<
      #00  pc 00000000001f8234  /data/app/net.XXXXXX-GoGDvRdK5EFbUfuQgLSrXA==/lib/arm64/ (QXXXXXXView::processCalculs()+94776)
      #00  pc 00000000002ff344  /data/app/net.XXXXXX-GoGDvRdK5EFbUfuQgLSrXA==/lib/arm64/
      #00  pc 000000000021405c  /data/app/net.XXXXXX-GoGDvRdK5EFbUfuQgLSrXA==/lib/arm64/
      #00  pc 0000000000218d10  /data/app/net.XXXXXX-GoGDvRdK5EFbUfuQgLSrXA==/lib/arm64/ (QTimer::timeout(QTimer::QPrivateSignal)+56)
      #00  pc 000000000020cd30  /data/app/net.XXXXXX-GoGDvRdK5EFbUfuQgLSrXA==/lib/arm64/ (QObject::event(QEvent*)+120)
      #00  pc 000000000018fe88  /data/app/net.XXXXXX-GoGDvRdK5EFbUfuQgLSrXA==/lib/arm64/ (QApplicationPrivate::notify_helper(QObject*, QEvent*)+304)

  • Another way of asking the question, perhaps a bit clearer?

    Is there an easy way to find the line in the source code corresponding to QXXXXXXView::processCalculs()+94776?


  • @Francky033
    I know nothing about Google/Android development. But for desktops you have to have the source files available, and the IDE/debugger has to know where they are, for the code function offsets to be shown as corresponding line of source.

  • Thank you JonB!

    Yes, I can now load the apk with the source code. But nothing happens when I paste the backtrace obtained in Google console in the "stack trace or thread dump" tool of Android Studio.
    In my case, the +94776 that appears behind the processCalculs() function does not correspond to a line number. I rather think it is the number of bytes between the beginning of the function and the crash.

    But I don't know how to exploit these damn stacktraces.

  • @Francky033
    Again, I don't know the exact process for you/Android. You do not "paste a stack trace". The idea is to run your program from a debugger, which knows where the sources both to the program and for the system libraries are located, and let the program "crash". At that point the debugger will see the fault and halt the program. When you then go into the debugger's "stack trace window" the addresses you show will be resolved to the matching lines in the source file.

    That's how it works on desktop....

  • Actually, the problem is that I'm trying to debug crashes that happen on some users' mobiles. But most of the time, these are crashes that I can't reproduce on my own mobile.
    So I have to be able to associate a line of the source code with the offset that appears in the stack traces of Google..... This is the point I can't do....

  • @Francky033
    I can only say: if you are not receiving an answer here, your question is about Android and stack traces in general, nothing to do with Qt. So you would be better searching some "Android development" posts/forums.

Log in to reply