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

line-pattern or fill-pattern with invalid values crashes #12835

Closed
tobrun opened this issue Sep 6, 2018 · 1 comment · Fixed by #12896
Closed

line-pattern or fill-pattern with invalid values crashes #12835

tobrun opened this issue Sep 6, 2018 · 1 comment · Fixed by #12896
Assignees
Labels
Core The cross-platform C++ core, aka mbgl crash

Comments

@tobrun
Copy link
Member

tobrun commented Sep 6, 2018

If an invalid value is provided for either fill-pattern or line-pattern, I'm hitting the following crash.

09-06 16:27:33.370 22204-22249/? E/AndroidRuntime: FATAL EXCEPTION: GLThread 11210
    Process: com.mapbox.mapboxsdk.testapp, PID: 22204
    java.lang.Error: glDrawElements( static_cast<GLenum>(primitiveType), static_cast<GLsizei>(indexLength), GL_UNSIGNED_SHORT, reinterpret_cast<GLvoid*>(sizeof(uint16_t) * indexOffset)): Error GL_OUT_OF_MEMORY at /home/tobrun/ws/mapbox-gl-native/src/mbgl/gl/context.cpp:742
        at com.mapbox.mapboxsdk.maps.renderer.MapRenderer.nativeRender(Native Method)
        at com.mapbox.mapboxsdk.maps.renderer.MapRenderer.onDrawFrame(MapRenderer.java:74)
        at com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.GLSurfaceViewMapRenderer.onDrawFrame(GLSurfaceViewMapRenderer.java:57)
        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1571)
        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)
For example:
linePattern(get("line-pattern")) 

when line-pattern feature property doesn't exist in the used geojson source.

Expected:

As with other DDS properties, I would except this to not crash, just ignore.

Actual:

Crashes the app

@tobrun tobrun added the Core The cross-platform C++ core, aka mbgl label Sep 6, 2018
@mollymerp mollymerp self-assigned this Sep 14, 2018
@mollymerp
Copy link
Contributor

derp thanks @tobrun will try to get a fix out asap

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants