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

App crash #27

Closed
Beforerr opened this issue Feb 8, 2024 · 14 comments
Closed

App crash #27

Beforerr opened this issue Feb 8, 2024 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@Beforerr
Copy link

Beforerr commented Feb 8, 2024

  • SciQLop version: 0.5.4
  • Python version: 3.12
  • Operating System: macOS m2

Description

I tried to drag variables into the window like what the screenshot did, but got no response. Also the app closed whenever I tried to click the plus button or open a notebook and run.

It seems like a Qt/OS problem. But I had no experience with that.

What I Did

RuntimeError: Event loop already running
doh set to ""  --  SystemOnly
js: Language pack 'en_US' not installed!
js: Failed to fetch ipywidgets through the "jupyter.widget.control" comm channel, fallback to fetching individual model state. Reason: Control comm was closed too early
js: Connection lost, reconnecting in 0 seconds.
Compositor returned null texture
Compositor returned null texture
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
        0   CoreFoundation                      0x000000018c752800 __exceptionPreprocess + 176
        1   libobjc.A.dylib                     0x000000018c249eb4 objc_exception_throw + 60
        2   CoreFoundation                      0x000000018c6c8fc0 -[__NSCFString hasSuffix:] + 0
        3   libqcocoa.dylib                     0x0000000141476044 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274796
        4   libqcocoa.dylib                     0x00000001414760c8 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274928
        5   libqcocoa.dylib                     0x0000000141474688 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 268208
        6   QtWidgets                           0x0000000125ef11a8 _ZN9QListView16selectionChangedERK14QItemSelectionS2_ + 204
        7   QtCore                              0x0000000120eab48c _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3808
        8   QtCore                              0x0000000121071e44 _ZN19QItemSelectionModel20emitSelectionChangedERK14QItemSelectionS2_ + 216
        9   QtCore                              0x0000000121071a2c _ZN19QItemSelectionModel6selectERK14QItemSelection6QFlagsINS_13SelectionFlagEE + 636
        10  QtCore                              0x000000012107170c _ZN19QItemSelectionModel6selectERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 68
        11  QtCore                              0x00000001210728cc _ZN19QItemSelectionModel15setCurrentIndexERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 260
        12  QtWidgets                           0x0000000125d4f338 _ZNK9QComboBox5countEv + 828
        13  QtWidgets                           0x0000000125d528b4 _ZN9QComboBoxC1ER16QComboBoxPrivateP7QWidget + 2412
        14  QtCore                              0x0000000120eab224 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3192
        15  QtCore                              0x000000012105a944 _ZN18QAbstractItemModel13endInsertRowsEv + 200
        16  QtGui                               0x000000012455f1a8 _ZN18QStandardItemModel11itemChangedEP13QStandardItem + 844
        17  QtWidgets                           0x0000000125d55e38 _ZN9QComboBox11insertItemsEiRK5QListI7QStringE + 340
        18  QtWidgets.abi3.so                   0x0000000126ac590c _ZL26Sbk_QComboBoxFunc_addItemsP7_objectS0_ + 156
        19  python3.12                          0x0000000100ed0670 cfunction_vectorcall_O + 296
        20  python3.12                          0x0000000100e746e4 PyObject_Vectorcall + 88
        21  python3.12                          0x0000000100f8dcc8 _PyEval_EvalFrameDefault + 51728
        22  python3.12                          0x0000000100e77e8c method_vectorcall + 560
        23  libpyside6.abi3.6.6.dylib           0x0000000104b66750 _ZN6PySide13SignalManager20callPythonMetaMethodERK11QMetaMethodPPvP7_objectb + 536
        24  libpyside6.abi3.6.6.dylib           0x0000000104b66318 _ZN6PySide13SignalManager20SignalManagerPrivate16qtMethodMetacallEP7QObjectiPPv + 760
        25  QtCore                              0x0000000120eab1f4 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3144
        26  libpyside6.abi3.6.6.dylib           0x0000000104b66284 _ZN6PySide13SignalManager20SignalManagerPrivate16qtMethodMetacallEP7QObjectiPPv + 612
        27  libpyside6.abi3.6.6.dylib           0x0000000104b64f78 _ZN6PySide12MetaFunction4callEP7QObjectiP7_objectPS4_ + 1380
        28  QtCore.abi3.so                      0x00000001209924e8 _ZL20Sbk_QObjectFunc_emitP7_objectS0_ + 316
        29  python3.12                          0x0000000100ecfcd8 cfunction_call + 308
        30  python3.12                          0x0000000100e74954 _PyObject_Call + 184
        31  libpyside6.abi3.6.6.dylib           0x0000000104b79454 _ZL18signalInstanceEmitP7_objectS0_ + 728
        32  python3.12                          0x0000000100e84abc method_vectorcall_VARARGS + 204
        33  python3.12                          0x0000000100e746e4 PyObject_Vectorcall + 88
        34  python3.12                          0x0000000100f8dcc8 _PyEval_EvalFrameDefault + 51728
        35  libpyside6.abi3.6.6.dylib           0x0000000104b66750 _ZN6PySide13SignalManager20callPythonMetaMethodERK11QMetaMethodPPvP7_objectb + 536
        36  libpyside6.abi3.6.6.dylib           0x0000000104b698b8 _ZN6PySide16GlobalReceiverV211qt_metacallEN11QMetaObject4CallEiPPv + 672
        37  QtCore                              0x0000000120eab1f4 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3144
        38  QtGui                               0x00000001245cf0a4 _ZN7QAction8activateENS_11ActionEventE + 368
        39  QtWidgets                           0x0000000125d38cf0 _ZNK15QAbstractButton11isCheckableEv + 344
        40  QtWidgets                           0x0000000125d39c48 _ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent + 172
        41  QtWidgets                           0x0000000125e37d90 _ZN11QToolButton17mouseReleaseEventEP11QMouseEvent + 20
        42  QtWidgets                           0x0000000125c858b8 _ZN7QWidget5eventEP6QEvent + 132
        43  QtWidgets                           0x0000000125e384ec _ZN11QToolButton5eventEP6QEvent + 208
        44  QtWidgets                           0x0000000125c3c594 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272
        45  QtWidgets                           0x0000000125c3e5c0 _ZN12QApplication6notifyEP7QObjectP6QEvent + 5072
        46  QtCore                              0x0000000120e61474 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292
        47  QtWidgets                           0x0000000125c3cb34 _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Ebb + 808
        48  QtWidgets                           0x0000000125c9a860 _ZNK21QWidgetRepaintManager3rhiEv + 11080
        49  QtWidgets                           0x0000000125c99a6c _ZNK21QWidgetRepaintManager3rhiEv + 7508
        50  QtWidgets                           0x0000000125c3c594 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272
        51  QtWidgets                           0x0000000125c3d3e8 _ZN12QApplication6notifyEP7QObjectP6QEvent + 504
        52  QtCore                              0x0000000120e61474 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292
        53  QtGui                               0x00000001242bb9ec _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 1740
        54  QtGui                               0x0000000124317674 _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 408
        55  libqcocoa.dylib                     0x0000000141417d74 qt_plugin_instance + 58768
        56  CoreFoundation                      0x000000018c6ddcfc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
        57  CoreFoundation                      0x000000018c6ddc90 __CFRunLoopDoSource0 + 176
        58  CoreFoundation                      0x000000018c6dda00 __CFRunLoopDoSources0 + 244
        59  CoreFoundation                      0x000000018c6dc5f0 __CFRunLoopRun + 828
        60  CoreFoundation                      0x000000018c6dbc5c CFRunLoopRunSpecific + 608
        61  HIToolbox                           0x0000000196c55448 RunCurrentEventLoopInMode + 292
        62  HIToolbox                           0x0000000196c550d8 ReceiveNextEventCommon + 220
        63  HIToolbox                           0x0000000196c54fdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
        64  AppKit                              0x000000018feb6c54 _DPSNextEvent + 660
        65  AppKit                              0x000000019068cebc -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
        66  AppKit                              0x000000018feaa100 -[NSApplication run] + 476
        67  libqcocoa.dylib                     0x00000001414158fc qt_plugin_instance + 49432
        68  QtCore                              0x0000000120e6b160 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 540
        69  QtCore                              0x0000000120e61b00 _ZN16QCoreApplication4execEv + 112
        70  QtWidgets.abi3.so                   0x0000000126b872d8 _ZL25Sbk_QApplicationFunc_execP7_object + 60
        71  python3.12                          0x0000000100ed07fc cfunction_vectorcall_NOARGS + 292
        72  python3.12                          0x0000000100e746e4 PyObject_Vectorcall + 88
        73  
libc++abi: terminating due to uncaught exception of type NSException
@jeandet jeandet self-assigned this Feb 8, 2024
@jeandet jeandet added the bug Something isn't working label Feb 8, 2024
@jeandet
Copy link
Member

jeandet commented Feb 8, 2024

@Beforerr, I tried on both intel and M2 CPUs and wasn't able to reproduce the bug. Can you tell me more about your setup?

  • Did you use a dedicated venv for SciQLop?
  • How did you install python?
  • Do you remember having any warning from pip about PySide version mismatch after installing SciQLop?

Mote that Python 3.11 and 3.12 are not supported by SciQLop yet because of this bug but it will only stop updating plots after some time not crash immediately as you described.

@Beforerr
Copy link
Author

@jeandet I have downgraded the python into 3.10, but the app still instantly crashed when I tried to run notebook.

My environment could be found here link

@jeandet
Copy link
Member

jeandet commented Feb 11, 2024

@Beforerr, I suspect it has something to do with conda and the way they build some binary packages that might not play well with PyPI ones. I won't be able to test with conda on a ARM based Mac in the next few days. One test you can do in the mean time, is to pull all dependencies with pip in a new clean environment.

@jeandet
Copy link
Member

jeandet commented Feb 11, 2024

This might be related.

@Beforerr
Copy link
Author

I tried only installed python and pip with conda and everything else with pip. Still, the app would crash when I tried to plot something in the notebook. It might be a PySide6 problem, so is it possible that we might downgrade some dependencies?

Also how could one drag the product into window and plot it?

@jeandet
Copy link
Member

jeandet commented Feb 11, 2024

Sadly, it's not possible to downgrade PySide6 since both the plot and the dock widgets libraries are written in C++ and wrapped with PySide6 while PySide6 doesn't allow to mix different versions of itself.

To plot a product with drag and drop, you need first to create a plot panel with the plus icon in the top tool bar. Then you can drag and drop any product into it as long as it is a leave in the product tree.

Note also that I successfully tested SciQLop with python shipped by homebrew on a Mac mini M2.

@danieltomasz
Copy link

Coming from other discussion from other pachage, yhis might happen only on MacOS Sonoma due to coca binding with qt, pyside6 6.5.3 seems to work

@jeandet
Copy link
Member

jeandet commented Feb 12, 2024

@danieltomasz weird, the machine I use for tests is running on Sonoma, does it also depend on which version of Sonoma?
image

@jeandet
Copy link
Member

jeandet commented Feb 12, 2024

Same with latest stable Sonoma:
image

@danieltomasz
Copy link

I think it is the same problem https://bugreports.qt.io/browse/QTBUG-120181
I am on Apple Silicon, my guess would be that Intel might be spared from crashes, but architecture doesn't seem to be reported in the qt issue

@danieltomasz
Copy link

PySide6==6.6.0 seems to be working in other Python app, crashes starting with higher versions

@jeandet
Copy link
Member

jeandet commented Feb 22, 2024

Once https://github.com/mborgerson/pyside6_qtads releases PySide 6.6.2 support, I'll push a release. In the mean time I should get a MacBook soon to investigate a bit more such issues.

@jeandet
Copy link
Member

jeandet commented Apr 2, 2024

@Beforerr did you try a newer version of SciQLop? We used quite a lot on MacOs/ARM last week during a workshop.
The main issue on MacOs is that you should not close the welcome panel (it crashes the whole app). If you try to update SciQLop check that you use the exact versions for PySide, SciQLopPlots and PySide6-QtAds see here.

@jeandet
Copy link
Member

jeandet commented Jun 11, 2024

@Beforerr I believe this have been fixed since few releases. Do not hesitate to reopen this bug if you still have this issue with the latest version.

@jeandet jeandet closed this as completed Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants