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

Multiple events emitted from a single object in different thread cause NullPointer exception in QStateMachinePrivate

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.9.4
    • 5.8.0
    • State Machine
    • None
    • Linux Ubuntu 16.04, MacOS El Capitan.
    • 345be581007c05164052e27f90fcfaf27a41c743

      A simple scenario.

       

      State machine s1->final_State

      With transition from an object that lives in a different thread.

      If the objects emits a signal multiple times, the first one is consumed correctly. The second one causes core dump since sender is NULL in QStateMachinePrivate::handleTransitionSignal.

       

      MWE project is in attachment. Just click on the button.

        1. emitter.cpp
          0.1 kB
          Pavle Boskoski
        2. emitter.h
          0.2 kB
          Pavle Boskoski
        3. main.cpp
          3 kB
          Pavle Boskoski
        4. pp.pro
          0.4 kB
          Pavle Boskoski
        5. win.cpp
          0.5 kB
          Pavle Boskoski
        6. win.h
          0.3 kB
          Pavle Boskoski
        7. workerth.cpp
          0.4 kB
          Pavle Boskoski
        8. workerth.h
          0.4 kB
          Pavle Boskoski
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            jefernan Jesus Fernandez
            pavleb Pavle Boskoski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes