Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
None
-
6.5.1
-
None
-
macOS Ventura 13.2.1 with arm64 silicon M1 Max chipset
Description
The editable tree model example at qtbase/examples/widgets/itemviews/editabletreemodel crashes when clicking on the tree view (not every time, but usually only takes a small number of clicks to get a crash). I suspect this is a macOS arm64 silicon specific issue.
I first noticed this with PySide6 where the crash only seems to occur when the model is reset (see https://bugreports.qt.io/browse/PYSIDE-2383). I can also confirm that the PySide6 example in the above link does NOT crash on macOS with an intel chip, but only on a system with the arm64 silicon (tested on M1 Max) chip.
The C++ editabletreemodel example in qtbase crashes out of the box on macOS Ventura 13.2.1 with arm64 silicon M1 Max chipset.
Steps to reproduce:
- brew install qt
- clone git://code.qt.io/qt/qtbase.git
- run example in qtbase/examples/widgets/itemviews/editabletreemodel
- EXPECTED BEHAVIOR: You should be able to select and edit the tree items.
- ACTUAL BEHAVIOR: Usually after only a few item selections/edits the app crashes.
Example error stack trace:
2023-07-08 12:18:54.919 editabletreemodel[14648:82860] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndexedSubscript:]: index 6 beyond bounds [0 .. 5]'
-
-
- First throw call stack:
(
0 CoreFoundation 0x00000001a65703e8 __exceptionPreprocess + 176
1 libobjc.A.dylib 0x00000001a60baea8 objc_exception_throw + 60
2 CoreFoundation 0x00000001a6655c94 -[__NSCFString characterAtIndex:].cold.1 + 0
3 CoreFoundation 0x00000001a64e1fb8 -[__NSCFString hasSuffix:] + 0
4 libqcocoa.dylib 0x0000000106127aa4 -[QMacAccessibilityElement initWithId:role:] + 296
5 libqcocoa.dylib 0x0000000106127b28 +[QMacAccessibilityElement elementWithId:] + 68
6 libqcocoa.dylib 0x0000000106126100 _ZN19QCocoaAccessibility25notifyAccessibilityUpdateEP16QAccessibleEvent + 104
7 QtWidgets 0x0000000102a8bc50 ZN9QTreeView14currentChangedERK11QModelIndexS2 + 340
8 QtCore 0x0000000102ef5d60 _Z10doActivateILb0EEvP7QObjectiPPv + 1228
9 QtCore 0x0000000103057c70 _ZN19QItemSelectionModel15setCurrentIndexERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 272
10 QtWidgets 0x0000000102a23ed8 _ZN17QAbstractItemView15mousePressEventEP11QMouseEvent + 828
11 QtWidgets 0x0000000102a860f8 _ZN9QTreeView15mousePressEventEP11QMouseEvent + 260
12 QtWidgets 0x000000010283e784 _ZN7QWidget5eventEP6QEvent + 140
13 QtWidgets 0x00000001028ae6b8 _ZN6QFrame5eventEP6QEvent + 56
14 QtWidgets 0x0000000102a23b2c _ZN17QAbstractItemView13viewportEventEP6QEvent + 964
15 QtWidgets 0x0000000102a8377c _ZN9QTreeView13viewportEventEP6QEvent + 328
16 QtCore 0x0000000102eba980 _ZN23QCoreApplicationPrivate29sendThroughObjectEventFiltersEP7QObjectP6QEvent + 184
17 QtWidgets 0x00000001027fe608 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 240
18 QtWidgets 0x0000000102800718 _ZN12QApplication6notifyEP7QObjectP6QEvent + 5248
19 QtCore 0x0000000102eba6e4 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 208
20 QtWidgets 0x00000001027febc8 _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Ebb + 864
21 QtWidgets 0x0000000102850a88 _ZN13QWidgetWindow16handleMouseEventEP11QMouseEvent + 1544
22 QtWidgets 0x000000010284fcfc _ZN13QWidgetWindow5eventEP6QEvent + 168
23 QtWidgets 0x00000001027fe628 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272
24 QtWidgets 0x00000001027ff4c8 _ZN12QApplication6notifyEP7QObjectP6QEvent + 560
25 QtCore 0x0000000102eba6e4 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 208
26 QtGui 0x000000010354d1d0 _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 1340
27 QtGui 0x0000000103596474 _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 132
28 libqcocoa.dylib 0x00000001060d1308 _ZN28QCocoaEventDispatcherPrivate26postedEventsSourceCallbackEPv + 428
29 CoreFoundation 0x00000001a64f5a08 _CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION_ + 28
30 CoreFoundation 0x00000001a64f599c __CFRunLoopDoSource0 + 176
31 CoreFoundation 0x00000001a64f570c __CFRunLoopDoSources0 + 244
32 CoreFoundation 0x00000001a64f4310 __CFRunLoopRun + 836
33 CoreFoundation 0x00000001a64f3878 CFRunLoopRunSpecific + 612
34 HIToolbox 0x00000001afbd3fa0 RunCurrentEventLoopInMode + 292
35 HIToolbox 0x00000001afbd3c30 ReceiveNextEventCommon + 236
36 HIToolbox 0x00000001afbd3b2c _BlockUntilNextEventMatchingListInModeWithFilter + 72
37 AppKit 0x00000001a977984c _DPSNextEvent + 632
38 AppKit 0x00000001a97789dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
39 AppKit 0x00000001a976ce0c -[NSApplication run] + 464
40 libqcocoa.dylib 0x00000001060d01c4 _ZN21QCocoaEventDispatcher13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 1568
41 QtCore 0x0000000102ec1b24 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 440
42 QtCore 0x0000000102ebabe4 _ZN16QCoreApplication4execEv + 112
43 editabletreemodel 0x00000001020b790c main + 88
44 dyld 0x00000001a60ebe50 start + 2544
)
libc++abi: terminating with uncaught exception of type NSException
- First throw call stack:
-