【发布时间】:2016-05-03 14:44:07
【问题描述】:
在发布前的测试中,该应用运行良好。我们在几台设备上对其进行了测试,没有发现任何问题。将应用程序上传到 Play 商店后,我们的一位用户开始抱怨应用程序在其中一个选项卡上崩溃。但并不一致,崩溃率约为 90%。
大多数情况下,它会在某个屏幕上崩溃,但有时也会在用户登录后立即崩溃,而无需执行任何操作。
我们使用 Crashlytics 记录崩溃,但没有收到任何报告。
我设法与用户交谈,在他的计算机上设置了一个 Android Studio,并查看了没有过滤器的 logcat。我找不到任何有用的错误。 (我用的是远程桌面,因为他不是技术人员)
我们的一位团队成员将他的手机更新到了 Android 6.0.1,他的手机也开始出现同样的问题。所以我认为它可能是相关的。
我认为它可能是 ANR,但它并没有冻结,并且 traces.txt 文件中没有关于我们的应用程序的任何内容。 我认为这是一个 OutOfMemoryError (或类似的东西),但没有设法证明这一点。 让我的几个使用 Android 6.0.1 的朋友对其进行测试,但他们都遇到了同样的问题,但其中一位使用 Nexus 6P。
我得到的 logcat(没有过滤器):
5-03 16:57:05.397 3985-3985/? I/Keyboard.Facilitator: onFinishInput()
05-03 16:57:05.461 3329-3329/? I/GoogleHttpClient: GMS http client unavailable, use old client
05-03 16:57:05.528 31675-32471/com.helloheart.app.healthplan.debug D/OpenGLRenderer: endAllActiveAnimators on 0xb7b815c8 (RippleDrawable) with handle 0xb8164b78
05-03 16:57:05.537 3329-3351/? I/[@@ ] SyncAdapterProxy: Delagator disabled, using the (deprecated) GData sync adapter
05-03 16:57:05.539 3329-3351/? I/GoogleHttpClient: GMS http client unavailable, use old client
05-03 16:57:05.668 31675-3348/com.helloheart.app.healthplan.debug V/Localytics: Analytics upload complete with status 202
05-03 16:57:05.670 31675-32420/com.helloheart.app.healthplan.debug V/Localytics: Analytics handler received { when=-2ms what=4 obj=[Ljava.lang.Object;@1f24709 target=com.localytics.android.AnalyticsHandler }
05-03 16:57:05.670 31675-32420/com.helloheart.app.healthplan.debug D/Localytics: Analytics handler received MESSAGE_UPLOAD_CALLBACK
05-03 16:57:05.671 31675-32420/com.helloheart.app.healthplan.debug V/Localytics: Delete table: events, selection: _id <= 15, selectionArgs: null
05-03 16:57:05.671 31675-32420/com.helloheart.app.healthplan.debug V/Localytics: Deleted 1 rows
05-03 16:57:05.682 31675-32420/com.helloheart.app.healthplan.debug V/Localytics: android.permission.WAKE_LOCK is missing from the Manifest file.
05-03 16:57:05.763 4365-4365/? V/GLSActivity: AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
05-03 16:57:05.843 3329-3361/? W/System: ClassLoader referenced unknown path: /system/framework/com.qualcomm.qti.GBAHttpAuthentication.jar
05-03 16:57:06.116 31675-32429/com.helloheart.app.healthplan.debug A/art: art/runtime/fault_handler.cc:117] Check failed: !initialized_
05-03 16:57:06.198 2648-3587/? D/ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ id=332, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ], android.os.BinderProxy@c1d350f)
05-03 16:57:06.198 2648-4478/? D/ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ id=333, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ], android.os.BinderProxy@d895a6e)
05-03 16:57:06.198 2648-3421/? I/WindowState: WIN DEATH: Window{3445316 u0 com.helloheart.app.healthplan.debug/com.helloheart.app.DashboardActivity}
05-03 16:57:06.199 2648-3377/? D/ConnectivityService: releasing NetworkRequest NetworkRequest [ id=333, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
05-03 16:57:06.205 259-635/? I/SFPerfTracer: triggers: (rate: 0:85) (10887 sw vsyncs) (0 skipped) (114:439114 vsyncs) (116:497930)
05-03 16:57:06.205 2648-2661/? D/GraphicsStats: Buffer count: 7
05-03 16:57:06.219 322-322/? I/Zygote: Process 31675 exited due to signal (11)
05-03 16:57:06.222 2648-3377/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=333, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
05-03 16:57:06.222 2648-3377/? D/ConnectivityService: releasing NetworkRequest NetworkRequest [ id=332, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
05-03 16:57:06.223 2648-2659/? I/ActivityManager: Process com.helloheart.app.healthplan.debug (pid 31675) has died
05-03 16:57:06.224 2648-2659/? W/ActivityManager: Force removing ActivityRecord{1f6f89a u0 com.helloheart.app.healthplan.debug/com.helloheart.app.DashboardActivity t138}: app died, no saved state
05-03 16:57:06.225 2648-2659/? I/ActivityManager: moveHomeStack, setupComplete:true
这里唯一让我觉得可疑的是:
05-03 16:57:06.116 31675-32429/com.helloheart.app.healthplan.debug A/art: art/runtime/fault_handler.cc:117] Check failed: !initialized_
我正在使用 Realm(安静的旧版本 - 0.81.1)进行本地存储。当某种类型的数据超过 200 条记录时,应用几乎肯定会崩溃。
我不知道如何找出问题所在。知道我可能会错过什么吗?在哪里可以找到踪迹?
【问题讨论】:
-
GoogleHttpClient: GMS http client unavailable, use old client -
这似乎不是来自我们的流程。我正在使用 OkHttp
-
出于兴趣,是什么让您选择了 OkHttp 而不是 Volley?
-
@zgc7009 仅仅是因为我开始使用也是由 Square 维护的 Retrofit。当我们不得不选择时,我没有时间调查,我对此很满意。没有什么让我后悔
-
你能在你的代码中指定删除事件吗?