2

I created an application that use viewrenderable to show Gif in ARCore, but after 90-100 or more the app will crash. How to reuse viewrenderable in ARCore?

       ViewRenderable.builder()
            .setView(fragment.context, gifObject)
            .build()
            .thenAccept { viewRenderable ->
                viewRenderable.view
                ... //create anchor and node
            }

Please help me, I'm using ARCore Android SDK

Nomore 7
  • 41
  • 2

2 Answers2

0

Maybe you create too many anchors,It's very resource intensive,you could create an anchor,an anchorNode as global,then every frame,you detach last anchor,then create a new anchor,and use anchorNode.setAnchor(anchor). have a try,maybe it works.

asla
  • 1
  • I tried to remove all anchor in session but it's not working and I tried to reuse viewrenderable too. It helps a bit, but it just postponed the crash – Nomore 7 Nov 29 '19 at 10:38
0

Incase you haven't found a solution yet, I recommend debugging and find out any rendering related issues using Graphics API Debugger (GAPID). It comes with an interface that lets you view and inspect frame by frame

Oush
  • 3,090
  • 23
  • 22