-
Notifications
You must be signed in to change notification settings - Fork 82
Description
Describe the bug
The following occurs sometimes when running tests (python run_tests.py) with pyside6.
I've not seen this when running outside the tests, so not sure if pytest specific issue of indicative of actual pydm issue.
pydm/tests/widgets/test_waveform_plot.py::test_redrawPlot_without_crosshair Exceptions caught in Qt event loop:
Traceback (most recent call last):
File "/home/nolan_work/repos/pydm/pydm/widgets/shell_command.py", line 839, in
lambda: self._check_process_done(action, original_button_text, original_action_text)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nolan_work/repos/pydm/pydm/widgets/shell_command.py", line 884, in _check_process_done
self.set_object_font_italic(self, False)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/home/nolan_work/repos/pydm/pydm/widgets/shell_command.py", line 909, in set_object_font_italic
font = object.font()
RuntimeError: Internal C++ object (PyDMShellCommand) already deleted.
Exceptions caught in Qt event loop:
Traceback (most recent call last):
File "/home/nolan_work/repos/pydm/pydm/widgets/shell_command.py", line 839, in
lambda: self._check_process_done(action, original_button_text, original_action_text)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nolan_work/repos/pydm/pydm/widgets/shell_command.py", line 884, in _check_process_done
self.set_object_font_italic(self, False)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/home/nolan_work/repos/pydm/pydm/widgets/shell_command.py", line 909, in set_object_font_italic
font = object.font()
RuntimeError: Internal C++ object (PyDMShellCommand) already deleted.
FAILED
Steps to reproduce
- create conda env with python 3.13 and pyside6:
$ conda create -n pydm-environment-pyside python pip numpy scipy six psutil pyqtgraph pydm -c conda-forge
$ source activate pydm-environment
$ pip install PySide6 # or can install with conda in earlier cmd
- edit run_tests.py to not run "test_psp_plugin_component.py" and "test_plugins_import.py"
--- a/run_tests.py
+++ b/run_tests.py
@@ -23,6 +23,8 @@ if __name__ == "__main__":
args.append("--ignore=pydm/tests/data_plugins/test_p4p_plugin_component.py")
args.append("--ignore=pydm/tests/data_plugins/test_psp_plugin_component.py")
+ args.append("--ignore=pydm/tests/data_plugins/test_psp_plugin_component.py")
+ args.append("--ignore=pydm/tests/test_plugins_import.py")
print("pytest arguments: {}".format(args))
sys.exit(pytest.main(args))
-
activate conda pyside6 env and
export QT_API=pyside6
-
run
python run_tests.py
a few times until see the failure. (we should try do something to make this fail every-time for debugging)
Expected behavior
tests never hit this error.
Operating System.
Linux
OS Version Details.
No response
Python Version
Python 3.13.5
Packages Version

Additional context.
- I've seen this happen in other test-cases b4, but atm only get it from PyDMShellCommand
- Not sure if this could happen on pyqt5 also?
- This might be helpful: https://stackoverflow.com/questions/5339062/python-pyside-internal-c-object-already-deleted