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
Add CloudAnchorNode #32
Comments
Hi, Your issues sound like an ArCore recent known issue which doesn't release the session until you still have unresolved cloud anchors. Could you please add a breakpoint inside the `ArSceneView.onDestroy()' to first see if it's called at the same time as 'Fragment.onDestroy()' ? @RGregat @grassydragon Does it remind you something and what was the ArCore original issue to check if the 1.30.0 might resolved it. |
Hi! |
@morhenny Could you please update the ARCore dependency to 1.30.0 without touching anything else so we see if it has been solved? |
So I just tried to use 1.30.0, but that doesn't seem to fix it. For that I only changed the I also just realized that I was smart enough to forget to link my sample, so even tho you might not need it, here it is: sample I'll try the detach workaround now and see if that works |
Awesome, calling I appreciate the quick help alot! |
Your code looks good but you could remove all this part : https://github.com/morhenny/sceneview_issue_sample/blob/master/app/src/main/java/de/morhenn/arsamplecode/SecondFragment.kt#L59-L82 and use the Could you create a quick Pull Request which destroys the whole session anchors just before the |
Not sure if that's already everything, but I think just changing the onDestroy() of the ArSession to this should be it:
I am unable to test if this actually fixes the issue though because I cannot locally publish the project at the moment due to some compiler errors. Did I break something on my end, or is the current master branch not able to build? |
My fault sorry about that. I forgot to push some commits. |
No worries, I'll test it tomorrow then, or whenever you get around pushing those, to make sure that it actually does fix it |
I seem to still run into the same or a very similar
A few days ago I had a random other crash of my app, where I don't quite remember how it happened and I never seemed to figure out what exactly caused it, but it also referenced something with
|
I think it is related to this method call: https://developers.google.com/ar/reference/java/com/google/ar/core/Frame#acquireCameraImage() |
Looks like the issue we had with Depth Texture. |
As far as I know I did not enable anything related to depth occlusion, these are my only configuration apart from the default:
I also am not using any of those |
If you are not using depth occlusion, the only place where we acquire images is within the LightEstimation and they are closed after using them: sceneview-android/arsceneview/src/main/kotlin/io/github/sceneview/ar/arcore/LightEstimation.kt Line 445 in c7d482d
Could you just disable light estimation to see if it could come form here? |
Sure, I added Regarding the original issue and that Pull Request you asked about @ThomasGorisse
Since my call of |
Thanks for the PR answer. override fun createAnchor(pose: Pose?): Anchor {
return super.createAnchor(pose)
} The goal is to find the lowest place where anchors are created in order to keep a ref to it. |
I think the problem is that the cloudAnchor are never actually added to the sceneview list, when they are not yet resolved. All the normal anchors that get added to the scene are being detached just fine already onStop, as far as I could tell. When developing with CloudAnchors, you have to implement your own |
Thanks for the explanation. |
Yea I wouldn't mind implementing that, but I will definitely need some help and guidance on how this |
I'm interested in working on the |
I haven't had the original crash after disabling that, but I did have a strange bug today, where the planes and my anchor stopped being tracked all of a sudden. All rendered planes were not displayed anymore and wouldn't reappear until restarting and my objects were directly in front of the camera and moving with it instead of staying anchored. Since the stacktrace included parts about max images from the ImageReader, I figured I'd put it here in case it really is related:
|
That's because ARCore is not returning any more Pose from your Anchor. Apparently because of this: |
I've tried setting `PlaneRenderMode.RENDER_TOP_MOST, but that doesn't really work with my app use-case too well, because I'll always need the ground floor, and with changing that setting, it will quite often just place the 1 plane on top of some other object in my room, like my couch for example. Since this bug only happened this one time to me and it seems to be very rare, I am not super worried about it. Is there an easy way to programmatically reset all tracked planes and start over though, then I could let the user just reset if the wrong plane was found in |
It is an accidentally created bug that was fixed yesterday. Now the first hit plane in the phone camera direction is rendered as it has always been in Sceneform. |
I have been having a very strange issue in my project that occurs after resolving AR Core Cloud Anchors, where I am not entirely sure if this error is related to sceneview, but since I am unable to find the root cause of this error, I figured you might know something or have had a similar problem like this before.
So my app does not crash with any "normal" exceptions or stacktrace, but when navigating away from my AR fragment, the app will just close with the following error message that doesn't really help too much:
While trying to find the cause, I could pinpoint it on callling
session.resolveCloudAnchor()
with an existing anchor ID.Turns out, while AR Core is still trying to resolve a cloud anchor and hasn't found it yet, it will crash when trying to navigate away from the fragment. As soon as the anchor is successfully resolved, navigating works perfectly fine again.
I created a small sample to hopefully reproduce the issue, though for that you will have to use your own Cloud Anchor API Key and an existing cloud anchor ID.
In the sample, tapping on the AR plane will call the
resolveCloudAnchor
, and then simply navigating back will crash the app.Since I really am out of approaches of how to fix this, I was hoping that maybe y'all have some experience with these kind of errors or potentially have an idea how I can solve this issue.
Thanks alot in advance
The text was updated successfully, but these errors were encountered: