Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Mapbox crashing after some interval of time #1059

Closed
TankJK opened this issue May 13, 2019 · 13 comments
Closed

Mapbox crashing after some interval of time #1059

TankJK opened this issue May 13, 2019 · 13 comments

Comments

@TankJK
Copy link

TankJK commented May 13, 2019

My application is using com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.37.0 for displaying map and markers (it will also have routes and navigation but still not implemented).

Application is also using com.squareup.okhttp3:okhttp:3.14.1 and
com.squareup.okhttp3:logging-interceptor:3.14.1

Application is displaying the markers using SymbolManager as described in https://github.com/mapbox/mapbox-android-demo/blob/master/MapboxAndroidDemo/src/main/java/com/mapbox/mapboxandroiddemo/examples/plugins/SymbolListenerActivity.java

If application is kept open for certain number of time (30 secs - 150 secs), it crashes automatically without doing anything on it. Please see the attached logs with this issue.

Your help is appreciated.

Thanking you in advance,
TankJK

crash.txt

@TankJK
Copy link
Author

TankJK commented May 13, 2019

Sorry I forgot to add in previous crash report. It has following logs also:

05-13 17:12:05.866 24970-25067/<my_application>.debug A/art: art/runtime/indirect_reference_table.cc:116] JNI ERROR (app bug): weak global reference table overflow (max=51200)
art/runtime/indirect_reference_table.cc:116] weak global reference table dump:
art/runtime/indirect_reference_table.cc:116] Last 10 entries (of 51200):
art/runtime/indirect_reference_table.cc:116] 51199: 0x12e315e0 java.lang.Thread
art/runtime/indirect_reference_table.cc:116] 51198: 0x12e31670 java.lang.Thread
art/runtime/indirect_reference_table.cc:116] 51197: 0x12e31700 java.lang.Thread
art/runtime/indirect_reference_table.cc:116] 51196: 0x12e31790 java.lang.Thread
art/runtime/indirect_reference_table.cc:116] 51195: 0x12e31820 java.lang.Thread
art/runtime/indirect_reference_table.cc:116] 51194: 0x12e318b0 java.lang.Thread
art/runtime/indirect_reference_table.cc:116] 51193: 0x12e31940 java.lang.Thread
art/runtime/indirect_reference_table.cc:116] 51192: 0x12e319d0 java.lang.Thread
art/runtime/indirect_reference_table.cc:116] 51191: 0x12e31a60 java.lang.Thread
art/runtime/indirect_reference_table.cc:116] 51190: 0x12e31af0 java.lang.Thread
art/runtime/indirect_reference_table.cc:116] Summary:
art/runtime/indirect_reference_table.cc:116] 8 of io.reactivex.internal.schedulers.RxThreadFactory$RxCustomThread (8 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of android.opengl.GLSurfaceView$GLThread
art/runtime/indirect_reference_table.cc:116] 1 of android.opengl.GLSurfaceView
05-13 17:12:05.867 24970-25067/<my_application>.debug A/art: art/runtime/indirect_reference_table.cc:116] 1 of com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1
art/runtime/indirect_reference_table.cc:116] 1 of okio.AsyncTimeout$Watchdog
art/runtime/indirect_reference_table.cc:116] 3 of byte[] (1440 elements) (3 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (4900 elements)
art/runtime/indirect_reference_table.cc:116] 3 of byte[] (5016 elements) (3 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (6912 elements)
art/runtime/indirect_reference_table.cc:116] 5 of byte[] (9216 elements) (5 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (9804 elements)
art/runtime/indirect_reference_table.cc:116] 4 of byte[] (10080 elements) (4 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (10440 elements)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (14400 elements)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (14880 elements)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (15300 elements)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (16740 elements)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (17280 elements)
art/runtime/indirect_reference_table.cc:116] 2 of byte[] (20700 elements) (2 unique instances)
art/runtime/indirect_reference_table.cc:116] 9 of byte[] (20736 elements) (9 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (24192 elements)
art/runtime/indirect_reference_table.cc:116] 27 of byte[] (26244 elements) (27 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (27216 elements)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (32256 elements)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (32448 elements)
art/runtime/indirect_reference_table.cc:116] 4 of byte[] (34560 elements) (4 unique instances)
art/runtime/indirect_reference_table.cc:116] 2 of byte[] (34848 elements) (2 unique instances)
art/runtime/indirect_reference_table.cc:116] 2 of byte[] (35344 elements) (2 unique instances)
art/runtime/indirect_reference_table.cc:116] 18 of byte[] (36864 elements) (18 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (42336 elements)
art/runtime/indirect_reference_table.cc:116] 3 of byte[] (46656 elements) (3 unique instances)
art/runtime/indirect_reference_table.cc:116] 2 of byte[] (47808 elements) (2 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (49284 elements)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (63504 elements)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (64260 elements)
art/runtime/indirect_reference_table.cc:116] 3 of byte[] (79488 elements) (3 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (82368 elements)
art/runtime/indirect_reference_table.cc:116] 5 of byte[] (82944 elements) (5 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (90000 elements)
art/runtime/indirect_reference_table.cc:116] 4 of byte[] (108000 elements) (4 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (112896 elements)
art/runtime/indirect_reference_table.cc:116] 5 of byte[] (270400 elements) (5 unique instances)
art/runtime/indirect_reference_table.cc:116] 2 of byte[] (338688 elements) (2 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (562464 elements)
art/runtime/indirect_reference_table.cc:116] 1 of byte[] (1749600 elements)
art/runtime/indirect_reference_table.cc:116] 622 of java.lang.Thread (622 unique instances)
art/runtime/indirect_reference_table.cc:116] 7820 of java.lang.Class (7820 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of java.lang.ThreadGroup
art/runtime/indirect_reference_table.cc:116] 27 of java.lang.DexCache (27 unique instances)
art/runtime/indirect_reference_table.cc:116] 6 of dalvik.system.PathClassLoader (1 unique instances)
art/runtime/indirect_reference_table.cc:116] 1 of com.android.okhttp.okio.AsyncTimeout$Watchdog
art/runtime/indirect_reference_table.cc:116] 1 of android.net.ConnectivityThread
art/runtime/indirect_reference_table.cc:116] 7 of android.os.HandlerThread (7 unique instances)
art/runtime/indirect_reference_table.cc:116] 307 of android.view.RenderNode (307 unique instances)
05-13 17:12:05.868 24970-25067/<my_application>.debug A/art: art/runtime/indirect_reference_table.cc:116]

@TankJK
Copy link
Author

TankJK commented May 13, 2019

Also, getting continuous message:
05-13 17:48:48.298 548-548/? D/SFPerfTracer: layers: (5:10) (StatusBar (0xb04ecc00): 1:63575) (com.android.systemui.ImageWallpaper (0xb04f5400): 0:42623)* (DimLayerController/Stack=0 (0xb04ea400): 0:4202)* (Sprite (0xb04c0000): 0:26)* (NavigationBar (0xb048bc00): 0:1488) (animation background stackId=1 (0xb04e9000): 0:6)* (<my_application>.debug/<my_application_package>.presentation.ui.home.HomeActivity (0xb04c3c00): 0:713) (SurfaceView - <my_application>.debug/<my_application_package>.presentation.ui.home.HomeActivity (0xb04eb800): 148:4791) (SurfaceView - <

HomeActivity has HomeMapFragment and HomeMapFragment has com.mapbox.mapboxsdk.maps.SupportMapFragment.

@TankJK
Copy link
Author

TankJK commented May 13, 2019

Here, Sorry for writing many things. I confirm that if app disable location component, app is no more crashing. We very much need the location component in our app, please guide how can we use the location component?

Thanking you in advance,

@LukasPaczos
Copy link
Member

Thanks for reporting the issue @TankJK. We think that this issue is mainly caused by the AS profiler leak and we don't have a clear resolution yet. FWIW, we've not heard any reports from the production environment.

Closing as a duplicate of mapbox/mapbox-gl-native#14010.

@TankJK
Copy link
Author

TankJK commented May 13, 2019

@LukasPaczos I am sorry I didnt get your response. When you say production environment, is it production environment of application or Mapbox?
In our case, we are using same Mapbox environment for production and debug. How do we test our app in this case for debug version?

PS: I am always getting this crash when testing so not able to move ahead in my application.

Please guide us as we are using Mapbox from last couple of years (with older Mapbox version) and we wanted to upgrade to latest successfully.

Thanks.

@LukasPaczos
Copy link
Member

When you say production environment, is it production environment of application or Mapbox?

I meant that we've never heard any reports from release builds. When it comes to debugging, do you have a minimal reproducible case that we could reliably reproduce with?

As others have mentioned in mapbox/mapbox-gl-native#14010, disabling the compass (changing the render mode to RenderMode#Normal) decreases source updates, which in turn makes the issue pop up less frequently.

@TankJK
Copy link
Author

TankJK commented May 13, 2019

@LukasPaczos This is always crashing for me and I am using RendereMode#Normal only.

I have HomeActivity which has HomeFragment and HomeFragment contains SupportMapFragment. OnMapReady is called on HomeFragment and using this, I am displaying all markers with current location.

Getting JNI ERROR (app bug): weak global reference table overflow error after some time (30-150 seconds) and application is crashing.

Please guide us we are facing this issue continuously.

Thanking you in advance.

@LukasPaczos
Copy link
Member

Would you be able to profile the native memory in search for any leaks or unexpected growths? That might help us determine the issue. What's the device you're testing on?

@TankJK
Copy link
Author

TankJK commented May 13, 2019

I am testing on Moto G, Android 7.0.

Did you tried using SupportMapFragment? I am sure you can replicate at your end.

We are really looking forward to you for resolving this issue.

@TankJK
Copy link
Author

TankJK commented May 14, 2019

@LukasPaczos I tested with non-debug version and its still crashing. Please suggest some solution.

@TankJK
Copy link
Author

TankJK commented May 16, 2019

@LukasPaczos App is getting another continuous crash with InterruptedException.

FATAL EXCEPTION: OkHttp events.mapbox.com Writer
java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1991)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2025)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1048)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:776)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:820)

Device is Android Samsung S5 with Android 5.0

HttpOk library com.squareup.okhttp3:okhttp:3.14.1 is used, is this error due to HttpOk library's latest version?

@LukasPaczos
Copy link
Member

@TankJK would you mind cutting a new ticket in the https://github.com/mapbox/mapbox-gl-native/issues explaining the issue and your setup? Thank you!

@andrlee
Copy link

andrlee commented May 16, 2019

FATAL EXCEPTION: OkHttp events.mapbox.com Writer
java.lang.InterruptedException

@TankJK it does look like internal crash in okhttp3. we don't use ScheduledThreadPoolExecutor in events library. Can you try to switch to the earlier stable version and retest?

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

No branches or pull requests

3 participants