Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.2, 6.5.3, 6.7.2, 6.7.3
-
None
-
macOS 14.6.1
macOS 14.5
macOS 13.5.1
macOS 13.4.1
macOS 12.6.6
etc.
-
-
0a4026678 (dev), d2ee5811d (6.8), b879e6674 (tqtc/lts-6.5), 720ce9b97 (dev), a11b0a3d2 (6.8), bb4d6f8b6 (tqtc/lts-6.5), fa9449bbe (dev), 059cbd17b (6.8)
Description
Found this crash during a digging in our users crash reports.
This is not something very often, and we can't reproduce it locally.
So unfortunately I have no idea how exactly they do this, and I have no any simple reproducer.
So, there is only a crash report:
OS Version: Mac OS X 13.4 (22F66) Report Version: 104 Exception Type: SIGSEGV Exception Codes: SEGV_MAPERR at 0x1e Crashed Thread: 0 Thread 0 Crashed: 0 libobjc.A.dylib 0x00007ff804942fda objc_opt_respondsToSelector + 27 1 libqcocoa.dylib 0x000000011a92782e QCocoaDrag::maybeDragMultipleItems() (qcocoadrag.mm:147) 2 libqcocoa.dylib 0x000000011a9275b2 QCocoaDrag::drag(QDrag*) (qcocoadrag.mm:105) 3 QtGui 0x0000000114d6f74a QDragManager::drag(QDrag*) (qdnd.cpp:81) 4 QtGui 0x0000000114d6fcd1 QDrag::exec(QFlags<Qt::DropAction>, Qt::DropAction) (qdrag.cpp:246) 5 QtCore 0x00000001169d6cd6 QObject::event(QEvent*) (qobject.cpp:1391) 6 QtWidgets 0x000000011204a997 QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3287) 7 QtWidgets 0x000000011204b7bc QApplication::notify(QObject*, QEvent*) (qapplication.cpp:0) 8 QtCore 0x000000011698fb0a QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1118) 9 QtCore 0x0000000116990cdc QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.cpp:1536) 10 libqcocoa.dylib 0x000000011a92b0b6 QCocoaEventDispatcherPrivate::processPostedEvents() (qcocoaeventdispatcher.mm:880) 11 libqcocoa.dylib 0x000000011a92baed QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) (qcocoaeventdispatcher.mm:902) 12 CoreFoundation 0x00007ff804d92906 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 16 13 CoreFoundation 0x00007ff804d928a9 __CFRunLoopDoSource0 + 156 14 CoreFoundation 0x00007ff804d92686 __CFRunLoopDoSources0 + 216 15 CoreFoundation 0x00007ff804d9130a __CFRunLoopRun + 915 16 CoreFoundation 0x00007ff804d9091c CFRunLoopRunSpecific + 559 17 HIToolbox 0x00007ff80ecd4dad RunCurrentEventLoopInMode + 291 18 HIToolbox 0x00007ff80ecd49f4 ReceiveNextEventCommon + 198 19 HIToolbox 0x00007ff80ecd4918 _BlockUntilNextEventMatchingListInModeWithFilter + 63 20 AppKit 0x00007ff807d845d0 _DPSNextEvent + 857 21 AppKit 0x00007ff807d8347a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1213 22 AppKit 0x00007ff807d75ae8 -[NSApplication run] + 585 23 libqcocoa.dylib 0x000000011a92a507 QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qcocoaeventdispatcher.mm:404) 24 QtCore 0x0000000116999316 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:100) 25 QtCore 0x00000001169900f7 QCoreApplication::exec() (qcoreapplication.cpp:1439)
bool QCocoaDrag::maybeDragMultipleItems() { ... NSView *view = m_lastView ? m_lastView : m_lastEvent.window.contentView; if (![view respondsToSelector:@selector(draggingSession:sourceOperationMaskForDraggingContext:)]) <<-- CRASHED HERE return false; ...
Looking at the code I can only imagine that 'view' is null pointer by some reason. So probably adding a simple nullptr check before calling respondsToSelector() will solve this.
Attachments
Issue Links
- relates to
-
QTBUG-102584 Drag and drop always assumes to have [NSWindow contentView] with drag drop API
-
- Closed
-