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

NSRangeException when opening a PlotWidget from another window #2896

Open
jordanlv opened this issue Dec 4, 2023 · 7 comments
Open

NSRangeException when opening a PlotWidget from another window #2896

jordanlv opened this issue Dec 4, 2023 · 7 comments

Comments

@jordanlv
Copy link

jordanlv commented Dec 4, 2023

Short description

Hello,

I'm facing an issue with pyqtgraph. When I want to open a graph from another window, my program crash with an NSRangeException.

Code to reproduce

I can reproduce this problem with this simple code :

from PySide6.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget, QPushButton
from pyqtgraph import PlotWidget
import sys

class MainWindow(QMainWindow):
    def __init__(self):
        super(MainWindow, self).__init__()
        central_widget = QWidget(self)
        self.setCentralWidget(central_widget)

        layout = QVBoxLayout(central_widget)

        button = QPushButton("Open Graph", self)
        button.clicked.connect(self.open_graph)

        self.plot_widget = None

        layout.addWidget(button)

    def open_graph(self):
        graph_window = GraphWindow(self)
        graph_window.show()


class GraphWindow(QWidget):
    def __init__(self, parent=None):
        super(GraphWindow, self).__init__(parent)

        layout = QVBoxLayout(self)

        plot_widget = PlotWidget(self)
        layout.addWidget(plot_widget)

        x = [1, 2, 3, 4, 5]
        y = [10, 20, 15, 25, 30]
        plot_widget.plot(x, y, pen='b')

if __name__ == "__main__":
    app = QApplication(sys.argv)
    main_window = MainWindow()
    main_window.show()
    sys.exit(app.exec_())

Expected behavior

This code is excepted to open the graph.

Real behavior

When I click on the button a throw call stack appears :

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
        0   CoreFoundation                      0x000000018ce4a800 __exceptionPreprocess + 176
        1   libobjc.A.dylib                     0x000000018c941eb4 objc_exception_throw + 60
        2   CoreFoundation                      0x000000018cdc0fc0 -[__NSCFString hasSuffix:] + 0
        3   libqcocoa.dylib                     0x000000012a880470 -[QMacAccessibilityElement initWithId:role:] + 320
        4   libqcocoa.dylib                     0x000000012a88050c +[QMacAccessibilityElement elementWithId:] + 76
        5   libqcocoa.dylib                     0x000000012a87e9f4 _ZN19QCocoaAccessibility25notifyAccessibilityUpdateEP16QAccessibleEvent + 116
        6   libQt6Widgets.6.6.1.dylib           0x0000000107379590 _ZN9QListView16selectionChangedERK14QItemSelectionS2_ + 220
        7   libQt6Core.6.6.1.dylib              0x00000001189ca220 _Z10doActivateILb0EEvP7QObjectiPPv + 1420
        8   libQt6Core.6.6.1.dylib              0x00000001188a088c _ZN19QItemSelectionModel20emitSelectionChangedERK14QItemSelectionS2_ + 768
        9   libQt6Core.6.6.1.dylib              0x00000001188a02a0 _ZN19QItemSelectionModel6selectERK14QItemSelection6QFlagsINS_13SelectionFlagEE + 616
        10  libQt6Core.6.6.1.dylib              0x000000011889ff60 _ZN19QItemSelectionModel6selectERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 88
        11  libQt6Core.6.6.1.dylib              0x00000001188a1304 _ZN19QItemSelectionModel15setCurrentIndexERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 352
        12  libQt6Widgets.6.6.1.dylib           0x000000010760f160 _ZN16QComboBoxPrivate15setCurrentIndexERK11QModelIndex + 760
        13  libQt6Widgets.6.6.1.dylib           0x000000010760e760 _ZN9QComboBox15setCurrentIndexEi + 128
        14  libQt6Widgets.6.6.1.dylib           0x0000000107612bc8 _ZN16QComboBoxPrivate12rowsInsertedERK11QModelIndexii + 280
        15  libQt6Core.6.6.1.dylib              0x00000001189ca1d4 _Z10doActivateILb0EEvP7QObjectiPPv + 1344
        16  libQt6Core.6.6.1.dylib              0x0000000118891b10 _ZN18QAbstractItemModel13endInsertRowsEv + 200
        17  libQt6Gui.6.6.1.dylib               0x000000011809ecd8 _ZN20QStandardItemPrivate10insertRowsEiiRK5QListIP13QStandardItemE + 660
        18  libQt6Widgets.6.6.1.dylib           0x00000001076161a4 _ZN9QComboBox10insertItemEiRK5QIconRK7QStringRK8QVariant + 372
        19  QtWidgets.abi3.so                   0x0000000106d838f8 _ZN9QComboBox10insertItemEiRK7QStringRK8QVariant + 84
        20  QtWidgets.abi3.so                   0x0000000106d7d734 _ZL25Sbk_QComboBoxFunc_addItemP7_objectS0_S0_ + 812
        21  python3.12                          0x0000000104ad81f4 cfunction_call + 136
        22  python3.12                          0x0000000104a7bed8 _PyObject_MakeTpCall + 316
        23  python3.12                          0x0000000104b97ca4 _PyEval_EvalFrameDefault + 54644
        24  python3.12                          0x0000000104a7c2d4 _PyObject_FastCallDictTstate + 156
        25  python3.12                          0x0000000104b00058 slot_tp_init + 332
        26  python3.12                          0x0000000104af8354 type_call + 496
        27  python3.12                          0x0000000104a7bed8 _PyObject_MakeTpCall + 316
        28  python3.12                          0x0000000104b97ca4 _PyEval_EvalFrameDefault + 54644
        29  python3.12                          0x0000000104a7c37c _PyObject_FastCallDictTstate + 324
        30  python3.12                          0x0000000104b00058 slot_tp_init + 332
        31  python3.12                          0x0000000104af8354 type_call + 496
        32  python3.12                          0x0000000104a7ccc4 _PyObject_Call + 184
        33  python3.12                          0x0000000104b99bb0 _PyEval_EvalFrameDefault + 62592
        34  python3.12                          0x0000000104a7c37c _PyObject_FastCallDictTstate + 324
        35  python3.12                          0x0000000104b00058 slot_tp_init + 332
        36  python3.12                          0x0000000104af8354 type_call + 496
        37  python3.12                          0x0000000104a7bed8 _PyObject_MakeTpCall + 316
        38  python3.12                          0x0000000104b97ca4 _PyEval_EvalFrameDefault + 54644
        39  python3.12                          0x0000000104a7c37c _PyObject_FastCallDictTstate + 324
        40  python3.12                          0x0000000104b00058 slot_tp_init + 332
        41  python3.12                          0x0000000104af8354 type_call + 496
        42  python3.12                          0x0000000104a7bed8 _PyObject_MakeTpCall + 316
        43  python3.12                          0x0000000104b97ca4 _PyEval_EvalFrameDefault + 54644
        44  python3.12                          0x0000000104a80168 method_vectorcall + 372
        45  libpyside6.abi3.6.6.0.dylib         0x0000000105a29e40 _ZN6PySide13SignalManager20callPythonMetaMethodERK11QMetaMethodPPvP7_objectb + 408
        46  libpyside6.abi3.6.6.0.dylib         0x0000000105a29b00 _ZN6PySide13SignalManager20SignalManagerPrivate16qtMethodMetacallEP7QObjectiPPv + 464
        47  libQt6Core.6.6.1.dylib              0x00000001189c9f78 _Z10doActivateILb0EEvP7QObjectiPPv + 740
        48  libQt6Widgets.6.6.1.dylib           0x00000001075fd574 _ZN22QAbstractButtonPrivate11emitClickedEv + 112
        49  libQt6Widgets.6.6.1.dylib           0x00000001075fd260 _ZN22QAbstractButtonPrivate5clickEv + 176
        50  libQt6Widgets.6.6.1.dylib           0x00000001075fed68 _ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent + 188
        51  QtWidgets.abi3.so                   0x0000000106afdfa4 _ZN18QPushButtonWrapper17mouseReleaseEventEP11QMouseEvent + 228
        52  libQt6Widgets.6.6.1.dylib           0x00000001076952f0 _ZN7QWidget5eventEP6QEvent + 132
        53  libQt6Widgets.6.6.1.dylib           0x00000001075769c4 _ZN11QPushButton5eventEP6QEvent + 220
        54  libQt6Widgets.6.6.1.dylib           0x0000000107724df8 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272
        55  libQt6Widgets.6.6.1.dylib           0x0000000107726fa0 _ZN12QApplication6notifyEP7QObjectP6QEvent + 5232
        56  libQt6Core.6.6.1.dylib              0x0000000118a6bda8 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 212
        57  libQt6Widgets.6.6.1.dylib           0x00000001077253f8 _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Ebb + 816
        58  libQt6Widgets.6.6.1.dylib           0x00000001076a2908 _ZN13QWidgetWindow16handleMouseEventEP11QMouseEvent + 1444
        59  libQt6Widgets.6.6.1.dylib           0x00000001076a1b54 _ZN13QWidgetWindow5eventEP6QEvent + 168
        60  libQt6Widgets.6.6.1.dylib           0x0000000107724df8 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272
        61  libQt6Widgets.6.6.1.dylib           0x0000000107725d28 _ZN12QApplication6notifyEP7QObjectP6QEvent + 504
        62  libQt6Core.6.6.1.dylib              0x0000000118a6bda8 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 212
        63  libQt6Gui.6.6.1.dylib               0x0000000118424260 _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 1952
        64  libQt6Gui.6.6.1.dylib               0x0000000118321aa8 _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 408
        65  libqcocoa.dylib                     0x000000012a81d28c _ZN28QCocoaEventDispatcherPrivate26postedEventsSourceCallbackEPv + 436
        66  CoreFoundation                      0x000000018cdd5cfc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
        67  CoreFoundation                      0x000000018cdd5c90 __CFRunLoopDoSource0 + 176
        68  CoreFoundation                      0x000000018cdd5a00 __CFRunLoopDoSources0 + 244
        69  CoreFoundation                      0x000000018cdd45f0 __CFRunLoopRun + 828
        70  CoreFoundation                      0x000000018cdd3c5c CFRunLoopRunSpecific + 608
        71  HIToolbox                           0x0000000197350448 RunCurrentEventLoopInMode + 292
        72  HIToolbox                           0x00000001973500d8 ReceiveNextEventCommon + 220
        73  HIToolbox                           0x000000019734ffdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
        74  AppKit                              0x00000001905aec54 _DPSNextEvent + 660
        75  AppKit                              0x0000000190d84ebc -[NSApplicati
libc++abi: terminating due to uncaught exception of type NSException
zsh: abort      /opt/homebrew/Caskroom/miniforge/base/envs/th_graph_2/bin/python 

Tested environment(s)

  • PyQtGraph version: 0.13.3
  • Qt Python binding: pyside6 - 6.6.0
  • Python version: 3.12.0
  • NumPy version: 1.26.2
  • Operating system: Macos 14.1.1 (Mac Air M2)
  • Installation method: conda

Additional context

I saw that NSExcepetion are specific to mac. Also, the following method doesn't work for me : https://matplotlib.org/3.1.0/faq/osx_framework.html

The problem occure only when I try to open a graph from another window. For example, the following code works well on my mac :

from PySide6.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget, QPushButton
from pyqtgraph import PlotWidget
import sys


class GraphWindow(QWidget):
    def __init__(self, parent=None):
        super(GraphWindow, self).__init__(parent)

        layout = QVBoxLayout(self)

        plot_widget = PlotWidget(self)
        layout.addWidget(plot_widget)

        x = [1, 2, 3, 4, 5]
        y = [10, 20, 15, 25, 30]
        plot_widget.plot(x, y, pen='b')


if __name__ == "__main__":
    app = QApplication(sys.argv)
    main_window = GraphWindow()
    main_window.show()
    sys.exit(app.exec_())
@jordanlv jordanlv changed the title NSRangeException when open PlotWidget from another window NSRangeException when opening a PlotWidget from another window Dec 4, 2023
@jordanlv
Copy link
Author

jordanlv commented Dec 5, 2023

It might be because of my conda install because I'm trying on a basic Python install with pip and everything is working fine.

When I do pip list :

Package            Version
------------------ -------
contourpy          1.2.0
cycler             0.12.1
fonttools          4.46.0
kiwisolver         1.4.5
matplotlib         3.8.2
numpy              1.26.2
packaging          23.2
Pillow             10.1.0
pip                23.3.1
pyparsing          3.1.1
pyqtgraph          0.13.3
PySide6            6.6.0
PySide6-Addons     6.6.0
PySide6-Essentials 6.6.0
python-dateutil    2.8.2
PyYAML             6.0.1
setuptools         68.2.2
shiboken6          6.6.0
six                1.16.0
wheel              0.41.2

And conda list :

# packages in environment at /opt/homebrew/Caskroom/miniforge/base/envs/th_graph_2:
#
# Name                    Version                   Build  Channel
brotli                    1.1.0                hb547adb_1    conda-forge
brotli-bin                1.1.0                hb547adb_1    conda-forge
bzip2                     1.0.8                h93a5062_5    conda-forge
ca-certificates           2023.11.17           hf0a4a13_0    conda-forge
cairo                     1.18.0               hd1e100b_0    conda-forge
certifi                   2023.11.17         pyhd8ed1ab_0    conda-forge
contourpy                 1.2.0           py312h76e736e_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
double-conversion         3.3.0                h13dd4ca_0    conda-forge
expat                     2.5.0                hb7217d7_1    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_1    conda-forge
fontconfig                2.14.2               h82840c6_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.46.0          py312he37b823_0    conda-forge
freetype                  2.12.1               hadb7bae_2    conda-forge
gettext                   0.21.1               h0186832_0    conda-forge
glib                      2.78.1               h9e231a4_0    conda-forge
glib-tools                2.78.1               h9e231a4_0    conda-forge
graphite2                 1.3.13            h9f76cd9_1001    conda-forge
gst-plugins-base          1.22.7               h040e9b9_0    conda-forge
gstreamer                 1.22.7               hd492984_0    conda-forge
harfbuzz                  8.3.0                h8f0ba13_0    conda-forge
icu                       73.2                 hc8870d7_0    conda-forge
kiwisolver                1.4.5           py312h389731b_1    conda-forge
krb5                      1.21.2               h92f50d5_0    conda-forge
lcms2                     2.16                 ha0e7c42_0    conda-forge
lerc                      4.0.0                h9a09cb3_0    conda-forge
libblas                   3.9.0           20_osxarm64_openblas    conda-forge
libbrotlicommon           1.1.0                hb547adb_1    conda-forge
libbrotlidec              1.1.0                hb547adb_1    conda-forge
libbrotlienc              1.1.0                hb547adb_1    conda-forge
libcblas                  3.9.0           20_osxarm64_openblas    conda-forge
libclang                  15.0.7          default_hd209bcb_4    conda-forge
libclang13                15.0.7          default_ha49e599_4    conda-forge
libcxx                    16.0.6               h4653b0c_0    conda-forge
libdeflate                1.19                 hb547adb_0    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libexpat                  2.5.0                hb7217d7_1    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgfortran               5.0.0           13_2_0_hd922786_1    conda-forge
libgfortran5              13.2.0               hf226fd6_1    conda-forge
libglib                   2.78.1               hd9b11f9_0    conda-forge
libiconv                  1.17                 he4db4b2_0    conda-forge
libjpeg-turbo             3.0.0                hb547adb_1    conda-forge
liblapack                 3.9.0           20_osxarm64_openblas    conda-forge
libllvm15                 15.0.7               h504e6bf_3    conda-forge
libogg                    1.3.4                h27ca646_1    conda-forge
libopenblas               0.3.25          openmp_h6c19121_0    conda-forge
libopus                   1.3.1                h27ca646_1    conda-forge
libpng                    1.6.39               h76d750c_0    conda-forge
libpq                     16.1                 hd435d45_2    conda-forge
libsqlite                 3.44.2               h091b4b1_0    conda-forge
libtiff                   4.6.0                ha8a6c65_2    conda-forge
libvorbis                 1.3.7                h9f76cd9_0    conda-forge
libwebp-base              1.3.2                hb547adb_0    conda-forge
libxcb                    1.15                 hf346824_0    conda-forge
libxml2                   2.11.6               h0d0cfa8_0    conda-forge
libxslt                   1.1.37               h1728932_1    conda-forge
libzlib                   1.2.13               h53f4e23_5    conda-forge
llvm-openmp               17.0.6               hcd81f8e_0    conda-forge
matplotlib                3.8.2           py312h1f38498_0    conda-forge
matplotlib-base           3.8.2           py312hba9b818_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mysql-common              8.0.33               hf9e6398_6    conda-forge
mysql-libs                8.0.33               he3dca8b_6    conda-forge
ncurses                   6.4                  h463b476_2    conda-forge
numpy                     1.26.2          py312h5d55045_0    conda-forge
openjpeg                  2.5.0                h4c1507b_3    conda-forge
openssl                   3.2.0                h0d3ecfb_1    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pcre2                     10.40                hb34f9b4_0    conda-forge
pillow                    10.1.0          py312hac22aec_0    conda-forge
pip                       23.3.1             pyhd8ed1ab_0    conda-forge
pixman                    0.42.2               h13dd4ca_0    conda-forge
pthread-stubs             0.4               h27ca646_1001    conda-forge
pyparsing                 3.1.1              pyhd8ed1ab_0    conda-forge
pyqtgraph                 0.13.3             pyhd8ed1ab_0    conda-forge
pyside6                   6.6.0           py312h693e8d1_2    conda-forge
python                    3.12.0          h47c9636_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python.app                1.4             py312h7fd2b6f_3    conda-forge
python_abi                3.12                    4_cp312    conda-forge
qt6-main                  6.6.1                h1aa5e93_2    conda-forge
readline                  8.2                  h92ec313_1    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
tk                        8.6.13               h5083fa2_1    conda-forge
tornado                   6.3.3           py312h02f2b3b_1    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.11               hb547adb_0    conda-forge
xorg-libxdmcp             1.1.3                h27ca646_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
zlib                      1.2.13               h53f4e23_5    conda-forge
zstd                      1.5.5                h4f39d0f_0    conda-forge

@j9ac9k
Copy link
Member

j9ac9k commented Dec 6, 2023

Wonder if it's an issue with pyside6 6.6.0 and qt-main 6.6.1. Either way I don't think this is a PyQtGraph issue (although if you find a workaround that PyQtGraph can implement that is painless, I'd love to see it).

@Kastakin
Copy link

I encountered a similar issue in my application. I do not have a minimal reproducible example but the problem arise, as @jordanlv originally reported, when creating a new window that contains one or more pyqtgraph widgets.

Here is my stack trace:

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
        0   CoreFoundation                      0x0000000187d0c570 __exceptionPreprocess + 176
        1   libobjc.A.dylib                     0x00000001877fdeb4 objc_exception_throw + 60
        2   CoreFoundation                      0x0000000187c82d10 -[__NSCFString hasSuffix:] + 0
        3   libqcocoa.dylib                     0x000000013c29a044 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274796
        4   libqcocoa.dylib                     0x000000013c29a0c8 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274928
        5   libqcocoa.dylib                     0x000000013c298688 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 268208
        6   QtWidgets                           0x000000012ee7d1a8 _ZN9QListView16selectionChangedERK14QItemSelectionS2_ + 204
        7   QtCore                              0x000000011c8cb48c _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3808
        8   QtCore                              0x000000011ca91e44 _ZN19QItemSelectionModel20emitSelectionChangedERK14QItemSelectionS2_ + 216
        9   QtCore                              0x000000011ca91a2c _ZN19QItemSelectionModel6selectERK14QItemSelection6QFlagsINS_13SelectionFlagEE + 636
        10  QtCore                              0x000000011ca9170c _ZN19QItemSelectionModel6selectERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 68
        11  QtCore                              0x000000011ca928cc _ZN19QItemSelectionModel15setCurrentIndexERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 260
        12  QtWidgets                           0x000000012ecdb338 _ZNK9QComboBox5countEv + 828
        13  QtWidgets                           0x000000012ecde8b4 _ZN9QComboBoxC1ER16QComboBoxPrivateP7QWidget + 2412
        14  QtCore                              0x000000011c8cb224 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3192
        15  QtCore                              0x000000011ca7a944 _ZN18QAbstractItemModel13endInsertRowsEv + 200
        16  QtGui                               0x0000000128b237a4 _ZN18QStandardItemModel11itemChangedEP13QStandardItem + 2376
        17  QtWidgets                           0x000000012ece1910 _ZN9QComboBox10insertItemEiRK5QIconRK7QStringRK8QVariant + 368
        18  QtWidgets.abi3.so                   0x00000001384dd3a8 _ZL25Sbk_QComboBoxFunc_addItemP7_objectS0_S0_ + 1032
        19  libpython3.10.dylib                 0x00000001015ecf50 cfunction_call + 84
        20  libpython3.10.dylib                 0x00000001015a60e4 _PyObject_MakeTpCall + 360
        21  libpython3.10.dylib                 0x000000010167ad6c call_function + 548
        22  libpython3.10.dylib                 0x0000000101677408 _PyEval_EvalFrameDefault + 21524
        23  libpython3.10.dylib                 0x0000000101671ed0 _PyEval_Vector + 164
        24  libpython3.10.dylib                 0x00000001015a87a4 method_vectorcall + 176
        25  libpython3.10.dylib                 0x000000010167ad0c call_function + 452
        26  libpython3.10.dylib                 0x0000000101677408 _PyEval_EvalFrameDefault + 21524
        27  libpython3.10.dylib                 0x0000000101671ed0 _PyEval_Vector + 164
        28  libpython3.10.dylib                 0x00000001015a87a4 method_vectorcall + 176
        29  libpython3.10.dylib                 0x000000010167ad0c call_function + 452
        30  libpython3.10.dylib                 0x0000000101677408 _PyEval_EvalFrameDefault + 21524
        31  libpython3.10.dylib                 0x0000000101671ed0 _PyEval_Vector + 164
        32  libpython3.10.dylib                 0x00000001015a5e88 _PyObject_FastCallDictTstate + 140
        33  libpython3.10.dylib                 0x00000001015a69e0 _PyObject_Call_Prepend + 160
        34  libpython3.10.dylib                 0x000000010160f930 slot_tp_init + 104
        35  libpython3.10.dylib                 0x0000000101606cb4 type_call + 372
        36  libpython3.10.dylib                 0x00000001015a60e4 _PyObject_MakeTpCall + 360
        37  libpython3.10.dylib                 0x000000010167ad6c call_function + 548
        38  libpython3.10.dylib                 0x000000010167789c _PyEval_EvalFrameDefault + 22696
        39  libpython3.10.dylib                 0x0000000101671ed0 _PyEval_Vector + 164
        40  libpython3.10.dylib                 0x00000001015a5f0c _PyObject_FastCallDictTstate + 272
        41  libpython3.10.dylib                 0x00000001015a69e0 _PyObject_Call_Prepend + 160
        42  libpython3.10.dylib                 0x000000010160f930 slot_tp_init + 104
        43  libpython3.10.dylib                 0x0000000101606cb4 type_call + 372
        44  libpython3.10.dylib                 0x00000001015a666c _PyObject_Call + 172
        45  libpython3.10.dylib                 0x0000000101677ac4 _PyEval_EvalFrameDefault + 23248
        46  libpython3.10.dylib                 0x0000000101671ed0 _PyEval_Vector + 164
        47  libpython3.10.dylib                 0x00000001015a5f0c _PyObject_FastCallDictTstate + 272
        48  libpython3.10.dylib                 0x00000001015a69e0 _PyObject_Call_Prepend + 160
        49  libpython3.10.dylib                 0x000000010160f930 slot_tp_init + 104
        50  libpython3.10.dylib                 0x0000000101606cb4 type_call + 372
        51  libpython3.10.dylib                 0x00000001015a60e4 _PyObject_MakeTpCall + 360
        52  libpython3.10.dylib                 0x000000010167ad6c call_function + 548
        53  libpython3.10.dylib                 0x0000000101677830 _PyEval_EvalFrameDefault + 22588
        54  libpython3.10.dylib                 0x0000000101671ed0 _PyEval_Vector + 164
        55  libpython3.10.dylib                 0x00000001015a87a4 method_vectorcall + 176
        56  libpython3.10.dylib                 0x000000010167ad0c call_function + 452
        57  libpython3.10.dylib                 0x0000000101677408 _PyEval_EvalFrameDefault + 21524
        58  libpython3.10.dylib                 0x0000000101671ed0 _PyEval_Vector + 164
        59  libpython3.10.dylib                 0x00000001015a5f0c _PyObject_FastCallDictTstate + 272
        60  libpython3.10.dylib                 0x00000001015a69e0 _PyObject_Call_Prepend + 160
        61  libpython3.10.dylib                 0x000000010160f930 slot_tp_init + 104
        62  libpython3.10.dylib                 0x0000000101606cb4 type_call + 372
        63  libpython3.10.dylib                 0x00000001015a60e4 _PyObject_MakeTpCall + 360
        64  libpython3.10.dylib                 0x000000010167ad6c call_function + 548
        65  libpython3.10.dylib                 0x0000000101677830 _PyEval_EvalFrameDefault + 22588
        66  libpython3.10.dylib                 0x0000000101671ed0 _PyEval_Vector + 164
        67  libpython3.10.dylib                 0x00000001015a88b4 method_vectorcall + 448
        68  libpyside6.abi3.6.6.dylib           0x0000000102776750 _ZN6PySide13SignalManager20callPythonMetaMethodERK11QMetaMethodPPvP7_objectb + 536
        69  libpyside6.abi3.6.6.dylib           0x0000000102776318 _ZN6PySide13SignalManager20SignalManagerPrivate16qtMethodMetacallEP7QObjectiPPv + 760
        70  QtCore                              0x000000011c8cb1f4 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3144
        71  QtWidgets                           0x000000012ecc4ec8 _ZNK15QAbstractButton11isCheckableEv + 816
        72  QtWidgets                           0x000000012ecc4d48 _ZNK15QAbstractButton11isCheckableEv + 432
        73  QtWidgets                           0x000000012ecc5c48 _ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent + 172
        74  QtWidgets.abi3.so                   0x000000013825c11c _ZN18QPushButtonWrapper17mouseReleaseEventEP11QMouseEvent + 304
        75  QtWidgets                           0x000000012ec118b8 _ZN7QWidget5eventEP6QEvent + 132
        76  QtWidgets                           0x000000012ed72b24 _ZN11QPushButton5eventEP6QEvent + 204
        77  QtWidgets                           0x000000012ebc8594 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272
        78  QtWidgets                           0x000000012ebca5c0 _ZN12QApplication6notifyEP7QObjectP6QEvent + 5072
        79  QtCore                              0x000000011c881474 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292
        80  QtWidgets                           0x000000012ebc8b34 _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Ebb + 808
        81  QtWidgets                           0x000000012ec26860 _ZNK21QWidgetRepaintManager3rhiEv + 11080
        82  QtWi
libc++abi: terminating due to uncaught exception of type NSException

I guess it is related to PySide6 6.6.x since I tried the same application with version 6.5 and 6.4 and both gave no problem at all.

I only had the possibility to test on an Apple Silicon machine, so I don't know if it is reproducible on other OS/architectures.

@The-Compiler
Copy link

@j9ac9k
Copy link
Member

j9ac9k commented Jan 10, 2024

This might be the same as [QTBUG-120181] Crash on macOS underneath libqcocoa.dylib's _ZN20QCocoaSystemTrayIcon13emitActivatedEv - Qt Bug Tracker from what things sound like.

You know I'm slacking when maintainers of adjacent libraries come in here to help me out ❤️

@The-Compiler
Copy link

Hehe, small world! Just happened to find this after someone asking about it in the PySide group chat.

@jcm93
Copy link

jcm93 commented Feb 29, 2024

Per that Qt issue report, and my independent testing over with OBS, I think this is fixed in Qt 6.6.2.

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

No branches or pull requests

5 participants