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

OSX: When disconnecting secondary monitor application hangs

    XMLWordPrintable

    Details

    • Platform/s:
      macOS
    • Commits:
      687fbc11525fddda73ba4925d916be555df22ca9

      Description

      The attached example application hangs when disconnecting secondary monitor and if the application window is on that secondary screen.

      The animation hangs and the following error messages are printed on the screen:

      $ 2dpainting.app/Contents/MacOS/2dpainting 
      2014-04-03 12:42:37.075 2dpainting[29451:707] invalid drawable
      2014-04-03 12:42:57.678 2dpainting[29451:707] *** -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]
      2014-04-03 12:42:57.682 2dpainting[29451:707] (
      	0   CoreFoundation                      0x00007fff8bbccb06 __exceptionPreprocess + 198
      	1   libobjc.A.dylib                     0x00007fff848733f0 objc_exception_throw + 43
      	2   CoreFoundation                      0x00007fff8bb7fb53 -[__NSArrayI objectAtIndex:] + 163
      	3   libqcocoa.dylib                     0x0000000102e076e4 _ZNK12QCocoaScreen16devicePixelRatioEv + 68
      	4   QtWidgets                           0x00000001000f2dfe _ZNK7QWidget6metricEN12QPaintDevice17PaintDeviceMetricE + 510
      	5   QtGui                               0x00000001008b23ed _ZN8QPainter5beginEP12QPaintDevice + 3149
      	6   2dpainting                          0x0000000100002d78 _ZN8GLWidget10paintEventEP11QPaintEvent + 40
      	7   QtWidgets                           0x00000001000d66a6 _ZN7QWidget5eventEP6QEvent + 1958
      	8   QtOpenGL                            0x0000000100038eee _ZN9QGLWidget5eventEP6QEvent + 46
      	9   QtWidgets                           0x000000010009e37c _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 300
      	10  QtWidgets                           0x00000001000a0d71 _ZN12QApplication6notifyEP7QObjectP6QEvent + 5985
      	11  QtCore                              0x0000000100dcfc92 _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent + 114
      	12  QtWidgets                           0x00000001000d1335 _ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore + 2997
      	13  QtWidgets                           0x00000001000aa1d0 _ZN14QWidgetPrivate11repaint_sysERK7QRegion + 400
      	14  QtWidgets                           0x00000001000c89ce _ZN14QWidgetPrivate16syncBackingStoreEv + 110
      	15  QtWidgets                           0x00000001000d694d _ZN7QWidget5eventEP6QEvent + 2637
      	16  QtOpenGL                            0x0000000100038eee _ZN9QGLWidget5eventEP6QEvent + 46
      	17  QtWidgets                           0x000000010009e37c _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 300
      	18  QtWidgets                           0x00000001000a0d71 _ZN12QApplication6notifyEP7QObjectP6QEvent + 5985
      	19  QtCore                              0x0000000100dcfc92 _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent + 114
      	20  QtWidgets                           0x00000001000a6954 _ZN19QWidgetBackingStore17sendUpdateRequestEP7QWidgetNS_10UpdateTimeE + 68
      	21  QtWidgets                           0x00000001000a729f _ZN19QWidgetBackingStore9markDirtyERK5QRectP7QWidgetNS_10UpdateTimeENS_11BufferStateE + 815
      	22  QtWidgets                           0x00000001000d8e4d _ZN7QWidget7repaintERK5QRect + 157
      	23  QtWidgets                           0x00000001000d8da4 _ZN7QWidget7repaintEv + 52
      	24  QtCore                              0x0000000100e03e6f _ZN11QMetaObject8activateEP7QObjectiiPPv + 1871
      	25  QtCore                              0x0000000100dfccd3 _ZN7QObject5eventEP6QEvent + 51
      	26  QtWidgets                           0x000000010009e37c _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 300
      	27  QtWidgets                           0x00000001000a0d71 _ZN12QApplication6notifyEP7QObjectP6QEvent + 5985
      	28  QtCore                              0x0000000100dcfc92 _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent + 114
      	29  QtCore                              0x0000000100e26426 _ZN14QTimerInfoList14activateTimersEv + 1302
      	30  libqcocoa.dylib                     0x0000000102e1d5f5 _ZN28QCocoaEventDispatcherPrivate28activateTimersSourceCallbackEPv + 21
      	31  CoreFoundation                      0x00007fff8bb4bb31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
      	32  CoreFoundation                      0x00007fff8bb4b455 __CFRunLoopDoSources0 + 245
      	33  CoreFoundation                      0x00007fff8bb6e7f5 __CFRunLoopRun + 789
      	34  CoreFoundation                      0x00007fff8bb6e0e2 CFRunLoopRunSpecific + 290
      	35  HIToolbox                           0x00007fff86faaeb4 RunCurrentEventLoopInMode + 209
      	36  HIToolbox                           0x00007fff86faac52 ReceiveNextEventCommon + 356
      	37  HIToolbox                           0x00007fff86faaae3 BlockUntilNextEventMatchingListInMode + 62
      	38  AppKit                              0x00007fff89e1e533 _DPSNextEvent + 685
      	39  AppKit                              0x00007fff89e1ddf2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
      	40  AppKit                              0x00007fff89e151a3 -[NSApplication run] + 517
      	41  libqcocoa.dylib                     0x0000000102e1e374 _ZN21QCocoaEventDispatcher13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 2404
      	42  QtCore                              0x0000000100dcccfd _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 381
      	43  QtCore                              0x0000000100dd0247 _ZN16QCoreApplication4execEv + 359
      	44  2dpainting                          0x00000001000033b6 main + 70
      	45  2dpainting                          0x0000000100002b64 start + 52
      )
      1
      1
      QPaintDevice: Cannot destroy paint device that is being painted
      

      This is probably related to https://bugreports.qt-project.org/browse/QTBUG-37876
      Commit 9dd616fad9ff7ea15d6c813 has been applied to the code tree I'm using.

        Attachments

        1. untitled.zip
          18 kB
          Kimmo Leppälä
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            sorvig Morten Sørvig
            Reporter:
            kileppal Kimmo Leppälä
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes