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

QMouseHandler doesn't set parent on an internal QTimer (leak)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.2
    • 5.9
    • Qt3D
    • None
    • 595b4add0ce6f32bb8ffc56b3a59e6e5bf0b000a

    Description

      QMouseHandler use a QTimer internally.

      No parent is set on it and it is not explicitly destroyed. So as far as I can tell it's leaked.

      And the timer doesn't move thread with his parent.

       

      I saw it when trying to load part of my model in a dedicated thread before adding it to the scene.

      Even though I move my sub model in the application thread before inserting it into the model I have warnings logs:

      QObject::startTimer: Timers cannot be started from another thread

      QObject::killTimer: Timers cannot be stopped from another thread

       

      Attachments

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

        Activity

          People

            seanharmer Sean Harmer
            gvallat guilhem vallat
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes