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

Crash after clicking 'Extract more rings' during calibration with pyFAI-calib2 #2047

Closed
EdgarGF93 opened this issue Jan 19, 2024 · 8 comments · Fixed by #2064
Closed

Crash after clicking 'Extract more rings' during calibration with pyFAI-calib2 #2047

EdgarGF93 opened this issue Jan 19, 2024 · 8 comments · Fixed by #2064
Assignees
Labels
bug Serious issue, to be addressed in priority !

Comments

@EdgarGF93
Copy link
Collaborator

(gdb) bt
#0  0x000000000060aad2 in partial_vectorcall (pto=0x7fff85077150, args=0x7fff8c43c868, nargsf=1, kwnames=0x0)
    at /usr/local/src/conda/python-3.11.5/Modules/_functoolsmodule.c:208
#1  0x00007fff9dc64c63 in PyQtSlot::call(_object*, _object*) const ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/QtCore.abi3.so
#2  0x00007fff9dc650e8 in PyQtSlot::invoke(void**, _object*, void*, bool) const ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/QtCore.abi3.so
#3  0x00007fff9dc6538e in PyQtSlotProxy::unislot(void**) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/QtCore.abi3.so
#4  0x00007fff9dc65faf in PyQtSlotProxy::qt_metacall(QMetaObject::Call, int, void**) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/QtCore.abi3.so
#5  0x00007fff9d53cf97 in void doActivate<false>(QObject*, int, void**) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
#6  0x00007fff9d53650f in QObject::destroyed(QObject*) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
#7  0x00007fff9d53b082 in QObject::~QObject() ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
#8  0x00007fff9dbac259 in sipQAbstractItemModel::~sipQAbstractItemModel() ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/QtCore.abi3.so
#9  0x00007fff9d5307c3 in QObjectPrivate::deleteChildren() ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
#10 0x00007fff992be297 in QWidget::~QWidget() ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Widgets.so.5
#11 0x00007fff99b76859 in sipQDialog::~sipQDialog() ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/QtWidgets.abi3.so
#12 0x00007fff9d533dcd in QObject::event(QEvent*) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
#13 0x00007fff992c2aa3 in QWidget::event(QEvent*) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Widgets.so.5
#14 0x00007fff99c08d63 in sipQDialog::event(QEvent*) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/QtWidgets.abi3.so
#15 0x00007fff9928443c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Widgets.so.5
#16 0x00007fff9928af20 in QApplication::notify(QObject*, QEvent*) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Widgets.so.5
#17 0x00007fff99d0f03e in sipQApplication::notify(QObject*, QEvent*) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/QtWidgets.abi3.so
#18 0x00007fff9d504808 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
#19 0x00007fff9d507882 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
#20 0x00007fff9d560b33 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
#21 0x00007fff9af3c17d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007fff9af3c400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fff9af3c4a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007fff9d5601cc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
#25 0x00007fff9d50321a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
#26 0x00007fff9d50c1d3 in QCoreApplication::exec() ()
   from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
#27 0x00007fff99b7df22 in meth_QApplication_exec_ () from /home/edgar1993a/py311/lib/python3.11/site-packages/PyQt5/QtWidgets.abi3.so
#28 0x0000000000525f30 in cfunction_call (func=0x7fff852c8450, args=<optimized out>, kwargs=<optimized out>)
--Type <RET> for more, q to quit, c to continue without paging--
@EdgarGF93 EdgarGF93 self-assigned this Jan 19, 2024
@EdgarGF93
Copy link
Collaborator Author

The GUI does not crash if you pick a ring, click on Next to perform a first fitting, and then come back to Extract Rings.
Extract rings should be available only after the first fitting

@EdgarGF93 EdgarGF93 added the bug Serious issue, to be addressed in priority ! label Jan 19, 2024
@EdgarGF93
Copy link
Collaborator Author

EdgarGF93 commented Jan 23, 2024

Actually, the GUI crash (after Extract More Rings) with:

  • Environments if the absolute path to the python has an empty space
  • Python 3.10, 3.11 and 3.12

The GUI does not crash with python 3.7, 3.8, 3.9 and no empty spaces in the absolute path

@EdgarGF93
Copy link
Collaborator Author

EdgarGF93 commented Jan 24, 2024

With the current developer version of pyFAI, it crashes (tested with python 3.11) right after clicking the first 'Next' button and sometimes after uploading the calibration file.
Output in debug mode:

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x000055555588e0b6 in partial_vectorcall (pto=0x7fff7c760400, args=0x7fff75b45f48, nargsf=1, kwnames=0x0)
    at ./Modules/_functoolsmodule.c:208
208	    if (PyDict_GET_SIZE(pto->kw)) {

Correction: it crashes only if pyopencl is not installed
Some observations:

  • With python 3.9, it doesnt matter if pyopencl is installed or not, it works all the time
  • With python 3.10, it doesn't work at all
  • With python 3.11, it works only if pyopencl is installed

@kif
Copy link
Member

kif commented Jan 25, 2024

Also reported by Oliver:

The application is crashing when you click on extract, or the next step. I have error no messages.
The configurations are a Windows 10 computer freshly installed, anaconda 2023.09.4 freshly installed, python 3.11, pyFAI 2024.

@kif
Copy link
Member

kif commented Jan 26, 2024

We did not check what the other threads were doing ... maybe this seg-fault was caused by another thread, the geometry optimization and all processing occurs in the background

@EdgarGF93
Copy link
Collaborator Author

Useful update: the GUI crashes only if the calibration file is imported through the FileDialog ("Select a file"). If the file is imported through the command line or using drag&drop, the GUI works fine on every python version.

@kif
Copy link
Member

kif commented Jan 26, 2024

The regression was introduced with Matplotlib 3.5.0, version 3.4.3 is apparently immune to this bug.

@kif
Copy link
Member

kif commented Jan 29, 2024

Nop ...
The bug comes from silx, (functtool_partial pattern .... see hdf5TreeModel in silx)

For now, there is just a work around in pyFAI.

@kif kif closed this as completed in #2064 Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Serious issue, to be addressed in priority !
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants