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

QPlatformScreen::screen() seems to segfault when there are no available screens

XMLWordPrintable

    • macOS

      I'm not entirely sure which version it affects, but presumably the latest major version. I'm using a snapshot of mumble from http://wiki.mumble.info/wiki/Main_Page. The binary appears statically linked so I cannot tell which version exactly.

      I'm able to inconsistently trigger it by turning my displays off in OS X. It is not sleeping, the displays are simply being turned off either by using the hot corners feature or physically turning them off. If it is not straightforward to figure out I can install the Qt development environment and compile Mumble myself to try to track it down further. My assumption is that it just needs a simple null check or two but I am not particularly familiar with the Qt code so I could be mistaken.

      Stack trace:

      Crashed Thread:        0  Dispatch queue: com.apple.main-thread
      
      Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
      Exception Codes:       EXC_I386_GPFLT
      Exception Note:        EXC_CORPSE_NOTIFY
      
      Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
      0   net.sourceforge.mumble.Mumble 	0x0000000108911c94 QPlatformScreen::screen() const + 20
      1   net.sourceforge.mumble.Mumble 	0x000000010894e9f7 QScreen::virtualSiblings() const + 231
      2   net.sourceforge.mumble.Mumble 	0x00000001089296b7 QWindowPrivate::setTopLevelScreen(QScreen*, bool) + 599
      3   net.sourceforge.mumble.Mumble 	0x000000010894e578 QScreen::~QScreen() + 648
      4   net.sourceforge.mumble.Mumble 	0x000000010894e65e QScreen::~QScreen() + 14
      5   net.sourceforge.mumble.Mumble 	0x00000001089112cf QPlatformIntegration::destroyScreen(QPlatformScreen*) + 303
      6   net.sourceforge.mumble.Mumble 	0x0000000108362e7f QCocoaIntegration::updateScreens() + 1487
      7   com.apple.CoreFoundation      	0x00007fff8ad8a70c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
      8   com.apple.CoreFoundation      	0x00007fff8ad8a67f ___CFXRegistrationPost_block_invoke + 63
      9   com.apple.CoreFoundation      	0x00007fff8ad89d47 _CFXRegistrationPost + 407
      10  com.apple.CoreFoundation      	0x00007fff8ad89ab2 ___CFXNotificationPost_block_invoke + 50
      11  com.apple.CoreFoundation      	0x00007fff8ad83d42 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
      12  com.apple.CoreFoundation      	0x00007fff8ac72145 _CFXNotificationPost + 693
      13  com.apple.Foundation          	0x00007fff9c5b8921 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
      14  com.apple.AppKit              	0x00007fff9464aca8 -[NSApplication _reactToScreenInvalidationImmediately:] + 383
      15  com.apple.AppKit              	0x00007fff9464aaf9 __44-[NSApplication _reactToScreenInvalidation:]_block_invoke + 59
      16  com.apple.CoreFoundation      	0x00007fff8ace04ac __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
      17  com.apple.CoreFoundation      	0x00007fff8acd2165 __CFRunLoopDoBlocks + 341
      18  com.apple.CoreFoundation      	0x00007fff8acd1ecb __CFRunLoopRun + 2347
      19  com.apple.CoreFoundation      	0x00007fff8acd1338 CFRunLoopRunSpecific + 296
      20  com.apple.HIToolbox           	0x00007fff92121935 RunCurrentEventLoopInMode + 235
      21  com.apple.HIToolbox           	0x00007fff9212176f ReceiveNextEventCommon + 432
      22  com.apple.HIToolbox           	0x00007fff921215af _BlockUntilNextEventMatchingListInModeWithFilter + 71
      23  com.apple.AppKit              	0x00007fff942fb0ee _DPSNextEvent + 1067
      24  com.apple.AppKit              	0x00007fff946c7943 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
      25  com.apple.AppKit              	0x00007fff942f0fc8 -[NSApplication run] + 682
      26  net.sourceforge.mumble.Mumble 	0x000000010837ba7d QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2189
      27  net.sourceforge.mumble.Mumble 	0x0000000108eefa1c QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 412
      28  net.sourceforge.mumble.Mumble 	0x0000000108ef2f9a QCoreApplication::exec() + 346
      29  net.sourceforge.mumble.Mumble 	0x0000000107bc5978 main + 12184
      30  net.sourceforge.mumble.Mumble 	0x0000000107b5ad34 start + 52

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

            vestbo Tor Arne Vestbø
            noeffex Aaron
            Votes:
            4 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes