Skip to content

The window_filter event handler might receive an invalid pid#3814

Merged
cmsj merged 1 commit into
Hammerspoon:masterfrom
dmgerman:filter-window-invalid-pid
Nov 18, 2025
Merged

The window_filter event handler might receive an invalid pid#3814
cmsj merged 1 commit into
Hammerspoon:masterfrom
dmgerman:filter-window-invalid-pid

Conversation

@dmgerman

@dmgerman dmgerman commented Aug 13, 2025

Copy link
Copy Markdown

Sometimes an app generates an event just before dying/terminating

thus the window_filter event handler tries to retrieve the app of the PID but it is no longer available. This patch avoids a crash due to not finding the app for the given pid

Sometimes an app generates an event just before dying/terminating

thus the event handler tries to retrieve the app of the PID
but it is no longer available. This patch avoids a crash
due to not finding the app for the given pid

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain a valid label. Please add one of the following labels: ['pr-fix', 'pr-change', 'pr-feature', 'pr-maintenance']

@codecov

codecov Bot commented Aug 13, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.34%. Comparing base (0c7107f) to head (239ac1f).
⚠️ Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3814      +/-   ##
==========================================
- Coverage   27.41%   27.34%   -0.07%     
==========================================
  Files         188      188              
  Lines       51445    51445              
==========================================
- Hits        14103    14069      -34     
- Misses      37342    37376      +34     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dmgerman dmgerman changed the title The event handler might receive an invalid pid The window_filter event handler might receive an invalid pid Aug 13, 2025
@cmsj cmsj added the pr-fix Pull Request implementing a bug fix label Nov 18, 2025
@cmsj cmsj merged commit 5fcc817 into Hammerspoon:master Nov 18, 2025
3 of 5 checks passed
@cmsj

cmsj commented Nov 18, 2025

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-fix Pull Request implementing a bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants