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

CI: core dump errors #478

Closed
kushaldas opened this issue Jul 17, 2019 · 2 comments · Fixed by #479
Closed

CI: core dump errors #478

kushaldas opened this issue Jul 17, 2019 · 2 comments · Fixed by #479

Comments

@kushaldas
Copy link
Contributor

Example: https://circleci.com/gh/freedomofpress/securedrop-client/1163#usage-queue/containers/0

Found the cause below. Will examine more.

$ make test TESTS=tests/test_resources.py 
============================================================== test session starts ===============================================================
platform linux -- Python 3.5.7, pytest-3.9.3, py-1.7.0, pluggy-0.8.0 -- /home/circleci/project/.venv/bin/python
cachedir: .pytest_cache
Using --random-order-bucket=global
Using --random-order-seed=927124

rootdir: /home/circleci/project, inifile:
plugins: random-order-1.0.0, mock-1.10.0, cov-2.6.0
collected 5 items                                                                                                                                

tests/test_resources.py::test_load_css PASSED                                                                                              [ 20%]
tests/test_resources.py::test_path PASSED                                                                                                  [ 40%]
tests/test_resources.py::test_load_svg Aborted (core dumped)
make: *** [Makefile:35: test] Error 134

@kushaldas
Copy link
Contributor Author

>>> def test_load_image():
...     """
...     Check the load_image function returns the expected QPixmap object.
...     """
...     result = securedrop_client.resources.load_image('icon')
...     assert isinstance(result, QPixmap)
... 
>>> test_load_image()
QPixmap: Must construct a QGuiApplication before a QPixmap
Aborted (core dumped)

@kushaldas
Copy link
Contributor Author

I can now replicate locally.

$ make test TESTS=tests/test_resources.py 
============================================================== test session starts ===============================================================
platform linux -- Python 3.5.3, pytest-3.9.3, py-1.7.0, pluggy-0.8.0 -- /home/kdas/code/securedrop-client/.venv/bin/python
cachedir: .pytest_cache
Using --random-order-bucket=global
Using --random-order-seed=204513

rootdir: /home/kdas/code/securedrop-client, inifile:
plugins: random-order-1.0.0, mock-1.10.0, cov-2.6.0
collected 5 items                                                                                                                                

tests/test_resources.py::test_load_icon Aborted
Makefile:35: recipe for target 'test' failed
make: *** [test] Error 134

kushaldas added a commit that referenced this issue Jul 17, 2019
Without a QApplication the code will core dump as menioned
in the issue.
kushaldas added a commit that referenced this issue Jul 17, 2019
Without a QApplication the code will core dump as menioned
in the issue.
kushaldas added a commit that referenced this issue Jul 17, 2019
Without a QApplication the code will core dump as menioned
in the issue.
redshiftzero added a commit that referenced this issue Jul 17, 2019
Fixes #478 creates QApplication for QPixmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant