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

QOpenGLContext in a thread crashes if a QOffSreenSurface was created in the main thread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.9.0
    • GUI: OpenGL
    • Windows 10/64b Qt 5.9

    Description

      On Windows 64, a QOffscreenSurface is created in the main GUI thread:

       

      surface = new QOffscreenSurface();
      surface->create(); 
      

      Then in a thread just:

       

      QOpenGLContext context;
      context.create();
      

      crashes Qt on  context.create() instruction, before I even try to use surface. I have tried various things such as setting the context's format or surface's format but none fixed the problem.

      If I run all this in the main GUI thread no problem.

      If I instanciate and create the surface in the non-GUI thread I have the warning that I should not do that (but it works).

      If I instantiate the surface in the main GUI thread but create it in the non-GUI thread, it works, without warning.

      I also tested all this under Linux (Qt 5.8), no problems.

       

       

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            matirai Philippe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes