Open robbiesri opened 2 years ago
Hi Rob, would be great if you could package a sample; please send it to dereckbridie@google.com. If the UE4 AR template is OSS, could you tell me where I could find that as well?
Thanks for the quick response, Dereck!
Here is the template soure: https://github.com/EpicGames/UnrealEngine/tree/4.27/Templates/TP_AEC_HandheldARBP But you'd just sync the repo, build the engine, and then create a new project based on the Handheld AR template.
I'll package up a debug and development build to send to you right meow
Repro'd in the sample you sent; that's strange. It seems that the session update is being called on a thread that isn't EGL compatible. Will try to look into this, but I'm not an expert on this platform.
Hey Dereck, thanks for the word. I think that makes sense, since we call update on the game thread, which typically doesn't have access to the GL context. That being said, I'm surprised that it hasn't fallen over previously. I don't see an explicit requirement that the GL context is accessible in a particular thread, but I do see that ArSession_update
can return an error about a missing GL context (AR_ERROR_MISSING_GL_CONTEXT), which implies the GL context is accessible on the thread that calls ArSession_update
.
Edit: actually, I need to be more sure about which threads do or do not have access to the GL context. I could be incorrect my assumption.
Was there any fix for this?
SPECIFIC ISSUE ENCOUNTERED
We've been getting reports about UE4 hitting failures after pause/resume with ARCore. After pause/resuming 2/3 times, I can see that we can't get an updated camera feed.
After initial debugging of the issue, I found that
ArSession_update
was returningAR_ERROR_FATAL
(ArSession_update docs). At this point, my assumption is that the session is hosed, and the only thing I can do is tear down this session, and create a new session.I can successfully destroy the old session, and create a new sesson. I chug along until I get back to
ArSession_update
and...it fails in the exact same way.I tried to recreate the issue in the SDK samples. I couldn't get the session to fail with pause/resume.
VERSIONS USED
adb shell getprop ro.build.fingerprint
: google/coral/coral:11/RQ2A.210405.005/7181113:user/release-keysSTEPS TO REPRODUCE THE ISSUE
ADDITIONAL COMMENTS
ArSession_resume
succeed beforeArSession_update
fails?ArSession_resume
is indeed successful, which makes the update failure even more confusing. I'd expect resume to fail 😢| 10-12 | 15:21:30.646 | 20330 | 20464 | E | native | at third_party/arcore/ar/core/session.cc:2721 [type.googleapis.com/util.ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] |