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

Android Scene compose crash #589

Open
anastr opened this issue Jan 14, 2025 · 1 comment
Open

Android Scene compose crash #589

anastr opened this issue Jan 14, 2025 · 1 comment

Comments

@anastr
Copy link

anastr commented Jan 14, 2025

Version 2.2.1

Log

Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2a8 in tid 14174 (alth.example.com), pid 14174 (alth.example.com)

A crash happened when hiding the Scene compostable

var visible by remember { mutableStateOf(true) }
if (visible) {
    Scene(...)
}
Button(
    onClick = {
        // Crash happened here
        visible = false
    }
) {
    Text("hide")
}

It won't crash if we navigate back, only on hiding compostables.

@anastr
Copy link
Author

anastr commented Jan 14, 2025

Update

A workaround to fix this issue is to remove all models before calling the destroy() function.

In Scene:

onRelease = { sceneView ->
    sceneView.childNodes = emptyList()
    sceneView.destroy()
}

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

No branches or pull requests

1 participant