App will be freeze when request HTTP not Modified
Platform: Android Mapbox SDK version:
- implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:5.2.1'
- compile('com.mapbox.mapboxsdk:mapbox-android-sdk:4.0.0-SNAPSHOT@aar') { transitive = true }
Steps to trigger behavior
- Open Mapview in Fragment
- Sometime the network is not stable. The app will be freeze and I cant do anything. Just when swipe cancel app and wait a little bit, it will work again
- I have logcat below:

Expected behavior
How to fix this?
Actual behavior
App freeze
I have been trying to reproduce this with an emulator with different network configurations and I wasn't able to reproduce.
Do you have anymore information that could help reproduce the issue?
- Is this reproducible on demand?
- Which devices are impacted by this?
Hi Tobrun, thanks for your support.
I have a online mode with mapview. And the markers will be shown after caching from the server like this.
I use Glide for caching and converting bitmap.
I'm so sorry but I don't know why the app will be freeze sometime when mapview request HTTP not Modified. I thought it caused by the network not stable.
The devices I used are Asus zenphone 4.5, 5 and Samsung A5.
Not sure if this is related, but i'm currently investigating a possible ANR coming from mapbox, i'm still not certain as they are a pain to track down. But i've been getting some random ANRs after leaving the app open for about 10 minutes or so with pins loaded. I've noticed usually before the ANR hits i do see the D/HTTPRequest: [HTTP] Request with response code = 304: Not Modified message but still can't make a direct connection to gl.
I've also seen this logged via StrictMode
E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'response.body().close()' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:223)
at java.lang.reflect.Method.invoke(Native Method)
at okhttp3.internal.platform.AndroidPlatform$CloseGuard.createAndOpen(AndroidPlatform.java:340)
at okhttp3.internal.platform.AndroidPlatform.getStackTraceForCloseable(AndroidPlatform.java:155)
at okhttp3.RealCall.captureCallStackTrace(RealCall.java:89)
at okhttp3.RealCall.enqueue(RealCall.java:98)
at com.newrelic.agent.android.instrumentation.okhttp3.CallExtension.enqueue(CallExtension.java:58)
at com.mapbox.mapboxsdk.http.HTTPRequest.<init>(HTTPRequest.java:104)
noticed you guys had a todo inside that cancel method inside HTTPRequest, but like i said i'm not sure if this really relates. but just in case.
Hi DejanRistic This is exactly trouble I had. Sometimes ARN comes without do anything in app. I dont know how to resolve it. So if u can fix it, please help me.
D/HTTPRequest: [HTTP] Request with response code = 304: Not Modified
That message shouldn't show anymore with more recent versions of the SDK. We have started to pause the filesource so it doesn't fetch any tiles when the app is backgrounded.
closable strictmode
We currently have disabled that strictmode call from our end in our testapp, we are working to fix that in https://github.com/mapbox/mapbox-gl-native/pull/10083 though we haven't been able to identify the root cause.
@tobrun thanks for the insight. In my case the app wasn't backgrounded but just sort of left on in the foreground. But like I mentioned before i can't say for sure its mapbox related, just in case ill post some additional info here. It seems to be pretty consistent in taking about 10 minutes to happen too.
Mapbox SDK: 5.3.1 (i've seen it happen back to 5.2.0, haven't tried further back). Devices: Seen it on a few different samsungs running 6.0.1 and a google pixel running 8.1.0.
I've been running watchdog to get a stacktrace of whats going on, here are the full result:
01-10 17:57:16.684 10052-10914/.debug D/HTTPRequest: [HTTP] Request with response code = 304: Not Modified
01-10 17:57:16.687 10052-10912/.debug D/HTTPRequest: [HTTP] Request with response code = 304: Not Modified
01-10 17:57:16.719 10052-10917/.debug D/HTTPRequest: [HTTP] Request with response code = 304: Not Modified
01-10 17:57:16.988 10052-10066/.debug I/zygote64: NativeAlloc concurrent copying GC freed 55936(3MB) AllocSpace objects, 25(2MB) LOS objects, 49% free, 12MB/25MB, paused 237us total 114.736ms
01-10 17:57:23.669 10052-10143/.debug E/AndroidRuntime: FATAL EXCEPTION: |ANR-WatchDog|
Process: com.roadtrippers.debug, PID: 10052
com.github.anrwatchdog.ANRError: Application Not Responding
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: main (state = RUNNABLE)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Answers Events Handler1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at io.fabric.sdk.android.services.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:75)
at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:30)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Chrome_ProcessLauncherThread (state = RUNNABLE)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: CleanupReference (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:422)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:188)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:209)
at org.chromium.android_webview.CleanupReference$1.run(CleanupReference.java:3)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: ConnectivityThread (state = RUNNABLE)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Crashlytics Exception Handler1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at io.fabric.sdk.android.services.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:75)
at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:30)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: CycledLeScannerThread (state = RUNNABLE)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
01-10 17:57:23.677 10052-10143/com.roadtrippers.debug E/AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: FinalizerDaemon (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:422)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:188)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:209)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:232)
at java.lang.Daemons$Daemon.run(Daemons.java:103)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: FinalizerWatchdogDaemon (state = TIMED_WAITING)
at java.lang.Thread.sleep(Native Method)
at java.lang.Thread.sleep(Thread.java:373)
at java.lang.Thread.sleep(Thread.java:314)
at java.lang.Daemons$FinalizerWatchdogDaemon.sleepFor(Daemons.java:342)
at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization(Daemons.java:364)
at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal(Daemons.java:281)
at java.lang.Daemons$Daemon.run(Daemons.java:103)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: GAC_Executor[0] (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.google.android.gms.internal.zzbhc.run(Unknown Source:7)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: GAC_Executor[1] (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.google.android.gms.internal.Wd.run(Unknown Source:6)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: GLThread 9752 (state = WAITING)
at java.lang.Object.wait(Native Method)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1495)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: GLThread 9753 (state = WAITING)
at java.lang.Object.wait(Native Method)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1495)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: GoogleApiHandler (state = RUNNABLE)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: NR_AppStateMon-1 (state = TIMED_WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2101)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1132)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1113)
01-10 17:57:23.683 10052-10143/com.roadtrippers.debug E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: OkHttp ConnectionPool (state = TIMED_WAITING)
at java.lang.Object.wait(Native Method)
at okhttp3.ConnectionPool$1.run(ConnectionPool.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: OkHttp Dispatcher (state = TIMED_WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:461)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:937)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1086)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Okio Watchdog (state = WAITING)
at java.lang.Object.wait(Native Method)
at okio.AsyncTimeout.awaitTimeout(AsyncTimeout.java:361)
at okio.AsyncTimeout$Watchdog.run(AsyncTimeout.java:312)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Picasso-Dispatcher (state = RUNNABLE)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Picasso-Idle (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:548)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
at com.squareup.picasso.Utils$PicassoThread.run(Utils.java:411)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Picasso-Stats (state = RUNNABLE)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Picasso-refQueue (state = TIMED_WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:422)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:188)
at com.squareup.picasso.Picasso$CleanupThread.run(Picasso.java:613)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Queue (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:548)
at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.performOperation(DependencyPriorityBlockingQueue.java:197)
01-10 17:57:23.686 10052-10143/com.roadtrippers.debug E/AndroidRuntime: at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.get(DependencyPriorityBlockingQueue.java:236)
at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:65)
at io.fabric.sdk.android.services.concurrency.DependencyPriorityBlockingQueue.take(DependencyPriorityBlockingQueue.java:46)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: RealmFinalizingDaemon (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:422)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:188)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:209)
at io.realm.internal.FinalizerRunnable.run(FinalizerRunnable.java:37)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: ReferenceQueueDaemon (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Daemons$ReferenceQueueDaemon.runInternal(Daemons.java:178)
at java.lang.Daemons$Daemon.run(Daemons.java:103)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: RxCachedWorkerPoolEvictor-1 (state = TIMED_WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2101)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1132)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: RxSchedulerPurge-1 (state = TIMED_WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2101)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1132)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Segment-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
at com.segment.analytics.internal.Utils$AnalyticsThread.run(Utils.java:431)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Segment-2 (state = TIMED_WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2101)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1132)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
at com.segment.analytics.internal.Utils$AnalyticsThread.run(Utils.java:431)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Segment-SegmentDispatcher (state = RUNNABLE)
01-10 17:57:23.690 10052-10143/com.roadtrippers.debug E/AndroidRuntime: at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Segment-Stats (state = RUNNABLE)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: Thread-6 (state = TIMED_WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:422)
at com.comscore.utils.task.TaskThread.a(Unknown Source:5)
at com.comscore.utils.task.TaskThread.d(Unknown Source:12)
at com.comscore.utils.task.TaskThread.run(Unknown Source:50)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: com.mixpanel.android.AnalyticsWorker (state = RUNNABLE)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: com.mixpanel.android.viewcrawler.ViewCrawler (state = RUNNABLE)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-1-thread-1 (state = TIMED_WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2101)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1132)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-14-thread-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-15-thread-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-16-thread-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-17-thread-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-18-thread-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-19-thread-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-2-thread-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1087)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-20-thread-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
01-10 17:57:23.692 10052-10143/com.roadtrippers.debug E/AndroidRuntime: at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
... 4 more
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-4-thread-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1113)
... 4 more
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-7-thread-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1113)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: pool-9-thread-1 (state = WAITING)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.parkFor$(Thread.java:2137)
at sun.misc.Unsafe.park(Unsafe.java:358)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2059)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1113)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: queued-work-looper (state = RUNNABLE)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: |ANR-WatchDog| (state = RUNNABLE)
at dalvik.system.VMStack.getThreadStackTrace(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:1538)
at java.lang.Thread.getAllStackTraces(Thread.java:1588)
at com.github.anrwatchdog.ANRError.New(ANRError.java:72)
at com.github.anrwatchdog.ANRWatchDog.run(ANRWatchDog.java:209)
01-10 17:57:24.797 10052-10102/com.roadtrippers.debug I/CrashlyticsCore: Crashlytics report upload complete: 5A5697A50236-0001-2744-84A0F80808FF
It looks like the main thread is fine waiting for the next message, the part thats making me consider mapbox is the GLSurface threads:
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: GLThread 9752 (state = WAITING)
at java.lang.Object.wait(Native Method)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1495)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)
Caused by: com.github.anrwatchdog.ANRError$$$_Thread: GLThread 9753 (state = WAITING)
at java.lang.Object.wait(Native Method)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1495)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)
Thank you for the adding additional details. My main test device is also a pixel running 8.1.0 and haven't seen that behaviour with the test app. I often have the app open for hours and sometimes full nights and haven't seen any ANRs as above. Are you able to reproduce this issue in a more contained environment (seperate app)?
I haven't been able to yet, Ill post here if I figure out my issue wasn't related or stemming from mapbox. I'm running a few more tests today
@HoanBui1206 I've noticed that i can't get the crash when downgrading to mapbox 5.1.4 🤔 . I'm curious if you'd still experience it if you did the same. Would help to know if we are seeing the same problem.
It seems to happen less when using the satellite style from mapbox too vs our custom style.
@DejanRistic What u mean about the crash when downgrade the mapbox SDK. I used mapbox 5.1.2 before. Almost it's ok. And I noticed the ping HTTP not Modified just happen from 5.2+ and app will be ANR. But like u said, hard to reproduce this and find out the reason why.
Feel free to communicate any more information you have on this issue but for now I'm closing this as non-reproducible/actionable. Thanks again for reaching out and reporting your issue!