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
Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x6f276510 in tid 14600 (SentryAsyncConn) #3367
Comments
@bitsandfoxes is this related to what you're investigating? fyi @supervacuus |
@lemon-li this issue looks similar to one we fixed recently - could you try a newer version of the SDK (>=2.0.1) and see if it still occurs? |
thanks,I'll try the new version 😄 |
@kahest Can you tell me the root cause of the problem and reproduce? Because I tried with other Unity projects and couldn't reproduce the issue, it only happens in 1-2 of my game projects. |
@bitsandfoxes pls chime in if you have more details |
Looking through the logs this seems unrelated to the scope-observer fix. Your Sentry initialization surprises me. I see you're setting the android options within the |
@bitsandfoxes I have made some modifications to the Unity SDK (version 1.8.0). Specifically, I removed both the Editor and Plugins/Android because I do not use Unity's postbuild process to assemble the native layer As for the Android SDK (6.10.0), I modified the AndroidManifest to disable the auto-init feature. |
With the setup you've got going the crashes seem to be fairly reproducible. Could you try disabling/removing the Unity SDK and see if the crashes persist so we can rule out where the issue is originating from? That way we can also rule out something funky going on with cross-SDK communication. |
@bitsandfoxes @kahest work fine when disable unity sdk. I can reproduce it exactly. create a empty unity project and integrate unity sdk. C# Layerpublic class Initializer : MonoBehaviour
{
// notes: It works fine when replacing `BeforeSceneLoad` with `AfterAssembliesLoaded`
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
public static void SetupByBeforeSceneLoad()
{
// Call Java Layer (MainActivity.Setup)
NativeAndroid.Setup();
}
} public class NativeAndroid : MonoBehaviour
{
private const string ANDROID_BRIDGE_OBJ = "AndroidBridge";
private static readonly AndroidJavaClass jBridge = new AndroidJavaClass(
"com.seayoo.test.MainActivity"
);
[RuntimeInitializeOnLoadMethod]
private static void GameOnLoad()
{
GameObject existingObject = GameObject.Find(ANDROID_BRIDGE_OBJ);
if (existingObject == null)
{
var jBridgeObj = new GameObject(ANDROID_BRIDGE_OBJ, typeof(NativeAndroid));
DontDestroyOnLoad(jBridgeObj);
}
}
public static void Setup()
{
jBridge.CallStatic("Setup");
}
} Javapackage com.seayoo.test;
public class MainActivity extends UnityPlayerActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
// From Unity
public static void Setup() {
Sentry.captureMessage("whoami");
}
}; |
Thank you so much for the minimal repro. I'll give this a try and get back to you. |
Version
sentry-java: 6.10.0
sentry-unity: 1.8.0
Here are some relevant details:
I have encountered a problem in my Unity (version 2021.3.34) project that is causing Sentry to crash. The crash mostly occurs on Android 10 and 11, specifically on Xiaomi and Huawei phones during offline startup.
Although I have integrated the Unity SDK in my project, I am not making full use of Unity's own aar. Instead, I have assembled it at the native layer.
In an attempt to resolve this issue, I upgraded the Android SDK from 6.10.0 to 7.1.0. Unfortunately, the problem still persists after the upgrade.
Unity Sentry Options
Java Sentry Options
Steps to Reproduce:
Expected Result
no crash
Actual Result
The application crashes during startup when the device is offline and Sentry is initialized in Android's
Application.onCreate
method. However, if the initialization of Sentry is performed after Unity Sentry starts, the application seems to work fine. Moreover, if the device is connected to the internet, the application starts normally regardless of when Sentry is initialized.some logs
The text was updated successfully, but these errors were encountered: