Skip to content

App ignores keyboard interrupt from terminal #76

Description

@cromachina

Describe the bug
The app cannot be terminated with a keyboard interrupt via terminal.

To Reproduce
Steps to reproduce the behavior:

  1. Open the app from a terminal
  2. Send a keyboard interrupt via the terminal (Ctrl + C)

Expected behavior
The app accepts keyboard interrupt and closes (potentially in a not-very-graceful way, such as with sys.exit() or QCoreApplication.instance().quit(), in the hope that one uses keyboard interrupt to silence a misbehaving app).

System (please complete the following information):

  • OS: NixOS (Linux)
  • Python Version 3.14

Additional context
After hitting keyboard interrupt in the terminal, this error is displayed:

KeyboardInterrupt
^CError calling Python override of QObject::eventFilter(): Traceback (most recent call last):
  File "/nix/store/i6ldivv97db8sxzx9dy93s9v98fw9q4h-python3.14-PyMemoryEditor-2.0.1/lib/python3.14/site-packages/PyMemoryEditor/app/application.py", line 189, in eventFilter
    def eventFilter(self_inner, obj, event):  # noqa: N805

In Qt, if you intercept exceptions, such as to display them to the user in the form of a dialog, then this particular exception needs to be explicitly handled again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions