Windows mono native dll clash - #2819
Open
lgarczyn wants to merge 3 commits into
Open
Conversation
On Windows with Mono, DllImport("sentry") from Sentry.Unity.Native.dll resolved to the
managed Sentry.dll next to it in Managed/, because Mono probes the calling assembly's own
directory first and Windows filenames are case-insensitive. Native init then failed with
EntryPointNotFoundException and no crashes were ever captured.
CleanupStaleMacOSArtifacts already works around the same shape of clash on case-insensitive
APFS. On Windows the collider is the SDK's own managed assembly and cannot be deleted, so the
native library gets a name of its own instead.
SentryLib is a single const in a single precompiled assembly, so Linux and the macOS
sentry-native backend are renamed to match. The Cocoa Sentry.dylib is dlopened by name and
keeps it, as do PlayStation, Xbox and Switch.
Android's libsentry.so ships from the sentry-android-ndk AAR, so the rename does not apply there and the previous commit would have broken it. Build a fourth variant the same way the consoles do, and swap the base assembly out of the Android player for it.
…ents The Linux branch renamed every .so it found to sentry-native, where Windows and macOS match the exact filename. Make Linux symmetric.
Contributor
|
Hey @lgarczyn, thanks for the contribution. I'll need to figure out a way to make sure this also works with our console support but other than that it mostly looks good to me. |
Author
No worries! We are using our fork for now, hasn't reoccured yet |
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.
Fixed native crash capture on Windows with the Mono scripting backend. The native library is now copied into the player as
sentry-native, soDllImportcan no longer resolve to the managedSentry.dllsitting beside it inManaged/#2818Built with fable, if you have a better idea of how to fix this, I would not complain