GmsCore: Getting crash sometimes on GCM page

Usualy I get this crash when doing something on Google Cloud Messaging page. Don’t know what the reason Maybe @voidstarstar could be so kind to figure out the reason

This is nanolx fork, but I got the same on vanilla

04-01 20:46:48.429 I/ActivityManager(1332): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.google.android.gms/org.microg.gms.ui.SettingsActivityLauncher bnds=[158,523][293,718]} from uid 10145
04-01 20:46:49.985 I/ActivityManager(1332): START u0 {cmp=com.google.android.gms/org.microg.gms.ui.GcmFragment$AsActivity} from uid 10033
04-01 20:46:50.057 V/ResourceType(2524): Too many attribute references, stopped at: 0x01010034
04-01 20:46:50.057 V/ResourceType(2524): Too many attribute references, stopped at: 0x01010034
04-01 20:46:50.325 V/ResourceType(2524): ResTable_typeSpec entry count inconsistent: given 556, previously 557
04-01 20:46:50.326 V/ResourceType(2524): ResTable_typeSpec entry count inconsistent: given 556, previously 557
04-01 20:46:50.326 V/ResourceType(2524): ResTable_typeSpec entry count inconsistent: given 234, previously 262
04-01 20:46:50.326 V/ResourceType(2524): ResTable_typeSpec entry count inconsistent: given 463, previously 467
04-01 20:46:50.326 V/ResourceType(2524): ResTable_typeSpec entry count inconsistent: given 291, previously 557
04-01 20:46:50.326 V/ResourceType(2524): ResTable_typeSpec entry count inconsistent: given 130, previously 528
04-01 20:46:50.349 V/ResourceType(2524): ResTable_typeSpec entry count inconsistent: given 440, previously 485
04-01 20:46:50.350 V/ResourceType(2524): ResTable_typeSpec entry count inconsistent: given 440, previously 485
04-01 20:46:50.351 V/ResourceType(2524): ResTable_typeSpec entry count inconsistent: given 266, previously 273
04-01 20:46:50.351 V/ResourceType(2524): ResTable_typeSpec entry count inconsistent: given 198, previously 681
04-01 20:46:50.390 I/zygote64(2524): Do full code cache collection, code=2014KB, data=1297KB
04-01 20:46:50.399 I/zygote64(2524): After code cache collection, code=1999KB, data=1172KB
04-01 20:46:50.620 I/Choreographer(2524): Skipped 36 frames!  The application may be doing too much work on its main thread.
04-01 20:46:50.687 V/chatty  (1332): uid=1000(system) batterystats-wo expire 6 lines
04-01 20:46:50.749 V/ANDR-PERF-MPCTL(502): Invalid profile no. 0, total profiles 0 only
04-01 20:46:52.187 V/ANDR-PERF-MPCTL(502): Invalid profile no. 0, total profiles 0 only
04-01 20:46:55.404 D/AndroidRuntime(2524): Shutting down VM
04-01 20:46:55.412 E/AndroidRuntime(2524): FATAL EXCEPTION: main
04-01 20:46:55.412 E/AndroidRuntime(2524): Process: com.google.android.gms, PID: 2524
04-01 20:46:55.412 E/AndroidRuntime(2524): java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling android.support.v7.widget.RecyclerView{7b700d2 VFED.V... .F...... 0,0-720,1042 #7f080062 app:id/list}, adapter:com.takisoft.fix.support.v7.preference.PreferenceGroupAdapter@f9785a3, layout:android.support.v7.widget.LinearLayoutManager@d4dc0a0, context:android.view.ContextThemeWrapper@68bf459
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.RecyclerView.assertNotInLayoutOrScroll(Unknown Source:31)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.RecyclerView$RecyclerViewDataObserver.onItemRangeChanged(Unknown Source:3)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.RecyclerView$AdapterDataObservable.notifyItemRangeChanged(Unknown Source:18)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.RecyclerView$Adapter.notifyItemChanged(Unknown Source:3)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.preference.PreferenceGroupAdapter.onPreferenceChange(Unknown Source:9)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.preference.Preference.notifyChanged(Unknown Source:6)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.preference.Preference.setSummary(Unknown Source:18)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at org.microg.gms.ui.GcmFragment$GcmAppPreference.updateViewDetails(Unknown Source:69)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at org.microg.gms.ui.GcmFragment$GcmAppPreference.onBindViewHolder(Unknown Source:0)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.preference.PreferenceGroupAdapter.onBindViewHolder(Unknown Source:4)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.preference.PreferenceGroupAdapter.onBindViewHolder(Unknown Source:2)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(Unknown Source:0)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(Unknown Source:29)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(Unknown Source:40)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(Unknown Source:513)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.GapWorker.prefetchPositionWithDeadline(Unknown Source:14)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.GapWorker.flushTaskWithDeadline(Unknown Source:15)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.GapWorker.flushTasksWithDeadline(Unknown Source:22)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.GapWorker.prefetch(Unknown Source:3)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.support.v7.widget.GapWorker.run(Unknown Source:79)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.os.Handler.handleCallback(Handler.java:790)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.os.Handler.dispatchMessage(Handler.java:99)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.os.Looper.loop(Looper.java:164)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at android.app.ActivityThread.main(ActivityThread.java:6494)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at java.lang.reflect.Method.invoke(Native Method)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
04-01 20:46:55.412 E/AndroidRuntime(2524): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
04-01 20:46:55.423 W/ActivityManager(1332):   Force finishing activity com.google.android.gms/org.microg.gms.ui.GcmFragment$AsActivity
04-01 20:46:55.436 I/ActivityManager(1332): Showing crash dialog for package com.google.android.gms u0
04-01 20:46:55.482 V/chatty  (1332): uid=1000(system) android.ui expire 5 lines
04-01 20:46:55.495 V/chatty  (1332): uid=1000(system) RenderThread expire 4 lines
04-01 20:46:55.927 W/ActivityManager(1332): Activity pause timeout for ActivityRecord{bab6ba3 u0 com.google.android.gms/org.microg.gms.ui.GcmFragment$AsActivity t14625 f}
04-01 20:47:00.483 D/AutofillManagerService(1332): Close system dialogs
04-01 20:47:00.485 W/ActivityManager(1332):   Force finishing activity com.google.android.gms/org.microg.gms.ui.GcmFragment$AsActivity
04-01 20:47:00.508 W/ActivityManager(1332):   Force finishing activity com.google.android.gms/org.microg.gms.ui.SettingsActivityLauncher
04-01 20:47:00.612 I/ActivityManager(1332): Killing 2524:com.google.android.gms/u0a33 (adj 100): crash
04-01 20:47:00.623 I/cr_ChildProcessService(3858): Destroying ChildProcessService pid=3858
04-01 20:47:00.633 W/ActivityManager(1332): Unable to start service Intent { act=com.android.launcher3.WINDOW_OVERLAY dat=app://ru.whatau.cpl:10145?v=7&cv=9 pkg=com.google.android.apps.nexuslauncher } U=0: not found
04-01 20:47:00.633 W/Looper  (1332): Dispatch took 149ms on android.ui, h=Handler (com.android.server.am.AppErrorDialog$1) {af50b48} cb=null msg=7
04-01 20:47:00.636 I//system/bin/webview_zygote64(3858): System.exit called, status: 0
04-01 20:47:00.636 I/AndroidRuntime(3858): VM exiting with result code 0, cleanup skipped.
04-01 20:47:00.651 I/ActivityManager(1332): Killing 3858:com.android.webview:sandboxed_process0/u0a33i0 (adj 0): isolated not needed
04-01 20:47:00.651 I/ActivityManager(1332): Killing 3174:android.ext.services/u0a24 (adj 906): empty #31
04-01 20:47:00.653 W/AppOps  (1332): Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0
04-01 20:47:00.657 E/SurfaceFlinger(514): Failed to find layer (Application Error: com.google.android.gms#0) in layer parent (no-parent).
04-01 20:47:00.707 D/KernelUidCpuTimeReader(1332): Removing uids 99000-99000
04-01 20:47:00.763 D/ConnectivityService(1332): ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ LISTEN id=14, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ], android.os.BinderProxy@deb62bf)
04-01 20:47:00.764 W/ActivityManager(1332): setHasOverlayUi called on unknown pid: 2524
04-01 20:47:01.208 W/OpenGLRenderer(2351): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
04-01 20:47:03.282 V/ANDR-PERF-MPCTL(502): Invalid profile no. 0, total profiles 0 only

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (20 by maintainers)

Most upvoted comments

Does this ghost entry only appear in Android 8.0+?

Yes, this problem appears only on my android 8.1. I didn’n faced ghosts on my test devices with android 6.0 and 7.1. (Unfortunately, I dn’t have a device with android 9 to compare microg behavior in this sutuation , but I can install it if it need to be sure) I have already read the discussion https://github.com/microg/android_packages_apps_GmsCore/pull/744

Thanks for your help again =)

Tell me If I can do something

Does this ghost entry only appear in Android 8.0+? If so, there’s a good chance it’s caused by a change in the API 26+ regarding implicit Intents. One easy way to see if this is happening is to look for GmsGcmUnregisterRcvr in the logcat when you uninstall an app. You will probably see this in the logcat on versions before 8.0 but not see it on versions 8.0 and newer.

See https://github.com/microg/android_packages_apps_GmsCore/pull/744#issuecomment-479196985

Unfortunately I don’t have any 8.0+ devices, so if this is the issue, I can only try to debug or fix this blindly.

Weird, so the same version caused the bug on one device but not on another? I wasn’t able to get a ghost entry to appear on my device either.

At least this bug doesn’t seem super critical to daily usage.

@Vavun Thanks, those steps were very helpful.

For reference, in your last log, I think it appears at time 04-01 23:45:53.793. It sounds like this could be related to the patch in #737, but that can’t be the case if it occurs in a vanilla (official v0.2.6.13280?) build too.

I can now reproduce a crash, but it seems slightly different than yours. I don’t see a ghost app in the GCM page, but I can still get a similar crash as follows:

  • Install an app that uses GCM.
  • Launch it once so it registers.
  • Check app registration status in microG and also tap on it to open the settings page.
  • Uninstall the app.
  • Go back to microG, which should still be on the settings page for the uninstalled app.
  • MicroG instantly crashes.

My bug seems to occur due to this line reading a null reference. I wonder if this is related.

@voidstarstar I GOT IT! Steps to reproduce (bad english) :

  • Install some app that uses GCM or FCM (I took SystemUI tuner as example)
  • Launch it once so it register itself as cloud messages receiver
  • Chech app registration status in microG => GCM
  • Uninstall app
  • Chech app registration status in microG => GCM and you see the ghost of removed app
  • Try to unregister ghost
  • Crash

It doesn’t happen every time you trying unregister ghost

This is screencast and log recorded at the same time Screencast https://youtu.be/2w19UryyWTw Log 2019-04-01-23-44-45.txt