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

Crash during window resize when using QQuickWidget

XMLWordPrintable

    • macOS
    • 2305f8af9 (dev), 51b591642 (6.5), 2f4b30ee0 (6.4), 6451fdffc (tqtc/lts-6.2)

      When using a QQuickWidget (at least on macOS, unknown Windows), during window resize can trigger a crash due to the composited window buffer being deallocated whilst uploading to the GPU is still in flight. The Metal validation layer outputs

      -[MTLDebugDevice notifyExternalReferencesNonZeroOnDealloc:]:2885: failed assertion `The following Metal object is being destroyed while still required to be alive by the command buffer 0x7fb5328a5200 (label: <no label set>):
      <MTLToolsObject: 0x60000140d500> -> <GFXAAMD_MtlBuffer: 0x7fb5314413c0>
          label = <none> 
          length = 20401152 
          cpuCacheMode = MTLCPUCacheModeDefaultCache 
          storageMode = MTLStorageModeShared 
          hazardTrackingMode = MTLHazardTrackingModeTracked 
          resourceOptions = MTLResourceCPUCacheModeDefaultCache MTLResourceStorageModeShared MTLResourceHazardTrackingModeTracked  
          purgeableState = MTLPurgeableStateNonVolatile' 

      This is more easily reproduced with heavier interfaces (we can reproduce with a ~1700 line UI file) by rapidly resizing for a few seconds. Reducing the complexity makes it more difficult but not impossible to reproduce, suggesting a timing issue where the runtime is not waiting the required amount of time (for example, by not correctly calling [MTLCommandBuffer waitUntilCompleted], or not synchronizing MTLSharedEvent before releasing the resource) for an upload to complete before freeing the resource.

        For Gerrit Dashboard: QTBUG-109971
        # Subject Branch Project Status CR V

            lagocs Laszlo Agocs
            mbarriault Maya Barriault
            Votes:
            5 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes