Open woutdenolf opened 1 year ago
The data being send to the dialog in ErrorReporting.handle_exception
looks like this (see below). When I create an exception and replace the data with that dictionary, the dialog pops up as expected. So the segfault does not seem to be caused by the data send to the dialog.
data = OrderedDict(
[
(
"Exception",
"ValueError: Array passed to NMF (input W) is full of zeros.",
),
("Module", "sklearn.decomposition._nmf:67"),
("Version", "3.36.0.dev"),
(
"Environment",
"Python 3.8.5 on Linux 5.4.0-155-generic #172-Ubuntu SMP Fri Jul 7 16:10:02 UTC 2023 x86_64",
),
(
"Installed Packages",
"AnyQt==0.2.0, Automat==22.10.0, Babel==2.10.3, Bottleneck==1.3.5, CacheControl==0.12.11, CoilMQ==1.0.1, Cython==0.29.32, Deprecated==1.2.13, Flask-Cors==3.0.10, Flask-RESTful==0.3.9, Flask-SocketIO==5.2.0, Flask==2.2.5, Glymur==0.12.0, HeapDict==1.0.1, Jinja2==3.1.2, JsonForm==0.0.2, JsonSir==0.0.2, Mako==1.2.3, MarkupSafe==2.1.1, Orange3==3.36.0.dev0+92d84ee, PeakUtils==1.3.4, Pillow==9.2.0, Pint==0.19.2, PyCifRW==4.4.3, PyMca5==5.8.7, PyOpenGL==3.1.6, PyQt5-Qt5==5.15.2, PyQt5-sip==12.11.0, PyQt5==5.15.9, PyQtWebEngine-Qt5==5.15.2, PyQtWebEngine==5.15.6, PyWavelets==1.4.1, PyYAML==5.4.1, Pygments==2.13.0, Python-EasyConfig==0.1.7, QtPy==2.2.1, Resource==0.2.1, SQLAlchemy==1.4.41, SecretStorage==3.3.3, Send2Trash==1.8.0, StrEnum==0.4.9, Twisted==22.10.0, Werkzeug==2.2.3, XlsxWriter==3.0.3, accessible-pygments==0.0.4, alabaster==0.7.12, algopy==0.5.7, amqp==5.1.1, aniso8601==9.0.1, ansiwrap==0.8.4, anyio==3.6.1, apispec==5.2.2, appdirs==1.4.4, argon2-cffi-bindings==21.2.0, argon2-cffi==21.3.0, arrow==1.2.3, asteval==0.9.27, asttokens==2.0.8, async-lru==2.0.3, async-timeout==4.0.2, attrs==23.1.0, backcall==0.2.0, backports.zoneinfo==0.2.1, baycomp==1.0.2, beautifulsoup4==4.11.1, bes==1.0.0rc1, bidict==0.22.0, billiard==4.0.2, black==23.1.0, bleach==5.0.1, blinker==1.6.2, blissdata==0.3.2, blissdemo==0.1.0, blissoda==0.0.1a0, bokeh==2.4.3, cattrs==23.1.2, celery==5.3.0b1, certifi==2022.9.24, cffi==1.15.1, chardet==5.0.0, charset-normalizer==2.1.1, circle-fit==0.1.3, click-didyoumean==0.3.0, click-plugins==1.1.1, click-repl==0.2.0, click==8.1.3, cloudpickle==2.2.0, colorama==0.4.5, commonmark==0.9.1, conda-souschef==2.2.3, constantly==15.1.0, contourpy==1.0.5, cryptography==38.0.1, cycler==0.11.0, darfix==0.10.0, dask-jobqueue==0.8.1, dask==2023.3.1, debugpy==1.6.3, decorator==5.1.1, defusedxml==0.7.1, dictdiffer==0.9.0, dicttoxml==1.7.16, distributed==2023.3.1, distro==1.8.0, docopt==0.6.2, docutils==0.19, easistrain==0.0.6, edna2==1.0.0rc1, edna==1.0rc1, emmet-core==0.38.6, entrypoints==0.4, est==0.5.1, et-xmlfile==1.1.0, ewoks==0.3.0, ewokscore==0.7.0, ewoksdask==0.1.0rc2, ewoksdata==0.2.7, ewoksfluo==0.0.1a0, ewoksid11==0.0.1a0, ewoksid22==0.0.2rc0, ewoksid31==0.0.1a0, ewoksixs==0.0.1a0, ewoksjob==0.2.5, ewoksndreg==0.0.1a1, ewoksorange==0.1.4, ewoksorangetemplate==0.0.1a0, ewoksppf==0.1.3, ewokspr==0.0.1, ewoksserver==0.2.0, ewoksutils==0.1.2, ewoksweb==0.1.0rc4, ewoksxrpd==0.3.0, exceptiongroup==1.1.2, executing==1.1.0, fabio==0.11.0, fastjsonschema==2.16.2, fisx==1.3.0, flake8-nb==0.5.2, flake8==5.0.4, flask-apispec==0.11.4, flower==1.2.0, fonttools==4.37.4, fqdn==1.5.1, fsspec==2022.8.2, future==0.18.2, geometricopticssimulation==0.0.1a0, gevent==22.10.2, graphviz==0.20.1, graypy==2.1.0, grayskull==1.8.3, greenlet==2.0.0, gunicorn==20.1.0, h11==0.12.0, h5grove==1.3.0, h5py==3.7.0, hdf5plugin==3.3.1, httpcore==0.15.0, httpx==0.23.0, humanize==4.4.0, hyperlink==21.0.0, idna==3.4, imageio==2.22.1, imagesize==1.4.1, importlib-metadata==5.0.0, importlib-resources==5.10.0, incremental==22.10.0, iniconfig==1.1.1, ipykernel==6.16.0, ipython-genutils==0.2.0, ipython==8.5.0, ipywidgets==8.0.2, isoduration==20.11.0, isort==5.10.1, itsdangerous==2.1.2, ixstools==2021a0, jaraco.classes==3.2.3, jedi==0.18.1, jeepney==0.8.0, joblib==1.2.0, json-rpc==1.13.0, json5==0.9.10, jsonpickle==2.2.0, jsonpointer==2.4, jsonrpc==3.0.1, jsonschema-specifications==2023.7.1, jsonschema==4.18.4, jupyter-client==8.3.0, jupyter-contrib-core==0.4.2, jupyter-contrib-nbextensions==0.7.0, jupyter-core==5.3.1, jupyter-events==0.6.3, jupyter-highlight-selected-word==0.2.0, jupyter-lsp==2.2.0, jupyter-nbextensions-configurator==0.6.1, jupyter-server-terminals==0.4.4, jupyter-server==2.7.0, jupyterlab-h5web==10.0.0, jupyterlab-pygments==0.2.2, jupyterlab-server==2.23.0, jupyterlab-spellchecker==0.7.3, jupyterlab-widgets==3.0.3, jupyterlab==4.0.3, keyring==23.9.3, keyrings.alt==4.2.0, kiwisolver==1.4.4, kombu==5.3.1, latexcodec==2.0.1, lazy-loader==0.2, livereload==2.6.3, lmfit==1.0.3, locket==1.0.0, lockfile==0.12.2, lxml==4.9.1, markdown-it-py==3.0.0, marshmallow==3.18.0, matplotlib-inline==0.1.6, matplotlib==3.5.0, mccabe==0.7.0, mdit-py-plugins==0.4.0, mdurl==0.1.2, memory-profiler==0.61.0, memray==1.5.0, mirakuru==2.4.2, mistune==2.0.4, mock==5.0.1, mongita==1.1.1, monty==2022.9.9, more-itertools==9.0.0, mp-api==0.29.3, mpmath==1.2.1, msgpack==1.0.4, multianalyzer==0.4.0, mypy-extensions==0.4.3, mypy==0.982, myst-parser==2.0.0, nabu==2022.2.0rc5, nbclassic==0.4.5, nbclient==0.7.0, nbconvert==7.2.10, nbformat==5.6.1, nbsphinx-link==1.3.0, nbsphinx==0.8.9, nest-asyncio==1.5.6, networkx==2.8.7, notebook-shim==0.2.0, notebook==6.5.1, numdifftools==0.9.40, numexpr==2.8.3, numpy==1.24.3, nxtomomill==0.12.3, objgraph==3.5.0, openTSNE==0.6.2, opencv-python==4.3.0.36, openpyxl==3.0.10, orange-canvas-core==0.1.32.dev0, orange-widget-base==4.22.0.dev0+ebc5230, orjson==3.9.2, overrides==7.3.1, packaging==23.0, palettable==3.3.0, pandas==1.4.4, pandoc==2.2, pandocfilters==1.5.0, papermill==2.4.0, parso==0.8.3, partd==1.3.0, pathspec==0.10.1, patsy==0.5.3, pexpect==4.8.0, pickleshare==0.7.5, pid==3.0.4, pip==23.1.2, pkginfo==1.8.3, pkgutil-resolve-name==1.3.10, platformdirs==2.5.2, plotly==5.11.0, pluggy==1.0.0, plumbum==1.8.0, ply==3.11, port-for==0.6.2, processview==1.2.0, progressbar2==4.0.0, prometheus-client==0.15.0, prompt-toolkit==3.0.31, psutil==5.9.2, ptyprocess==0.7.0, pure-eval==0.2.2, py==1.11.0, pyOpenSSL==22.1.0, pyaml==21.10.1, pyasn1-modules==0.2.8, pyasn1==0.4.8, pybtex==0.24.0, pycodestyle==2.9.1, pycparser==2.21, pydantic==1.10.2, pydata-sphinx-theme==0.13.3, pyee==8.2.2, pyfai==2023.5.0, pyflakes==2.5.0, pyicat-plus==0.1.5, pymatgen==2022.10.22, pymca==5.8.7, pymongo==3.10.1, pyopencl==2022.2.3, pyparsing==3.0.9, pyppeteer==1.0.2, pypushflow==0.5.0, pyqtgraph==0.13.1, pyrsistent==0.18.1, pyshortcuts==1.8.2, pyslurmutils==0.0.6b0, pytango==9.4.1, pytest-asyncio==0.20.1, pytest-celery==0.0.0, pytest-mock==3.10.0, pytest-redis==2.4.0, pytest-subtests==0.8.0, pytest-timeout==2.1.0, pytest==7.1.3, python-daemon==3.0.1, python-dateutil==2.8.2, python-engineio==4.3.4, python-json-logger==2.0.7, python-louvain==0.16, python-socketio==5.7.1, python-utils==3.3.3, pytools==2022.1.12, pytz==2022.4, pyzmq==24.0.1, qasync==0.23.0, qtconsole==5.3.2, rapidfuzz==2.11.1, readme-renderer==37.2, recommonmark==0.7.1, redis==4.5.4, referencing==0.30.0, requests-cache==1.1.0, requests-toolbelt==0.10.0, requests==2.28.1, rfc3339-validator==0.1.4, rfc3986-validator==0.1.1, rfc3986==1.5.0, rich==12.6.0, rpds-py==0.9.2, rsyncmanager==0.1.2, ruamel.yaml.clib==0.2.6, ruamel.yaml.jinja2==0.2.7, ruamel.yaml==0.17.21, scikit-image==0.20.0, scikit-learn==1.1.2, scipy==1.9.1, serverfiles==0.3.1, service-identity==21.1.0, setuptools-scm==7.0.5, setuptools==67.8.0, silx==1.1.2, simple-websocket==0.8.1, six==1.16.0, sluurp==0.2.0, sniffio==1.3.0, snowballstemmer==2.2.0, sortedcontainers==2.4.0, soupsieve==2.3.2.post1, spglib==2.0.1, sphinx-autobuild==2021.3.14, sphinx-autodoc-typehints==1.19.4, sphinx-book-theme==1.0.1, sphinx-design==0.4.1, sphinx==6.1.1, sphinxcontrib-applehelp==1.0.2, sphinxcontrib-devhelp==1.0.2, sphinxcontrib-htmlhelp==2.0.0, sphinxcontrib-jsmath==1.0.1, sphinxcontrib-mermaid==0.7.1, sphinxcontrib-qthelp==1.0.3, sphinxcontrib-serializinghtml==1.1.5, srxraylib==1.0.39, stack-data==0.5.1, statsmodels==0.13.2, stdlib-list==0.8.0, stomp.py==8.1.0, stompest==2.3.0, streamline-changer==0.0.1a0, suds==1.1.2, sympy==1.11.1, syned==1.0.27, tabulate==0.9.0, tblib==1.7.0, tenacity==8.1.0, termcolor==2.0.1, terminado==0.16.0, testbook==0.4.2, textwrap3==0.9.2, threadpoolctl==3.1.0, tifffile==2022.10.10, tinycss2==1.1.1, tokenize-rt==5.0.0, toml==0.10.2, tomli-w==1.0.0, tomli==2.0.1, tomoscan==1.1.5, tomwer==1.1.2, toolz==0.12.0, tornado==6.2, tqdm==4.64.1, traitlets==5.9.0, twine==4.0.2, typing-extensions==4.4.0, tzdata==2023.3, uncertainties==3.1.7, uri-template==1.3.0, url-normalize==1.4.3, urllib3==1.26.12, vine==5.0.0, wcwidth==0.2.5, webargs==8.2.0, webcolors==1.13, webencodings==0.5.1, websocket-client==1.4.1, websockets==10.4, wheel==0.38.4, widgetsnbextension==4.0.3, wofry==1.0.31, wrapt==1.14.1, wsproto==1.2.0, xlrd==2.0.1, xmltodict==0.13.0, xraydb==4.4.7, xraylarch==0.9.65, xyzservices==2023.2.0, zict==2.2.0, zipp==3.8.1, zope.event==4.5.0, zope.interface==5.4.0",
),
("Machine ID", "f5978952-26af-4d35-86c5-b44aaa96886f"),
(
"Stack Trace",
'Traceback (most recent call last):\n File "/home/denolf/dev/darfix/src/darfix/gui/operationThread.py", line 32, in run\n self.data = self.func(*self.args, **self.kwargs)\n File "/home/denolf/dev/darfix/src/darfix/core/dataset.py", line 1632, in nica_nmf\n return self.nmf(\n File "/home/denolf/dev/darfix/src/darfix/core/dataset.py", line 1591, in nmf\n W = model.fit_transform(X, W=W, H=H)\n File "/users/denolf/virtualenvs/ewoks/ubuntu_20_04/py38/lib/python3.8/site-packages/sklearn/decomposition/_nmf.py", line 1593, in fit_transform\n W, H, n_iter = self._fit_transform(X, W=W, H=H)\n File "/users/denolf/virtualenvs/ewoks/ubuntu_20_04/py38/lib/python3.8/site-packages/sklearn/decomposition/_nmf.py", line 1652, in _fit_transform\n W, H = self._check_w_h(X, W, H, update_H)\n File "/users/denolf/virtualenvs/ewoks/ubuntu_20_04/py38/lib/python3.8/site-packages/sklearn/decomposition/_nmf.py", line 1518, in _check_w_h\n _check_init(W, (n_samples, self._n_components), "NMF (input W)")\n File "/users/denolf/virtualenvs/ewoks/ubuntu_20_04/py38/lib/python3.8/site-packages/sklearn/decomposition/_nmf.py", line 67, in _check_init\n raise ValueError("Array passed to %s is full of zeros." % whom)\nValueError: Array passed to NMF (input W) is full of zeros.\n',
),
(
"Local Variables",
"OrderedDict([('A',\n array([[0, 0, 0, ..., 0, 0, 0],\n [0, 0, 0, ..., 0, 0, 0],\n [0, 0, 0, ..., 0, 0, 0],\n ...,\n [0, 0, 0, ..., 0, 0, 0],\n [0, 0, 0, ..., 0, 0, 0],\n [0, 0, 0, ..., 0, 0, 0]], dtype=uint16)),\n ('shape', (180, 27)),\n ('whom', 'NMF (input W)')])",
),
]
)
When forcing internet_on
to return False
(so it pops up a QMessageBox
) I also get a segfault.
Orange version
Qt related packages
It also happens in our production environment which has
OS: Ubuntu 20.04
Issue description
I have a particular case where an error in
qt.Thread
causesErrorReporting.handle_exception
to segfault.If I replace this
with this I don't get the segfault (i.e. the exception gets printed and the app keeps running)
This is the traceback I got from the core dump:
Steps to reproduce the behavior
I can upload the workflow and the data (~1GB) somewhere if you want a way to reproduce the problem.