Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USentrySubsystem::StartSession() crashes games on the Android platform #694

Open
InterstellarStella opened this issue Nov 21, 2024 · 1 comment · May be fixed by #696
Open

USentrySubsystem::StartSession() crashes games on the Android platform #694

InterstellarStella opened this issue Nov 21, 2024 · 1 comment · May be fixed by #696

Comments

@InterstellarStella
Copy link

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which version of the SDK?
0.21.0

How did you install the package? (Git-URL, Assetstore)
Using the crash reporter

Which version of Unreal?
5.3

Problem

The calling of the method USentrySubsystem::StartSession() crashes games on the Android platform.

Under the hood it calls SentrySubsystemAndroid::StartSession, which calls SentryBridgeJava::startSession. However, io.sentry.unreal.SentryBridgeJava defined here doesn't have such a method.

As a result this check fails:

checkf(Method.Method, TEXT("Unable to find Java Method %s with Signature %s"), UTF8_TO_TCHAR(MethodName), UTF8_TO_TCHAR(FunctionSignature));

in method FSentryJavaObjectWrapper::GetStaticMethod.

USentrySubsystem::StartSession is being called after application started inside AGameMode::StartPlay.

The reason is the same method is being called from here:
https://github.com/getsentry/sentry-unreal/blob/0.21.0/plugin-dev/Source/Sentry/Private/Android/SentrySubsystemAndroid.cpp#L257

But as stated, there is no definition of the method in code here:
https://github.com/getsentry/sentry-unreal/blob/0.21.0/plugin-dev/Source/Sentry/Private/Android/Java/SentryBridgeJava.java

@tustanivsky
Copy link
Collaborator

@InterstellarStella Thank you for bringing it up. This issue was addressed in #696 and the corresponding fix will be available in the next UE plugin release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants