Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run on MacOS arm #1101

Closed
jhennawi opened this issue Apr 20, 2024 · 5 comments
Closed

Cannot run on MacOS arm #1101

jhennawi opened this issue Apr 20, 2024 · 5 comments
Labels

Comments

@jhennawi
Copy link

I cloned the most recent version and tried to run and ginga immediately crashes. I get the following error:

(pypeit) Josephs-MBP:ginga joe$ ginga
Error reading saved layout: malformed node or string on line 4: <ast.Name object at 0x34e95ba90>
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
0 CoreFoundation 0x0000000184c36ccc __exceptionPreprocess + 176
1 libobjc.A.dylib 0x000000018471e788 objc_exception_throw + 60
2 CoreFoundation 0x0000000184bad270 -[__NSCFString hasSuffix:] + 0
3 libqcocoa.dylib 0x0000000317876044 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274796
4 libqcocoa.dylib 0x00000003178760c8 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274928
5 libqcocoa.dylib 0x0000000317874688 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 268208
6 QtWidgets 0x00000003167411a8 ZN9QListView16selectionChangedERK14QItemSelectionS2 + 204
7 QtCore 0x00000003120cb48c _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3808
8 QtCore 0x0000000312291e44 ZN19QItemSelectionModel20emitSelectionChangedERK14QItemSelectionS2 + 216
9 QtCore 0x0000000312291a2c _ZN19QItemSelectionModel6selectERK14QItemSelection6QFlagsINS_13SelectionFlagEE + 636
10 QtCore 0x000000031229170c _ZN19QItemSelectionModel6selectERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 68
11 QtCore 0x00000003122928cc _ZN19QItemSelectionModel15setCurrentIndexERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 260
12 QtWidgets 0x000000031659f338 _ZNK9QComboBox5countEv + 828
13 QtWidgets 0x00000003165a28b4 _ZN9QComboBoxC1ER16QComboBoxPrivateP7QWidget + 2412
14 QtCore 0x00000003120cb224 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3192
15 QtCore 0x000000031227a944 _ZN18QAbstractItemModel13endInsertRowsEv + 200
16 QtGui 0x0000000315a877a4 _ZN18QStandardItemModel11itemChangedEP13QStandardItem + 2376
17 QtWidgets 0x00000003165a5910 _ZN9QComboBox10insertItemEiRK5QIconRK7QStringRK8QVariant + 368
18 QtWidgets.abi3.so 0x00000003152527a0 ZL22meth_QComboBox_addItemP7_objectS0_S0 + 256
19 python3.11 0x00000001027c9fb0 cfunction_call + 60
20 python3.11 0x00000001028ad034 _PyEval_EvalFrameDefault + 197300
21 python3.11 0x000000010276783c _PyFunction_Vectorcall + 476
22 python3.11 0x000000010276d4a0 method_vectorcall + 164
23 python3.11 0x00000001028b1dec _PyEval_EvalFrameDefault + 217196
24 python3.11 0x000000010276783c _PyFunction_Vectorcall + 476
25 python3.11 0x000000010276d4a0 method_vectorcall + 164
26 python3.11 0x00000001028b1dec _PyEval_EvalFrameDefault + 217196
27 python3.11 0x000000010287a30c _PyEval_Vector + 464
28 python3.11 0x000000010287a0ac PyEval_EvalCode + 248
29 python3.11 0x0000000102914598 run_mod + 184
30 python3.11 0x0000000102914364 pyrun_file + 148
31 python3.11 0x0000000102913d90 _PyRun_SimpleFileObject + 268
32 python3.11 0x0000000102913708 _PyRun_AnyFileObject + 216
33 python3.11 0x00000001029372d0 pymain_run_file_obj + 260
34 python3.11 0x0000000102936bf8 pymain_run_file + 72
35 python3.11 0x00000001029363f8 Py_RunMain + 1328
36 python3.11 0x00000001026ff6bc main + 56
37 dyld 0x000000018475a0e0 start + 2360
)
libc++abi: terminating due to uncaught exception of type NSException
Abort trap: 6

@ejeschke
Copy link
Owner

@jhennawi , I'm successfully running on Apple M2 (arm), Mac OS X 14.4.1 (Sonoma) with:

(ginga-dev) erics-mbp:ginga-pure eric$ conda list pyqt
# packages in environment at /Users/eric/miniconda3/envs/ginga-dev:
#
# Name                    Version                   Build  Channel
pyqt                      5.15.2           py39he8f2410_0  

Could you let me know which version of Qt you are running? It looks like the error is crashing in a Qt ComboBox.

@jhennawi
Copy link
Author

jhennawi commented Apr 20, 2024 via email

@ejeschke
Copy link
Owner

Try:

$ conda list pyqt

@ejeschke
Copy link
Owner

I just tried pyqt6 with python 3.12. No issues.

(py312) erics-mbp:ginga-pure eric$ conda list pyqt6
# packages in environment at /Users/eric/miniconda3/envs/py312:
#
# Name                    Version                   Build  Channel
pyqt6                     6.6.1                    pypi_0    pypi
pyqt6-qt6                 6.6.3                    pypi_0    pypi
pyqt6-sip                 13.6.0                   pypi_0    pypi

@ejeschke
Copy link
Owner

@jhennawi reports via Slack: "Okay looks like I fixed the issue. It was using qt_api and QT_PLUGIN_PATH environment variables"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants