Skip to content
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

ARCore Session update ANR #1634

Open
henrikyn opened this issue Dec 20, 2023 · 19 comments
Open

ARCore Session update ANR #1634

henrikyn opened this issue Dec 20, 2023 · 19 comments
Assignees
Labels

Comments

@henrikyn
Copy link

SPECIFIC ISSUE ENCOUNTERED

GLThread 189 (native):tid=99 systid=28587
#00 pc 0x57880 libc.so (syscall + 32) (BuildId: 544bc6c8e3556e98efbc4406b97f6a3e)
#1 pc 0x13d7588 base.apk + 10510336 (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#2 pc 0x13d7634 base.apk + 10510336 (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#3 pc 0x13b2320 base.apk + 10510336 (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#4 pc 0x13d7d88 base.apk + 10510336 (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#5 pc 0x13d8dfc base.apk + 10510336 (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#6 pc 0x13d80d0 base.apk + 10510336 (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#7 pc 0x13d7f14 base.apk + 10510336 (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#8 pc 0x1916814 base.apk + 10510336 (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#9 pc 0x1988768 base.apk + 10510336 (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#10 pc 0x198705c base.apk + 10510336 (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#11 pc 0x1703308 base.apk + 10510336 (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#12 pc 0x111c5ec base.apk (ArSession_update + 148) (BuildId: 62d65095d6fd0cee751f9a1afa29a9d5)
#13 pc 0x12f5c split_config.arm64_v8a.apk (Java_com_google_ar_core_Session_nativeUpdate + 48) (BuildId: 646954f2f13225bb7d9a3675dcfd3e33)
#14 pc 0x355830 libart.so (art_quick_generic_jni_trampoline + 144) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#15 pc 0x5bad10 libart.so (nterp_helper + 5648) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#16 pc 0x194c5de base.vdex (com.google.ar.core.Session.update + 18)
#17 pc 0x5ba654 libart.so (nterp_helper + 3924) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#18 pc 0x2a7c6c2 base.vdex (<package_name>..onDrawFrame + 78)
#19 pc 0x5bb520 libart.so (nterp_helper + 7712) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#20 pc 0x1d206e framework.jar (android.opengl.GLSurfaceView$GLThread.guardedRun + 1102)
#21 pc 0x5ba654 libart.so (nterp_helper + 3924) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#22 pc 0x1d26ac framework.jar (android.opengl.GLSurfaceView$GLThread.run + 52)
#23 pc 0x33eda4 libart.so (art_quick_invoke_stub + 612) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#24 pc 0x239d54 libart.so (art::ArtMethod::Invoke + 144) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#25 pc 0x53a1b0 libart.so (art::Thread::CreateCallback + 1600) (BuildId: 735f12f804f88d62a2cb437261076ff7)
#26 pc 0xc37f4 libc.so (__pthread_start + 208) (BuildId: 544bc6c8e3556e98efbc4406b97f6a3e)
#27 pc 0x5d0c4 libc.so (__start_thread + 68) (BuildId: 544bc6c8e3556e98efbc4406b97f6a3e)
at com.google.ar.core.Session.nativeUpdate(Native method)
at com.google.ar.core.Session.update(Session.java:2)
at <package_name>..onDrawFrame(MyClass.kt:527)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1584)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1283)


main (waiting):tid=1 systid=28264
at java.lang.Object.wait(Native method)
at java.lang.Object.wait(Object.java:386)
at java.lang.Object.wait(Object.java:524)
at android.opengl.GLSurfaceView$GLThread.onPause(GLSurfaceView.java:1744)
at android.opengl.GLSurfaceView.onPause(GLSurfaceView.java:579)
at <package_name>..pauseSession(MyClass.kt:471)
at <package_name>..onPause(MyClass.kt:351)
at androidx.fragment.app.Fragment.performPause(Fragment.java:3325)
at androidx.fragment.app.FragmentStateManager.pause(FragmentStateManager.java:672)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:304)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:114)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1455)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3034)
at androidx.fragment.app.FragmentManager.dispatchPause(FragmentManager.java:2970)
at androidx.fragment.app.FragmentController.dispatchPause(FragmentController.java:296)
at androidx.fragment.app.FragmentActivity.onPause(FragmentActivity.java:284)
at <package_name>.MyActivity.onPause(MyActivity.kt:48)
at android.app.Activity.performPause(Activity.java:9150)
at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1657)
at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:5769)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:5730)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:5682)
at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:48)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:180)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:98)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2685)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8893)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

VERSIONS USED

  • Android Studio: Android Studio Flamingo | 2022.2.1 Patch 1
  • ARCore SDK for Android: 1.39.0
  • Device manufacturer, model, and O/S:
    Google Pixel 7 Pro, 13
    Google Pixel 7a, 14
    Google Pixel Fold, 14
    Motorola Razr Plus 2023, 13
    Samsung Galaxy A54 5G, 13
    Samsung Galaxy S21 FE 5G, 13 and 14
    Samsung Galaxy A53 5G, 13 and 14
    Samsung Galaxy S20 FE 5G, 13
    Samsung Galaxy S23 Ultra, 13 and 14
    Samsung Galaxy S22 Ultra, 14
    Samsung Galaxy S20 5G, 13
    Samsung Galaxy S20 FE 5G, 13
  • Google Play Services for AR (ARCore): 1.39.0 or possibly later
@henrikyn henrikyn added the bug label Dec 20, 2023
@agGitHub
Copy link

Hello,

I have also an ANR that appeared on December 13th 2023 according to Vitals. It seems that the number of occurences increased after an update of my app from ARCore 1.40.0 to 1.41.0.

Here is the ANR log from Vitals:

[split_config.arm64_v8a.apk] Java_com_google_ar_core_Session_nativeUpdate
Input dispatching timed out

Thread 1
"main" tid=1 Waiting
Main thread
at java.lang.Object.wait (Native method)
at java.lang.Object.wait (Object.java:386)
at java.lang.Object.wait (Object.java:524)
at android.opengl.GLSurfaceView$GLThread.onPause (GLSurfaceView.java:1750)
at android.opengl.GLSurfaceView.onPause (GLSurfaceView.java:579)
at <package_name>.HelloArActivity.onPause (HelloArActivity.java:1354)
at android.app.Activity.performPause (Activity.java:8725)
at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1639)
at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:5256)
at android.app.ActivityThread.performPauseActivity (ActivityThread.java:5217)
at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:5169)
at android.app.servertransaction.PauseActivityItem.execute (PauseActivityItem.java:47)
at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2390)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:211)
at android.os.Looper.loop (Looper.java:300)
at android.app.ActivityThread.main (ActivityThread.java:8272)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:954)

Please provide help on this issue.

@OnlyInly
Copy link

We also have a significant increase in the amount of ANR data starting from December 13 (and a new peak on December 20-21).
Perhaps this has something to do with the update to Google Play Services for AR, which was updated at the end of November.

@juneki19
Copy link

As for me deleting ARCore updates and reinstalling same version of ARCore can solve the problem, but it is a temporary solution.
version of Google Play Services for AR (ARCore): 1.41.233110993

@agGitHub
Copy link

Actually, I see that on another AR app I didn't update recently, the ANR rate also increased. So I think that downgrading ARCore in the app will not work. Does not seem linked to https://play.google.com/store/apps/details?id=com.google.ar.core as it has been updated 29 nov. 2023. Please solve this issue which appeared around Dec 13th 2023. Thanks.

@agGitHub
Copy link

What do you mean by "deleting ARCore updates and reinstalling same version of ARCore" ? You mean downgrading the version of ARCore used in your app ? Or downgrading the Google AR Core services app ? Else ? By the way, correct the title of your post, it is "ANR", not "ARN" ; might be useful so that other users can find your question.

@henrikyn henrikyn changed the title ARCore Session update ARN ARCore Session update ANR Dec 22, 2023
@henrikyn
Copy link
Author

Oh, there was a typo. Thank you!

@softlion
Copy link

Same issue here. Only on Samsung devices. On Pixel devices there is no issue. Downgrading the SDK in the app does not work. I did not try downgrading the Google Play Services for AR, will try those solutions.

Crash appears in the OpenGL part of AR, when the session is paused, or after the session is started when the GL surface is used.

I also tried with other AR apps from google play store, even google ones, and they are all crashing too.

@agGitHub
Copy link

It seems that the number of ANR decreases progressively these last hours on my side. I don't understand why...

For me, the ANR happens also on non-Samsung devices according to Vitals.

@forYouDevelop
Copy link

I have the same issue

@softlion
Copy link

Uninstalling and reinstalling "Google Play Service for AR" on the affected devices fixed it !

So it's the content of the cache of this app that is not compatible with it's own previous version, or is being corrupted by that latest version.

@agGitHub
Copy link

Clearing the cache is not enough. Seems that deleteing and reinstalling Google Play for AR works. May Google fixe this for all users ? I still have a high level of crashes and ANR. Thanks.

@forYouDevelop
Copy link

I have 300 thousand active users, and I think reinstalling services will not be a solution for my product

@Appear-Digital
Copy link

The same problem. We have hundreds ANR in our application for the last 3 day

@kirilltupikou
Copy link

I have the same problem with my app

@niuzai0222
Copy link

I have the same problem , it apeared around Dec 13th 2023

@alexbigi
Copy link

alexbigi commented Dec 26, 2023

I have the same problem with my app too.
For my users it's very difficult solution, please downgrade service or fix this trouble

@agGitHub
Copy link

Is it possible to know when this ANR will be solved ? It leads to inacceptable crash rates. Should be a top priority from.Google ARCore team. Thanks.

@devbridie devbridie self-assigned this Dec 28, 2023
@XKoder1990
Copy link

XKoder1990 commented Dec 28, 2023

Hi, I also experienced an ANR in an application with AR version 1.38 with a similar error as in 1.40 AR core , I hope this will somehow help in finding and fixing the error

Crashlytics - Stack trace

Platform: android

Version: 1.0.3 (23)

Issue: ecccbf72452d422c9cee8529a9e4d9a3

Date: Wed Dec 27 2023 15:53:23 GMT+0700 (Индокитай)

main (waiting):tid=1 systid=32756
at java.lang.Object.wait(Native method)
at java.lang.Object.wait(Object.java:386)
at java.lang.Object.wait(Object.java:524)
at android.opengl.GLSurfaceView$GLThread.onWindowResize(GLSurfaceView.java:1800)
at android.opengl.GLSurfaceView.surfaceChanged(GLSurfaceView.java:542)
at android.view.SurfaceView.updateSurface(SurfaceView.java:1277)
at android.view.SurfaceView.setFrame(SurfaceView.java:559)
at android.view.View.layout(View.java:25731)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25737)
at android.view.ViewGroup.layout(ViewGroup.java:6818)
at androidx.drawerlayout.widget.DrawerLayout.onLayout(DrawerLayout.java:1263)
at android.view.View.layout(View.java:25737)
at android.view.ViewGroup.layout(ViewGroup.java:6818)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25737)
at android.view.ViewGroup.layout(ViewGroup.java:6818)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
at android.view.View.layout(View.java:25737)
at android.view.ViewGroup.layout(ViewGroup.java:6818)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25737)
at android.view.ViewGroup.layout(ViewGroup.java:6818)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
at android.view.View.layout(View.java:25737)
at android.view.ViewGroup.layout(ViewGroup.java:6818)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:1075)
at android.view.View.layout(View.java:25737)
at android.view.ViewGroup.layout(ViewGroup.java:6818)

@devbridie
Copy link
Member

A server push has been deployed to address this issue; this should reach affected users in <24 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests