-
Notifications
You must be signed in to change notification settings - Fork 1.3k
JNI Error weak global reference table overflow when animating #11556
Comments
Thanks for the report. Closing as a duplicate, please follow #11212. |
Tried to reproduce this with the steps in the OP (increasing to 3000 cars), but don't see the same issue. Tested on a Pixel 2 and Galaxy Nexus. |
I should have mentioned that I was using our own large icons (200x250) in this example. I saw the same crash in our main app, but have not seen the crash in our main app after removing animations and adding logic to scale the icons down to the proper size. Maybe the size of the icons leads to this problem. |
@mbrame12 Good to hear you found a work around for now at least
Thanks for the additional note. Tried to scale up the large icons, but this doesn't affect the weak global reference table at all on my side. A typical dump looks like the following (and doesn't change during a run):
Do you use any other libraries with a native component? Does this occur on any other device than the Huawei BTV-W09 for you? If you could share a concrete example, this would be great. |
Per chat, this issue probably has a different origin than #11212, therefore reopening. |
Here is the code that I'm using:
This also happened on a BLU R1 HD phone as well. I used custom images in the app (both the ones that we show in our app, and a tree icon that I made quickly). I've had the phone connected to a debugger when running the test app. I just have com.android.support dependencies in addition to the mapbox SDK dependency. On a side note, I'm running the test app on the Huawei tablet again, and it's still running. Apparently it doesn't crash as quickly when not connected to the debugger (if it is indeed going to crash this time). I'll keep doing some testing and attach more information if I find out anything useful. |
I left the Huawei tablet running the test app for over an hour (not connected to the debugger), and it did not crash. I then restarted the test app connected to the debugger, and it crashed in about 7 minutes (with the weak global reference table overflow). |
I'm using a slightly modified version of https://github.com/mapbox/mapbox-gl-native/blob/dfb9b26e675a152a925fcc5b84c3e14b8b9779d2/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AnimatedSymbolLayerActivity.java#L265-L278 on a Huawei BTV-W09. The main modification is that in the addRandomCars() method, I add 150 cars instead of 10.
Background
In our app, we're currently using version 4.1.1 of the Mapbox SDK. We want to upgrade to a more recent version, but need to switch away from using MarkerView if we do so. We have modified code that is doing much of what we want with 5.5.1 and 6.0.0-beta.5 in terms of drawing moving items on the map using SymbolLayer. However, since it crashes, we can't use either of these releases unless there is something else that we can do to avoid this problem.
Platform: Android
Mapbox SDK version: 5.5.1, 6.0.0-beta.5 (both were tested)
Steps to trigger behavior
Expected behavior
The app continues to run until stopped, and the symbols keep moving and rotating.
Actual behavior
The app crashes after a few minutes, with the following error:
The text was updated successfully, but these errors were encountered: