Skip to content

Tests segfault on PyQt 5.12-13 due to wrong QApplication initializations #4934

@markotoplak

Description

@markotoplak

EDIT: This seems to happen everywhere on PyQt 5.12.

On MacOS with pip-installed Orange I get segfaults when running tests on master. Running Orange or individual widgets seems to work well. Python 3.7, PyQt5==5.12.3, PyQtWebEngine==5.12.

python -m unittest Orange.widgets.visualize.tests.test_owscatterplot
Segmentation fault: 11

The segfault is immediate. The segfault started occuring after #4828 was merged.

git checkout c11ec5efada3f52315b3939c66e8896a0d73f3ec  # Merge pull request #4828 from VesnaT/customize_plots
python -m unittest Orange.widgets.visualize.tests.test_owscatterplot
Segmentation fault: 11

If I checkout the master from before that PR was merged (git checkout 2655592eee43145cfca4ff87073046941908a749), tests pass.

The stack trace shows this:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   QtGui                         	0x000000011a479e18 QOpenGLContext::isValid() const + 8
1   QtWebEngineCore               	0x000000011c7c3a52 0x11c748000 + 506450
2   QtWebEngineCore               	0x000000011c7c2405 0x11c748000 + 500741
3   QtWebEngineWidgets            	0x000000011c4a8d4a 0x11c4a1000 + 32074
4   QtWebEngineWidgets            	0x000000011c4ab5e0 QWebEnginePage::QWebEnginePage(QObject*) + 48
5   QtWebEngineWidgets            	0x000000011c4b81d2 QWebEngineView::page() const + 50
6   QtWebEngineWidgets.so         	0x000000011c46808b meth_QWebEngineView_page(_object*, _object*) + 75
7   org.python.python             	0x0000000105882747 _PyMethodDef_RawFastCallKeywords + 235
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug confirmed by the core team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions