We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a view that shows a model:
val engine = rememberEngine() val modelLoader = rememberModelLoader(engine) val materialLoader = rememberMaterialLoader(engine) Scene( modifier = Modifier .fillMaxSize(), engine = engine, modelLoader = modelLoader, view = rememberView(engine) { SceneView.createView(engine).apply { setShadowingEnabled(true) ambientOcclusionOptions.enabled = true } }, childNodes = rememberNodes { add( element = ModelNode( modelInstance = modelLoader.createModelInstance(R.raw.part), scaleToUnits = 0.5f, centerOrigin = Position(x = 0.0f, y = -0.5f, z = 0.0f) ).apply { rotation = Rotation(y = -45f) renderableNodes.forEach { node -> node.setMaterialInstances( materialInstance = materialLoader.createColorInstance(Color.Gray) ) } } ) }, environment = rememberEnvironment(engine) { SceneView.createEnvironment( engine = engine, skybox = Skybox.Builder() .color(colorOf(rgb = 0.2f, a = 1.0f).toFloatArray()) .build(engine) ) } )
When leaving, by default, this will crash with (Note that the crash does not happen is there is no childNode):
2024-04-01 16:47:13.097 32172-32172 Filament E in terminateAndDestroy:929 reason: Object <no-rtti> at 0xb4000077109fb500 doesn't exist (double free?) 2024-04-01 16:47:13.097 32172-32172 Filament E 2024-04-01 16:47:13.108 32172-32172 Sceneview D Engine destroyed
As a workaround, I override the original Scene method to do the following which solves the crash:
onRelease = { sceneView -> sceneView.childNodes = emptyList() sceneView.destroy() }
It appears that there could be a second destroy somewhere that is leading to this crash.
The text was updated successfully, but these errors were encountered:
Reopen if it's still the case in v2.2.0
Sorry, something went wrong.
@ThomasGorisse It still exists in v2.2.0 Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
It is fixed for first 2-3 navigations, but then it crashed again.
No branches or pull requests
I have a view that shows a model:
When leaving, by default, this will crash with (Note that the crash does not happen is there is no childNode):
As a workaround, I override the original Scene method to do the following which solves the crash:
It appears that there could be a second destroy somewhere that is leading to this crash.
The text was updated successfully, but these errors were encountered: