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;
    w.show();
    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;
    w->show();
    int ret = a->exec();

    w->deleteLater();
    a->deleteLater();
    
    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.

    Richard



  • I forgot to add more infos.

    Android:
    asus/WW_K013/K013_1:5.0/LRX21V/WW_K013-12.10.1.36-20151230

    Slackware 14.1 64 bits.

    qt-opensource-linux-x64-android-5.5.1.run
    qt-opensource-linux-x64-android-5.6.1-1.run
    qt-opensource-linux-x64-android-5.7.0.run

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

    Richard



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

    Richard


Log in to reply
 

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