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

3D scene freeze due to Deadlock in GLTexture::getOrCreateGLTexture()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.2
    • 5.8.0
    • Qt3D
    • None
    • Ubuntu 14.04, Intel Xeon, Nvidia Quadro 2000

    Description

      If a Texture is update with a higher frequency (e.g. 25 Hz) the 3D scene freezes after a while.
      Debugging showed that there is a Deadlock/Racecondition between GLTexture and TextureDataManager. (See attached file)

      The Patch (see gltexture.cpp_patch) fixes this deadlock by coping the data of m_dirty to a local variable dirty. After the copy, the m_dirtyFlagMutex is unlocked. For all later compares the dirty variable is used. At the end, before m_dirty = 0; the lock is relocked.

      Affected Filed:
      qt3d/src/render/texture/gltexture.cpp

      Attachments

        1. Deadlock.png
          Deadlock.png
          46 kB
        2. gltexture.cpp-patch
          2 kB
        For Gerrit Dashboard: QTBUG-61130
        # Subject Branch Project Status CR V

        Activity

          People

            whagen Wieland Hagen
            wopfner Manuel Wopfner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes