Closed Swesik closed 1 year ago
Filed as internal issue #USD-8456
Hi @Swesik, I'm not able to reproduce this on my M1 running MacOS 12.6, Python 3.8.9 and PySide6 6.5.1.1. I will try to see if I can test this under Python 3.8.10.
What OS and PySide6 versions are you using?
I am using Ventura and PySide 6.5.1.1 as well
I'm unable to repro with M1, macos 13.4, python 3.8.10, pyside 6.5.1.1
I tested against top of tree dev.
@Swesik Can you point to, or post, a usda file that's causing this issue for you?
I'm running into this issue on any usda file that I open, but USD/extras/usd/tutorials/convertingLayerFormats/Sphere.usda
is one example. Below is the full error message:
2023-06-29 08:41:52.888 python[54783:41600880] Terminating app due to uncaught exception 'NSRangeException', reason: ' -[NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array' *** First throw call stack: ( 0 CoreFoundation 0x00000001938b4418 exceptionPreprocess + 176 1 libobjc.A.dylib 0x00000001933feea8 objc_exception_throw + 60 2 CoreFoundation 0x0000000193999cc4 -[NSCFString characterAtIndex:].cold.1 + 0 3 CoreFoundation 0x0000000193825fc4 -[NSArrayM objectAtIndexedSubscript:] + 188 4 libqcocoa.dylib 0x0000000133ec4124 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 269336 5 libqcocoa.dylib 0x0000000133ec41a8 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 269468 6 libqcocoa.dylib 0x0000000133ec277c _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 262768 7 QtWidgets 0x0000000127ca50b0 ZN9QTreeView14currentChangedERK11QModelIndexS2 + 452 8 QtWidgets.abi3.so 0x000000013154ecd4 ZN18QTreeWidgetWrapper14currentChangedERK11QModelIndexS2 + 288 9 QtCore 0x0000000125249788 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3780 10 QtCore 0x000000012540e18c _ZN19QItemSelectionModel15setCurrentIndexERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 324 11 QtWidgets 0x0000000127c30980 _ZN17QAbstractItemView12focusInEventEP11QFocusEvent + 344 12 QtWidgets.abi3.so 0x0000000131551480 _ZN18QTreeWidgetWrapper12focusInEventEP11QFocusEvent + 300 13 QtWidgets 0x0000000127a02688 _ZN7QWidget5eventEP6QEvent + 988 14 QtWidgets 0x0000000127a86060 _ZN6QFrame5eventEP6QEvent + 56 15 QtWidgets 0x0000000127c2d9d4 _ZN17QAbstractItemView5eventEP6QEvent + 484 16 QtWidgets 0x00000001279b8fec _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272 17 QtWidgets 0x00000001279ba994 _ZN12QApplication6notifyEP7QObjectP6QEvent + 3396 18 QtCore 0x00000001251fff88 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292 19 QtWidgets 0x00000001279b726c _ZN19QApplicationPrivate14setFocusWidgetEP7QWidgetN2Qt11FocusReasonE + 396 20 QtWidgets 0x00000001279fe1f8 _ZN7QWidget8setFocusEN2Qt11FocusReasonE + 580 21 QtWidgets.abi3.so 0x00000001315c3e88 _ZL24Sbk_QWidgetFunc_setFocusP7objectS0 + 280 22 libpython3.8.dylib 0x0000000101199628 cfunction_call_varargs + 332 23 libpython3.8.dylib 0x0000000101198f2c _PyObject_MakeTpCall + 372 24 libpython3.8.dylib 0x0000000101261560 call_function + 468 25 libpython3.8.dylib 0x000000010125e4c4 _PyEval_EvalFrameDefault + 23464 26 libpython3.8.dylib 0x0000000101199910 function_code_fastcall + 120 27 libpython3.8.dylib 0x000000010119c0e4 method_vectorcall + 156 28 libpython3.8.dylib 0x00000001012614c0 call_function + 308 29 libpython3.8.dylib 0x000000010125e4c4 _PyEval_EvalFrameDefault + 23464 30 libpython3.8.dylib 0x0000000101199910 function_code_fastcall + 120 31 libpython3.8.dylib 0x000000010119c1ec method_vectorcall + 420 32 libpython3.8.dylib 0x0000000101199290 PyVectorcall_Call + 104 33 QtCore.abi3.so 0x0000000124d12f6c _ZN14QObjectWrapper11eventFilterEP7QObjectP6QEvent + 252 34 QtCore 0x0000000125200138 _ZN23QCoreApplicationPrivate34sendThroughApplicationEventFiltersEP7QObjectP6QEvent + 228 35 QtWidgets 0x00000001279b8f2c _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 80 36 QtWidgets 0x00000001279b9e50 _ZN12QApplication6notifyEP7QObjectP6QEvent + 512 37 QtCore 0x00000001251fff88 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292 38 QtGui 0x000000012407e794 _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 1748 39 QtGui 0x00000001240d5aa4 _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 396 40 libqcocoa.dylib 0x0000000133e67d40 qt_plugin_instance + 54740 41 CoreFoundation 0x0000000193839a34 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 42 CoreFoundation 0x00000001938399c8 CFRunLoopDoSource0 + 176 43 CoreFoundation 0x0000000193839738 CFRunLoopDoSources0 + 244 44 CoreFoundation 0x000000019383833c __CFRunLoopRun + 836 45 CoreFoundation 0x00000001938378a4 CFRunLoopRunSpecific + 612 46 HIToolbox 0x000000019ceab3bc RunCurrentEventLoopInMode + 292 47 HIToolbox 0x000000019ceab04c ReceiveNextEventCommon + 236 48 HIToolbox 0x000000019ceaaf48 _BlockUntilNextEventMatchingListInModeWithFilter + 72 49 AppKit 0x0000000196a90630 _DPSNextEvent + 632 50 AppKit 0x0000000196a8f7c0 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728 51 AppKit 0x0000000196a83bf0 -[NSApplication run] + 464 52 libqcocoa.dylib 0x0000000133e66644 qt_plugin_instance + 48856 53 QtCore 0x00000001252098fc _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 532 54 QtCore 0x0000000125200614 _ZN16QCoreApplication4execEv + 112 55 QtWidgets.abi3.so 0x0000000131aaf2d4 _ZL26Sbk_QApplicationFunc_exec_P7_object + 164 56 libpython3.8.dylib 0x00000001011d9df4 cfunction_vectorcall_NOARGS + 264 57 libpython3.8.dylib 0x00000001012614c0 call_function + 308 58 libpython3.8.dylib 0x000000010125e4c4 _PyEval_EvalFrameDefault + 23464 59 libpython3.8.dylib 0x0000000101199910 function_code_fastcall + 120 60 libpython3.8.dylib 0x00000001012614c0 call_function + 308 61 libpython3.8.dylib 0x000000010125e4a4 _PyEval_EvalFrameDefault + 23432 62 libpython3.8.dylib 0x0000000101199910 function_code_fastcall + 120 63 libpython3.8.dylib 0x00000001012614c0 call_function + 308 64 libpython3.8.dylib 0x000000010125e4a4 _PyEval_EvalFrameDefault + 23432 65 libpython3.8.dylib 0x00000001012623d8 _PyEval_EvalCodeWithName + 2936 66 libpython3.8.dylib 0x0000000101258888 PyEval_EvalCode + 60 67 libpython3.8.dylib 0x000000010129b460 run_mod + 160 68 libpython3.8.dylib 0x00000001012997a0 PyRun_SimpleFileExFlags + 872 69 libpython3.8.dylib 0x00000001012b6824 Py_RunMain + 1592 70 libpython3.8.dylib 0x00000001012b6c94 pymain_main + 324 71 libpython3.8.dylib 0x00000001012b6d34 Py_BytesMain + 40 72 dyld 0x000000019342fe50 start + 2544 ) libc++abi: terminating with uncaught exception of type NSException zsh: abort usdview extras/usd/tutorials/convertingLayerFormats/Sphere.usda
I'm unable to repro with any usda file including that one. Reading your call stack, a focus event in a tree view is occurring, as you describe. It's setting the focus on an item, and for some reason that item is sending an activated message to the QCocoaSystemTrayIcon and crashing when it tries to read a string. I can't find any code in usdview that deals with the QCocoaSystemTrayIcon, so it seems to be some built in Qt functionality.
One possibility is that you are not using the same PySide6 build as @sunyab or I. I got my copy, in conda, via pip install PySide6
. If you installed it via homebrew or other package manager, it's possible that it behaves differently since package managers typically have their own builds.
Tested on M1 and M1 Pro, both systems running Python 3.10.11 on macOS Ventura 13.4. The issue occurs with PySide 6.5.1.1 (haven't tested 6.5.1). Going back to PySide 6.5.0 fixes the issue on both machines. There is a high chance downgrading can help resolve your issue @Swesik.
Hi @Swesik , if @gracien-app 's information is correct, and this only occurs with pyside versions beyond what we are testing with (6.3.0), then I'm tentatively going to close this out, though we are always open to PR's for addressing issues with newer package versions than those against which we test - thank you!
Description of Issue
usdview crashes when hovering over the section with Type, Property Name, and Value. This seems to happen when opening any .usda file.
Steps to Reproduce
python USD/build_scripts/build_usd.py /opt/local/USD
usdview USD/extras/usd/tutorials/convertingLayerFormats/Sphere.usda
System Information (OS, Hardware)
MacOS, M2 I am using Python 3.8.10
Error Message:
'python[95302:40004980] Terminating app due to uncaught exception 'NSRangeException', reason: ' -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array''