Catch(...) on Android cause application to crash



  • Device on Android 4.1.2, application is built against Qt5.4, ndk-r10, gcc4.9 on WIndows 8.1

    @ qDebug("Test zero try");
    try {
    int i(1/0);
    qDebug() << "\tpassed" << i;
    throw std::logic_error("division by zero");
    }
    catch (std::exception e) {
    qDebug() << "Catch zero" << e.what();
    }
    qDebug("Test zero try: ok");
    qDebug("Test zero all try");
    try {
    int i(1/0);
    qDebug() << "\tpassed" << i;
    }
    catch (...) {
    qDebug() << "Catch zero";
    }
    qDebug("Test zero all try: ok");@

    Output:
    @D/BtMini (12213): Test zero try
    F/libc (12213): Fatal signal 8 (SIGFPE) at 0x00002fb5 (code=0), thread 12293 (t.bibletimemini)
    D/BtMini (12213): passed 0
    D/BtMini (12213): Catch zero std::exception
    D/BtMini (12213): Test zero try: ok
    D/BtMini (12213): Test zero all try

    «org.qtproject.bibletimemini» завершился крахом.@


Log in to reply
 

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