Open felislynx-silae opened 5 years ago
The ViewSceneObject went through significant changes. It is not obvious how it takes care of cleanup and I guess it doesn't do it that well based on your report. Looking at it.
Actually I cannot reproduce with the latest master. Modified gvr-renderableview to remove and add new scene objects and views on tapping the screen. Diff attached: diff.txt
Examined the heap after dozens of iterations and it looks ok. The ViewSceneObject has a onRemoveParentObject that looks to be doing the right thing on removing a scene object from the scene graph. As long as the scene object has no more strong references everything gets cleaned up, eventually.
If you are ok with this, you could adb shell am dumpheap
your app and send the dump to m.marinov@samsung.com. I can try to find out what keeps strong references in your case.
Hi, tomorrow i'll do that. I'll try to do it just before crash happens. We made many changes today to achieve LayoutInspector to have only necessary views for specific scene (our internal one, not gvr). But still, GraphicBufferAllocator cannot allocate more memory.
Hi, using latest version of framework, using Android views will cause this exception:
Even though every time i'm removing all child objects from scene and removing everything from layouts, too many of them (views) stays in DecorView. They are visible in LayoutInspector. If you create 10 views, each with simple layout (LinearLayout + TextView) then remove, add again etc. after some time this crash happens. This wasn't happening on 3.2 and 3.3 framework version.
https://drive.google.com/open?id=1dh8o8_2w8yvDeDmyuOt063KLzcNMMkcM <-- layout inspector screenshot