-
Notifications
You must be signed in to change notification settings - Fork 1.3k
JNI ERROR (app bug): weak global reference table overflow (max=51200) #14010
Comments
I changed code from Fragment to Activity, this issue still happens. |
Mapbox dependencies^ |
like issue #10528? but with version 7.1.2? |
Have the same issue with activity. Also getting #14001 on the same activity. Error occurs after some random waiting. |
Looking at the JNI heap for a bunch of scenarios. I'm thinking that this only occurs when you have LocationComponent active with RenderMode configuration set to RenderMode.Compass. |
Been profiling various use-cases and an overflow like this luckily doesn't occur as part of our normal map render flow. All allocated MapRunnable objects are delocated properly within the map lifetime. What I however see is that the Class component is increasing (this is also shown in OP: 6740 instances of java.lang.Class and 210 threads). Depending on the use-case the entries change but 8/10 of the amount is coming from android tooling that is only active during debugging. So we can safely say that this occurs more frequently on debug builds vs release builds. An example of such a leak is that the network profiler, I'm seeing it leak each network request made. In above you can see it leaking the profiler through a gesture. I identified that a specific location component configuration, is a large contributor of invoking the garbage collector. With each second, I'm seeing 45 redraws. While in normal use, I'm seeing 2 to 8 redraws when performing a gesture over a couple of seconds. Note that all render references are cleaned up nicely, but some autovalue references remain: |
@whind could you use your profiler to identify what the following are:
Both these numbers are both very high, I'm able to hit a max of threads = 52 and Classes depends on usage (but 8/10 are coming from profiler themselves). |
I saw this just once so far. I don't have steps to reproduce it. But:
I confirm this is our configuration.
|
The issue is unrelated to
|
@desertkun never claimed that this issue is specific to
So, moving forward, I would love if someone is able to chime in with some profiling from their end. Could you provide some profile traces? or some images showing profiler in action when this all is occurring. @desertkun one thing noticing with your output is that you have 2 GLSurfaceViews allocated. Is that correct? |
With RenderMode.Normal error appears less frequently. |
here is another stacktrace (got that on map sdk 7.3.2): 2019-05-16 15:14:09.062 32148-541/ie.beepsafe.app E/art: Unexpected time out during dump checkpoint. 2019-05-16 15:14:09.207 854-854/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
#14450 has landed and we hope that it might resolve this issue as well. We'd appreciate if you could retest your environments using the |
Tests with 8.1.0 codebase have shown great improvements due to threading refactor from @LukasPaczos. Below image was captured after running location component example with compass enabled for 2.5 minutes. the amount of 26 objects, is a lot lower as the 51200 max. On top of this the "leaked" objects all come from Android Studio network profiler which won't be active with release builds. I'm going to close this issue as resolved for now, please retest with the 8.1.0 releases and do reach out if you are still able to reproduce. Please provide a profiler trace to help us diagnose the problem. Thank you all for using our products and providing feedback! |
Hello! Problem with weak reference table again:
A/zygote64: indirect_reference_table.cc:278] JNI ERROR (app bug): weak global reference table overflow (max=51200)
indirect_reference_table.cc:278] weak global reference table dump:
indirect_reference_table.cc:278] Last 10 entries (of 51200):
indirect_reference_table.cc:278] 51199: 0x153c0000 java.lang.Thread
indirect_reference_table.cc:278] 51198: 0x15380000 java.lang.Thread
indirect_reference_table.cc:278] 51197: 0x15340000 java.lang.Thread
indirect_reference_table.cc:278] 51196: 0x15300000 java.lang.Thread
indirect_reference_table.cc:278] 51195: 0x152c0000 java.lang.Thread
indirect_reference_table.cc:278] 51194: 0x15280000 java.lang.Thread
indirect_reference_table.cc:278] 51193: 0x15240000 java.lang.Thread
indirect_reference_table.cc:278] 51192: 0x15200000 java.lang.Thread
indirect_reference_table.cc:278] 51191: 0x151c0000 java.lang.Thread
indirect_reference_table.cc:278] 51190: 0x15180000 java.lang.Thread
indirect_reference_table.cc:278] Summary:
indirect_reference_table.cc:278] 6740 of java.lang.Class (6740 unique instances)
indirect_reference_table.cc:278] 210 of java.lang.Thread (210 unique instances)
indirect_reference_table.cc:278] 34 of java.lang.DexCache (34 unique instances)
indirect_reference_table.cc:278] 4 of dalvik.system.PathClassLoader (2 unique instances)
indirect_reference_table.cc:278] 3 of com.squareup.picasso.Utils$PicassoThread (3 unique instances)
indirect_reference_table.cc:278] 3 of android.os.HandlerThread (3 unique instances)
indirect_reference_table.cc:278] 2 of com.squareup.picasso.Dispatcher$DispatcherThread (2 unique instances)
indirect_reference_table.cc:278] 2 of com.squareup.picasso.Picasso$CleanupThread (2 unique instances)
indirect_reference_table.cc:278] 2 of com.amplitude.api.WorkerThread (2 unique instances)
indirect_reference_table.cc:278] 1 of android.opengl.GLSurfaceView$GLThread
indirect_reference_table.cc:278] 1 of okio.AsyncTimeout$Watchdog
A/zygote64: indirect_reference_table.cc:278] 1 of android.opengl.GLSurfaceView
indirect_reference_table.cc:278] 1 of java.lang.BootClassLoader
indirect_reference_table.cc:278] 1 of java.lang.ThreadGroup
indirect_reference_table.cc:278] 1 of android.net.ConnectivityThread
indirect_reference_table.cc:278]
runtime.cc:516] Runtime aborting...
runtime.cc:516]
runtime.cc:524] JNI ERROR (app bug): weak global reference table overflow (max=51200)
runtime.cc:524] weak global reference table dump:
runtime.cc:524] Last 10 entries (of 51200):
runtime.cc:524] 51199: 0x153c0000 java.lang.Thread
runtime.cc:524] 51198: 0x15380000 java.lang.Thread
runtime.cc:524] 51197: 0x15340000 java.lang.Thread
runtime.cc:524] 51196: 0x15300000 java.lang.Thread
runtime.cc:524] 51195: 0x152c0000 java.lang.Thread
runtime.cc:524] 51194: 0x15280000 java.lang.Thread
runtime.cc:524] 51193: 0x15240000 java.lang.Thread
runtime.cc:524] 51192: 0x15200000 java.lang.Thread
runtime.cc:524] 51191: 0x151c0000 java.lang.Thread
runtime.cc:524] 51190: 0x15180000 java.lang.Thread
runtime.cc:524] Summary:
runtime.cc:524] 6740 of java.lang.Class (6740 unique instances)
runtime.cc:524] 210 of java.lang.Thread (210 unique instances)
runtime.cc:524] 34 of java.lang.DexCache (34 unique instances)
runtime.cc:524] 4 of dalvik.system.PathClassLoader (2 unique instances)
runtime.cc:524] 3 of com.squareup.picasso.Utils$PicassoThread (3 unique instances)
runtime.cc:524] 3 of android.os.HandlerThread (3 unique instances)
runtime.cc:524] 2 of com.squareup.picasso.Dispatcher$DispatcherThread (2 unique instances)
runtime.cc:524] 2 of com.squareup.picasso.Picasso$CleanupThread (2 unique instances)
runtime.cc:524] 2 of com.amplitude.api.WorkerThread (2 unique instances)
runtime.cc:524] 1 of android.opengl.GLSurfaceView$GLThread
A/zygote64: runtime.cc:524] 1 of okio.AsyncTimeout$Watchdog
runtime.cc:524] 1 of android.opengl.GLSurfaceView
runtime.cc:524] 1 of java.lang.BootClassLoader
runtime.cc:524] 1 of java.lang.ThreadGroup
runtime.cc:524] 1 of android.net.ConnectivityThread
runtime.cc:524]
A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 20468 (Thread-44346)
My code in Fragment:
class MapFragment : Fragment(),PermissionsListener, OnMapReadyCallback,MapboxMap.OnMapClickListener{
var permissionsManager:PermissionsManager?=null
private var mapView: MapView? = null
private var mapboxMap: MapboxMap? = null
}
override fun onResume() {
super.onResume()
mapView?.onResume()
}
Steps to reproduce
Configuration
**Android versions: Android 8.0.0
**Device models: Samsung Galaxy S8
**Mapbox SDK versions: mapbox-android-sdk:7.1.2
The text was updated successfully, but these errors were encountered: