fix(native): Resolve the WER module relative to handler_path - #2073
Merged
Conversation
The native backend looked for sentry-wer.dll only next to the running executable, while the crashpad backend resolves crashpad_wer.dll against handler_path. An embedder that installs the handler in another directory therefore got a working WER module on crashpad and a silent "Native WER module not found" on native. Prefer handler_path's directory and fall back to the executable directory, so existing layouts keep working. Move the existence check into a helper so the fallback is reached when the handler directory holds no module.
tustanivsky
marked this pull request as ready for review
September 7, 2026 07:41
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2073 +/- ##
==========================================
- Coverage 74.41% 74.31% -0.11%
==========================================
Files 103 103
Lines 26746 26761 +15
Branches 4873 4878 +5
==========================================
- Hits 19903 19887 -16
- Misses 5487 5527 +40
+ Partials 1356 1347 -9 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The native backend looks for
sentry-wer.dllonly next to the running executable. The crashpad backend resolvescrashpad_wer.dllagainsthandler_pathinstead, so an embedder that installs the handler elsewhere gets a working WER module on crashpad and a silent"Native WER module not found"on native.In Unreal Engine plugin runtime dependencies are staged under the plugin's own
Binariesdirectory, never next to the game executable:Since plugin doesn't place the DLL next to the executable WER-delivered crashes (
__fastfail, heap corruption, stack buffer overrun) are lost on every native-backend build.wer_module_path()now trieshandler_path's directory first and falls back to the executable directory, matching crashpad. Existence checking moves intower_path_in_dir()so the fallback is actually reached when the handler directory holds no module.Related items: