pytest-dev / pytest-dev/pytest-qt
Crash on macOs Sonoma
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 455
- Forks
- 72
- Avg merge
- 12h 26m
- Merged PRs (30d)
- 1
Description
Hi!
We have been using Pytest-qt for a long time now and we did not have any issues until now. However, after upgrading to macOs Sonoma, I get random crashes during test execution, and the last call is always inside pytestqt. My colleagues executing the same tests on macOs Ventura do not get these crashes. I tried adding an autouse fixture to close all open top level windows, but it did not help. I see it closes several windows, but I still get the crash.
I get tracebacks like this:
Fatal Python error: Segmentation fault
Current thread 0x00007ff8502d9fc0 (most recent call first):
File "python3.10/site-packages/pytestqt/plugin.py", line 219 in _process_events
File "python3.10/site-packages/pytestqt/plugin.py", line 202 in pytest_runtest_teardown
File "python3.10/site-packages/pluggy/_callers.py", line 87 in _multicall
File "python3.10/site-packages/pluggy/_manager.py", line 119 in _hookexec
File "python3.10/site-packages/pluggy/_hooks.py", line 501 in __call__
(long stacktrace, all pytest related)
Fatal Python error: Segmentation fault
Current thread 0x00007ff8502d9fc0 (most recent call first):
File "python3.10/site-packages/pytestqt/qt_compat.py", line 162 in exec
File "python3.10/site-packages/pytestqt/wait_signal.py", line 51 in wait
File "python3.10/site-packages/pytestqt/qtbot.py", line 459 in wait
(unit test function)
Any ideas? I can not reproduce the crash with a single testcase, it only crashes when running the whole suite, and not always at the same place.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the intermittent crash by running the full test suite on macOS Sonoma, then inspect the cited entry points: pytestqt/plugin.py (_process_events), qt_compat.py (exec), wait_signal.py (wait), and qtbot.py (wait). Done means identifying the Sonoma-specific cause and preventing the segmentation fault with coverage for the failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, python
- Domain
- desktop, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100