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

Segmentation fault at application closing

XMLWordPrintable

    • Linux/Other display system
    • 875b8174eb6febf9a4c7d129b3152160ac301fbb (qt/qtbase/6.2) 30b0b72453239666952ab516c618c19f0ca0aca6 (qt/qtbase/dev) 0c5efb68dc8f976978a694be7ae8d1d66b9a86e6 (qt/tqtc-qtbase/5.15)

      Hi all,
      On embedded system using Linux, GCC, touchscreen, eglfs we get sometimes following stacktrace at app closing:

      2020-01-01 03:43:51.177|690|FATAL|void stackTraceSignalHandler(int)|StackTrace.cpp:35|Received signal 11: Segmentation fault
      #0 (SP=0x00007fe0afffdd30 (IP=0x0000000001baefe6):stackTraceSignalHandler(int)+0x158
      #1 (SP=0x00007fe0afffddc0 (IP=0x00007fe0b84ceee0):killpg+0x40
      #2 (SP=0x00007fe0afffe450 (IP=0x00007fe0b92b0514):QScreen::geometry() const+0x14
      #3 (SP=0x00007fe0afffe470 (IP=0x00007fe0b5d76698):QEvdevTouchScreenData::screenGeometry() const+0x1e8
      #4 (SP=0x00007fe0afffe4f0 (IP=0x00007fe0b5d78ac6):QEvdevTouchScreenData::reportPoints()+0x26
      #5 (SP=0x00007fe0afffe580 (IP=0x00007fe0b5d7becc):QEvdevTouchScreenData::processInputEvent(input_event*)+0x77c
      #6 (SP=0x00007fe0afffe600 (IP=0x00007fe0b5d7dd30):QEvdevTouchScreenHandler::readData()+0xd0
      #7 (SP=0x00007fe0afffe980 (IP=0x00007fe0b8df2c0f):QMetaObject::activate(QObject*, int, int, void**)+0x81f
      #8 (SP=0x00007fe0afffea80 (IP=0x00007fe0b8e013cf):QSocketNotifier::activated(int, QSocketNotifier::QPrivateSignal)+0x4f
      #9 (SP=0x00007fe0afffeac0 (IP=0x00007fe0b8e01871):QSocketNotifier::event(QEvent*)+0xf1
      #a (SP=0x00007fe0afffeb00 (IP=0x00007fe0b8dbf4fb):QCoreApplication::notifyInternal2(QObject*, QEvent*)+0x19b
      #b (SP=0x00007fe0afffeb60 (IP=0x00007fe0b8e263a5):socketNotifierSourceDispatch(_GSource*, int (*)(void*), void*)+0x75
      #c (SP=0x00007fe0afffeba0 (IP=0x00007fe0b7ee205d):g_main_context_dispatch+0x28d
      #d (SP=0x00007fe0afffec20 (IP=0x00007fe0b7ee2300):g_main_context_dispatch+0x530
      #e (SP=0x00007fe0afffec80 (IP=0x00007fe0b7ee23bf):g_main_context_iteration+0x3f
      #f (SP=0x00007fe0afffecb0 (IP=0x00007fe0b8e25081):QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x71
      #10 (SP=0x00007fe0afffed10 (IP=0x00007fe0b8dbd5c3):QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xf3
      #11 (SP=0x00007fe0afffed90 (IP=0x00007fe0b8bb6b3b):QThread::exec()+0x6b
      #12 (SP=0x00007fe0afffede0 (IP=0x00007fe0b5d78994):QEvdevTouchScreenHandlerThread::run()+0xa4
      #13 (SP=0x00007fe0afffee40 (IP=0x00007fe0b8bb81e3):QThreadPrivate::start(void*)+0x153
      #14 (SP=0x00007fe0afffee90 (IP=0x00007fe0b89eef96):start_thread+0xd6
      #15 (SP=0x00007fe0afffef40 (IP=0x00007fe0b858b82f):clone+0x3f
      <end of stack>

      The reason is obviously that in the QEvdevTouchScreenData::screenGeometry() there are no checking of (screen == nullptr) before this one:

      return QHighDpi::toNativePixels(screen->geometry(), screen);

      But after I inserted the:

      if(screen == 0)
       return QRect{};
      

      it works fine without crashing. It looks like at application closing the Screens removed before the touchscreen activities stopped and function access to nullptr

      Best Regards,

      Sergey

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            vhilshei Volker Hilsheimer
            velik Sergey Velykokhatko
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes