Skip to content

Fix Qt context-menu shutdown crash#18

Merged
dovvnloading merged 1 commit into
mainfrom
codex/ci-context-menu-shutdown-fix
Jul 17, 2026
Merged

Fix Qt context-menu shutdown crash#18
dovvnloading merged 1 commit into
mainfrom
codex/ci-context-menu-shutdown-fix

Conversation

@dovvnloading

Copy link
Copy Markdown
Owner

Summary

  • make the application-wide context-menu filter safe during PySide/Shiboken teardown
  • remove the filter before normal Qt quit and Python interpreter shutdown
  • tolerate late Qt wrapper exceptions without leaking through QObject::eventFilter
  • add regression coverage for type teardown and explicit detachment

Root cause

The previous workflow run completed all 475 tests, then exited with code 1 during interpreter shutdown. PySide dispatched a final application event after the QMenu wrapper type had begun tearing down; isinstance(watched, QMenu) raised SystemError from the global event filter. The follow-up local run also exposed that leaving the filter registered could produce a native Python access violation.

Validation

  • python -m compileall -q graphlink_app — passed
  • python -m pytest -q --basetemp .pytest-tmp-fresh — 477 passed, exit code 0
  • context-menu regression suite — 5 passed
  • minimal Qt menu creation/show/close/interpreter-shutdown smoke — exit code 0
  • git diff --check — passed

@dovvnloading
dovvnloading merged commit b054c25 into main Jul 17, 2026
6 of 7 checks passed
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 this pull request may close these issues.

1 participant