Qt 5.7.0 Android build on Linux Sig 11 error

  • I was playing around the Sig 11 error using Qt 5.7.0, this happened when we push BACK button on adnroid device.

    I did not experienced that kind of error when I was using Qt 5.5.1. So I investigated further to find that the same error appeared with QT 5.6.1, so why ? I dont know, but reading QT 5 Blueprint from Packt give me a hint. Here is what I have done.

    The small program that give me this error was like this:

    #include "mainwindow.h"
    #include <QApplication>

    int main(int argc, char *argv[])
    QApplication a(argc, argv);
    MainWindow w;
    return a.exec();

    This work as mentioned with QT 5.5.1, but not on newer version.

    Here is a sample of the error:

    A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 14710 (QtThread)

    To solve this, I modified the way that variables are set:

    #include "mainwindow.h"
    #include <QApplication>

    int main(int argc, char *argv[])
    QApplication *a = new QApplication(argc, argv);
    MainWindow *w = new MainWindow;
    int ret = a->exec();

    return ret;


    Using deleteLater as suggest in the book, no more error!

    I cannot explained the difference between QT 5.5.1 and newer.

    If you have any suggestions, you are welcome.


  • I forgot to add more infos.


    Slackware 14.1 64 bits.


    Note: If I am using x86 code, no error, but it does not work with ARMv7, need more investigation on other Android version.


  • More info, with QT 5.7.0, the problem is always there.
    On QT 5.6.1, it run without problem.

    I tried with android-ndk-r10e and android-ndk-r12b.


Log in to reply

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