Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63407

segfault on Android when exception thrown in slot even if caught in reimplemented Application::notify()

    XMLWordPrintable

Details

    • Android

    Description

      Create an application that throws an exception in slot and reimplement QApplication::notify()

      as suggested in qt\qtbase\src\corelib\kernel\qeventloop.cpp, QEventLoop::exec():

      qWarning("Qt has caught an exception thrown from an event handler. Throwing\n"
                               "exceptions from an event handler is not supported in Qt. You must\n"
                               "reimplement QApplication::notify() and catch all exceptions there.\n");

      Application will crash on Android with Qt > 5.6.1 (bug was introduced in 5.6.2 and is still present in 5.9.1). Other platforms are not affected.

      Attached test project and log.

      Attachments

        1. log.txt
          20 kB
          Cristian Anita
        2. new_test_slot_throw 14-04-2021, 12-46.crash
          65 kB
          Mateusz Sobal
        3. test_slot_throw.zip
          3 kB
          Cristian Anita
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vkurtelius Veli-Pekka Kurtelius
            cacoso Cristian Anita
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes