sceneview-android: ViewNode - Rendering problem for the second time

val viewNode = ViewNode(
            engine = sceneView.engine,
            modelLoader = sceneView.modelLoader,
            viewAttachmentManager = viewAttachmentManager,
        ).apply {
            disable()
            scale = Scale(-5f, 5f, 1f)
        }

        viewNode
            .loadView(
                context = this@ARActivity,
                layoutResId = R.layout.tracker_ar_view,
                onLoaded = { _, view ->
            
                    anchorNode.addChildNode(viewNode)

                    // Remove duplicates
                    val index = sceneView.childNodes.indexOfFirst { it.name == DESTINATION_NODE_NAME }
                    if (index != -1) sceneView.removeChildNode(sceneView.childNodes[index])

                    sceneView.addChildNode(anchorNode)
                    destinationNode = anchorNode
                },
                onError = {
                 
                }
            )

I have this code for rendering XML view, when I enter this screen for the first time everything works ok, however after the 2nd time I enter the screen I get an error.

Group 20764

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16

Most upvoted comments

I have the same issue.Any news?

hi @rawello , I use compose and happen error when navigate popBack, for onRelease callback, should I download source and modify?

hi, yeap, you should download source, add it to your project as module and implement local copy with fix to your main project(via build.gradle and android studio UI - project structure you can add module)

sorry i havent enough time for PR that(

problem solved, thanks

@konrad-thoc if its will work, notify me, i will to PR

@rawello are you able to tell if it can be fixed?

Hi man, I have deadlines at work, last time when I tested this code, I was unable to reproduce the error, a little later I will try to solve your problem if this will still relevant, I really want to help and do PR but so much work

@rawello are you able to tell if it can be fixed?

hi, I tried to reproduce your error, created an application using ARSceneView, restarted the scene many times, but apart from the Filament double free error, I got nothing else. Can I ask you to provide me with more data to reproduce the error?