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

[REG 5.11->5.12] macOS: QOpenGLContext::makeCurrent() hangs when called in non-main thread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.12.0, 5.12.1, 5.12.2, 5.12.3
    • GUI: OpenGL
    • None
    • macOS 10.14.4
    • macOS

    Description

      Steps to reproduce:
      1. Create QWindow with OpenGLSurface
      2. Create QOpenGLContext
      3. Move context to worker thread
      4. Call QOpenGLContext::makeCurrent() from worker thread

      Expected result:
      All works fine

      Current result:
      Program hangs

      Simple example: QTBUG-76148.zip
      The bug is stable reproduced only on macOS 10.14.x.

      Possible workaround:
      Works correctly when call makeCurrent() before moving context to worker thread:

      	m_context->makeCurrent(surface);
      	m_context->doneCurrent();
      
      	m_context->moveToThread(...);
      

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            p.zhigalov Peter Zhigalov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes