Skip to content

Commit

Permalink
Fix exception handling in event handlers (#8005)
Browse files Browse the repository at this point in the history
  • Loading branch information
kryksyh committed Jan 19, 2025
1 parent 7f75482 commit 5796d98
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/packages/wxwidgets.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
config:
version: 3.1.3.5-audacity
version: 3.1.3.6-audacity
options: |
libtiff/*:lzma=False
libtiff/*:jpeg=libjpeg-turbo
Expand Down
12 changes: 12 additions & 0 deletions recipes/wxwidgets/3.1.3/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ sources:
- https://github.com/audacity/wxWidgets/archive/v3.1.3.1-audacity.tar.gz
- https://artifactory.audacityteam.org/artifactory/mirror/wxwidgets/3.1.3.4-audacity/v3.1.3.1-audacity.tar.gz
sha256: bc62edab621cf0a568ce6716407d5090701c09b57335044f92066b302bb70d1d
3.1.3.6-audacity:
url:
- https://github.com/audacity/wxWidgets/archive/v3.1.3.1-audacity.tar.gz
- https://artifactory.audacityteam.org/artifactory/mirror/wxwidgets/3.1.3.4-audacity/v3.1.3.1-audacity.tar.gz
sha256: bc62edab621cf0a568ce6716407d5090701c09b57335044f92066b302bb70d1d

patches:
3.1.3-audacity:
Expand All @@ -43,3 +48,10 @@ patches:
- patch_file: patches/regex_lib_cocoa_patch.patch
- patch_file: patches/win_arm64.patch
- patch_file: patches/0001-Fix-wxWindowDisabler-does-not-start-a-modal-session.patch
3.1.3.6-audacity:
- patch_file: patches/d9deaa8b76128613a84f3d085eb1e4b05631083a.patch
- patch_file: patches/fix-cocoa-process.diff
- patch_file: patches/regex_lib_cocoa_patch.patch
- patch_file: patches/win_arm64.patch
- patch_file: patches/0001-Fix-wxWindowDisabler-does-not-start-a-modal-session.patch
- patch_file: patches/0001-Don-t-let-exceptions-escape-from-events.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/common/event.cpp b/src/common/event.cpp
index d10275b49b..466b1e5827 100644
--- a/src/common/event.cpp
+++ b/src/common/event.cpp
@@ -1379,7 +1379,10 @@ void wxEvtHandler::ProcessPendingEvents()

wxLEAVE_CRIT_SECT( m_pendingEventsLock );

- ProcessEvent(*event);
+ // We must not let exceptions escape from here, there is no outer exception
+ // handler to catch them and so letting them do it would just terminate the
+ // program.
+ SafelyProcessEvent(*event);

// careful: this object could have been deleted by the event handler
// executed by the above ProcessEvent() call, so we can't access any fields
2 changes: 2 additions & 0 deletions recipes/wxwidgets/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ versions:
folder: "3.1.3"
"3.1.3.5-audacity":
folder: "3.1.3"
"3.1.3.6-audacity":
folder: "3.1.3"

0 comments on commit 5796d98

Please sign in to comment.