Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

MapRenderer.nativeRender makes App crash #12194

Closed
stoefln opened this issue Jun 22, 2018 · 3 comments
Closed

MapRenderer.nativeRender makes App crash #12194

stoefln opened this issue Jun 22, 2018 · 3 comments
Labels
Android Mapbox Maps SDK for Android

Comments

@stoefln
Copy link

stoefln commented Jun 22, 2018

Platform:
Android
Mapbox SDK version:
6.1.2 & 6.2.0 (both tested)
Location Layer Plugin:
0.5.3

Steps to trigger behavior

  1. Navigate around for around 5-10 minutes
  2. App closes without any notification, log shows no warnings or errors. Also other apps close/crash (screen recording app, audio player), system UI needs a second or two to rebuild.

Edit:

Finally managed to reproduce this bug in the emulator and it shows me a stacktrace:

06-22 10:38:45.059 6665-7953/com.toursprung.bikemap E/AndroidRuntime: FATAL EXCEPTION: GLThread 6879
    Process: com.toursprung.bikemap, PID: 6665
    java.lang.Error: std::bad_alloc
        at com.mapbox.mapboxsdk.maps.renderer.MapRenderer.nativeRender(Native Method)
        at com.mapbox.mapboxsdk.maps.renderer.MapRenderer.onDrawFrame(MapRenderer.java:90)
        at com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.GLSurfaceViewMapRenderer.onDrawFrame(GLSurfaceViewMapRenderer.java:55)
        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1571)
        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)
06-22 10:38:45.060 6665-7953/com.toursprung.bikemap E/BikemapApplication: uncaughtException
    java.lang.Error: std::bad_alloc
        at com.mapbox.mapboxsdk.maps.renderer.MapRenderer.nativeRender(Native Method)
        at com.mapbox.mapboxsdk.maps.renderer.MapRenderer.onDrawFrame(MapRenderer.java:90)
        at com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.GLSurfaceViewMapRenderer.onDrawFrame(GLSurfaceViewMapRenderer.java:55)
        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1571)
        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)
06-22 10:38:45.060 6665-7953/com.toursprung.bikemap D/BikemapApplication: logExceptionWithCrash

Edit2:

After days of debugging, we figured out that this crash can be avoided by NOT tilting the camera and adjusting the zoomlevel (more distant view).
Still we really need to tilt the camera...

@stoefln stoefln changed the title App crashes without any exception MapRenderer.nativeRender makes App crash Jun 22, 2018
@fabian-guerra fabian-guerra added the Android Mapbox Maps SDK for Android label Jun 22, 2018
@kkaefer
Copy link
Contributor

kkaefer commented Jun 26, 2018

This looks like an OOM crash.
refs #9037

@LukasPaczos
Copy link
Contributor

Is this one still reproducible with the latest versions of the libraries @stoefln? Can this be related to #12296 and mapbox/mapbox-plugins-android#570 instead of #9037?

I'm going to close this one regardless in favor of #9037 but please let us know if it's still an issue.

@novriamsyah
Copy link

same issue, try mapbox_gl_modified new package. work for me

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

No branches or pull requests

5 participants