question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Segmentation Fault - wait_signal.wait & _WaitWidgetContextManager.__exit__

See original GitHub issue

Hi,

With python 3.8 I am getting a segmentation fault at some wait functions when using macOS and WIndows. I could not reproduce it with Linux. With Python 3.7 and 2.7 everything works fine for all OS flavors.

Versions:

OS: macOS 10.14.6 Qt: 5.12.5 (conda-forge) PyQt: 5.12.3 (conda-forge) pytest-qt: master pytest: 5.4.1 (conda-forge)

Stacktrace - wait_signal.wait

For this particular test I am using qtbot.waitSignal.

Fatal Python error: Segmentation fault

Current thread 0x00000001098155c0 (most recent call first):
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pytestqt/wait_signal.py", line 51 in wait
  File "/Users/slepicka/sandbox/git-slaclab/pydm-git/pydm/tests/widgets/test_rules.py", line 97 in test_rules_full
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/python.py", line 184 in pytest_pyfunc_call
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/python.py", line 1479 in runtest
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/runner.py", line 135 in pytest_runtest_call
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/runner.py", line 217 in <lambda>
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/runner.py", line 244 in from_call
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/runner.py", line 216 in call_runtest_hook
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/runner.py", line 186 in call_and_report
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/runner.py", line 100 in runtestprotocol
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/runner.py", line 85 in pytest_runtest_protocol
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/main.py", line 272 in pytest_runtestloop
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/main.py", line 247 in _main
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/main.py", line 191 in wrap_session
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/main.py", line 240 in pytest_cmdline_main
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/Users/slepicka/mc/envs/py38/lib/python3.8/site-packages/_pytest/config/__init__.py", line 124 in main
  File "run_tests.py", line 21 in <module>
Segmentation fault: 11

Stacktrace.- _WaitWidgetContextManager.exit

In this case my test was using qtbot.waitExposed.

Current thread 0x000000010f0e35c0 (most recent call first):
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pytestqt/qtbot.py", line 723 in __exit__
  File "/Users/runner/runners/2.165.2/work/1/s/pydm/tests/widgets/test_drawing.py", line 508 in test_pydmdrawingline_draw_item
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/python.py", line 184 in pytest_pyfunc_call
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/python.py", line 1479 in runtest
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/runner.py", line 135 in pytest_runtest_call
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/runner.py", line 217 in <lambda>
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/runner.py", line 244 in from_call
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/runner.py", line 216 in call_runtest_hook
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/runner.py", line 186 in call_and_report
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/runner.py", line 100 in runtestprotocol
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/runner.py", line 85 in pytest_runtest_protocol
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/main.py", line 272 in pytest_runtestloop
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/main.py", line 247 in _main
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/main.py", line 191 in wrap_session
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/main.py", line 240 in pytest_cmdline_main
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/usr/local/miniconda/envs/test-environment-3.8/lib/python3.8/site-packages/_pytest/config/__init__.py", line 124 in main
  File "run_tests.py", line 21 in <module>
/Users/runner/runners/2.165.2/work/_temp/7e5f89e4-e30b-455e-83d2-e2695b1f105e.sh: line 2:   955 Segmentation fault: 11 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
hhslepickacommented, Apr 9, 2020

@The-Compiler I will try to set up a minimal working example that breaks and try to track it down.

0reactions
hhslepickacommented, May 8, 2020

@The-Compiler I had no time to look into this Python 3.8 issue yet. I will close the issue and get back to it in case I can reduce it to a minimal working example. Thank you for your time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found