Skip to content

SIGSEGV running stubtest against PyQt5-stubs with 0.940+ #14196

Closed
@altendky

Description

@altendky

Bug Report

When running stubtest for PyQt5-stubs we get a SIGSEGV. Bisecting PyPI published versions I see two boundaries. As of 0.940 the SIGSEGV began. As of 0.960 we started getting a few regular hint error messages prior to the SIGSEGV.

To Reproduce

I delete the venv first locally but hesitate to put recursive forced deletes where they could cause others damage.

python3.10 -m venv venv; venv/bin/pip install --upgrade pip; venv/bin/pip install . git+https://github.com/python/mypy@a9c62c5f82f34a923b8117a5394983aefce37b63 PyQt5==5.15.6 PyQt3D==5.15.5 PyQtChart==5.15.5 PyQtDataVisualization==5.15.5 PyQtNetworkAuth==5.15.5 PyQtPurchasing==5.15.5 PyQtWebEngine==5.15.5; venv/bin/stubtest --allowlist stubtest.allowlist --allowlist stubtest.allowlist.to_review --allowlist stubtest.allowlist.linux PyQt5

Expected Behavior

I expect stubtest to run without a SIGSEGV nor any other crash.

Actual Behavior

As mentioned above there are a few regular hint error messages starting with 0.960 but there's still a SIGSEGV.

error: PyQt5.Qt3DAnimation.PYQT_OPENGL_ARRAY is not present at runtime
Stub: at line 38 in file /home/altendky/repos/PyQt5-stubs/venv/lib/python3.10/site-packages/PyQt5-stubs/Qt3DAnimation.pyi
Type alias for Union[typing.Sequence[builtins.int], typing.Sequence[builtins.float], Union[builtins.bytes, builtins.bytearray, builtins.memoryview, PyQt5.sip.array[Any], PyQt5.sip.voidptr], None]
Runtime:
MISSING

error: PyQt5.Qt3DAnimation.PYQT_OPENGL_BOUND_ARRAY is not present at runtime
Stub: at line 40 in file /home/altendky/repos/PyQt5-stubs/venv/lib/python3.10/site-packages/PyQt5-stubs/Qt3DAnimation.pyi
Type alias for Union[typing.Sequence[builtins.int], typing.Sequence[builtins.float], Union[builtins.bytes, builtins.bytearray, builtins.memoryview, PyQt5.sip.array[Any], PyQt5.sip.voidptr], builtins.int, None]
Runtime:
MISSING

error: PyQt5.Qt3DAnimation.PYQT_SLOT is not present at runtime
Stub: at line 35 in file /home/altendky/repos/PyQt5-stubs/venv/lib/python3.10/site-packages/PyQt5-stubs/Qt3DAnimation.pyi
Type alias for Union[def (*Any, **Any), PyQt5.QtCore.pyqtBoundSignal]
Runtime:
MISSING

error: PyQt5.Qt3DAnimation.QAbstractAnimation is inconsistent, metaclass differs
Stub: at line 44 in file /home/altendky/repos/PyQt5-stubs/venv/lib/python3.10/site-packages/PyQt5-stubs/Qt3DAnimation.pyi
N/A
Runtime:
<class 'sip.wrappertype'>

fish: “venv/bin/stubtest --allowlist s…” terminated by signal SIGSEGV (Address boundary error)

Your Environment

  • Mypy version used: 0.960 through 0.991 and a9c62c5
  • Mypy command-line flags: stubtest --allowlist stubtest.allowlist --allowlist stubtest.allowlist.to_review --allowlist stubtest.allowlist.linux PyQt5
  • Mypy configuration options from mypy.ini (and other config files):
    https://github.com/python-qt-tools/PyQt5-stubs/blob/15fbb1ab6f23259fba7ceca3311e322fcf397000/setup.cfg
    [mypy]
    incremental = False
    
    strict = True
    warn_unreachable = True
    ignore_missing_imports = False
    
  • Python version used:
    locally tested with Python 3.10.8 (main, Oct 15 2022, 17:48:51) [GCC 9.4.0]
    observed in CI for 3.7 through 3.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions