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

Frame Graph Tries to Use Surface After It Is Destroyed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.4
    • Qt3D
    • None
    • Windows 10

      Qt Creator 4.3.0 (Community)

      Qt 5.9.4

      Visual Studio 2017

    Description

      I've been playing around with Qt 3D trying to learn more about it.  I've created a simple application where I can create multiple windows and each window has its own QForwardRenderer which it adds to the main frame graph so that all windows are viewing the same scene.  Everything works fine until I close a window.  When the window is closed I remove its QForwardRenderer from the main frame graph and call deleteLater() on the window, but the application soon crashes.  In the call stack the crash always occurs on a background thread within Qt53DCore or Qt53DRender.

      I am able to successfully avoid the crash most of the time by using a single shot timer to wait 1000 ms after removing the QForwardRenderer from the frame graph before destroying the window.  The documentation indicates that the frame graph can be dynamically updated at run time, so I would expect something like this to work more naturally without having to insert a delay.

      I have a link on StackOverlow with the actual source code and additional details. https://stackoverflow.com/questions/49287287/qt3d-crashing-when-removing-frame-graph/49327785#49327785 

      Attachments

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

        Activity

          People

            seanharmer Sean Harmer
            moohasha David Mitchell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes