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

[android] App crashes when swapping a custom layer #8448

Closed
Guardiola31337 opened this issue Mar 17, 2017 · 10 comments · Fixed by #11239
Closed

[android] App crashes when swapping a custom layer #8448

Guardiola31337 opened this issue Mar 17, 2017 · 10 comments · Fixed by #11239
Labels
Android Mapbox Maps SDK for Android crash runtime styling

Comments

@Guardiola31337
Copy link
Contributor

Crash when pressing FAB in CustomLayerActivity using Samsung Galaxy S6 edge+:

samsungsm-g928a

Platform: Android
Mapbox SDK version: master branch

Steps to trigger behavior

  1. Open CustomLayerActivity
  2. Press FAB to swap custom layer
  3. Crash

Expected behavior

App doesn't crash

Actual behavior

App crashes

bugcustomlayer

@Guardiola31337 Guardiola31337 added Android Mapbox Maps SDK for Android crash runtime styling labels Mar 17, 2017
@tobrun
Copy link
Member

tobrun commented Mar 17, 2017

Is there a crash log availlable?

@Guardiola31337
Copy link
Contributor Author

Guardiola31337 commented Mar 17, 2017

Nope, I was toying with test app using Samsung Remote Test Lab and it crashed.
BTW, I could get it because it's actually a physical device connected remotely.
Feel free to close, have to look further 😉

@DellScreen
Copy link

Attached a stack-trace obtained on an S8: CustomLayerCrashOnS8.txt

@tobrun
Copy link
Member

tobrun commented Jul 7, 2017

From Samsung s6 edge, J3 and emulator:

java.lang.Error: vertexArray->bindVertexArray(value): Error GL_INVALID_OPERATION at /home/tvn/Mapbox/mapbox-gl-native/src/mbgl/gl/value.cpp:347 at com.mapbox.mapboxsdk.maps.NativeMapView.nativeRender(Native Method) at com.mapbox.mapboxsdk.maps.NativeMapView.render(NativeMapView.java:158) at com.mapbox.mapboxsdk.maps.MapView.onDraw(MapView.java:416) at android.view.View.draw(View.java:18318)

putting on milestone for visibility

@tobrun tobrun added this to the android-v5.2.0 milestone Jul 7, 2017
@jfirebaugh
Copy link
Contributor

Is this still reproducible?

@tobrun
Copy link
Member

tobrun commented Jul 23, 2017

Was able reproduce this with a galaxy J3 on master (f053feb)

07-23 23:45:54.545 2081-2081/com.mapbox.mapboxsdk.testapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mapbox.mapboxsdk.testapp, PID: 2081
java.lang.Error: vertexArray->bindVertexArray(value): Error GL_INVALID_OPERATION at /home/tvn/Mapbox/mapbox-gl-native/src/mbgl/gl/value.cpp:347
at com.mapbox.mapboxsdk.maps.NativeMapView.nativeRender(Native Method)
at com.mapbox.mapboxsdk.maps.NativeMapView.render(NativeMapView.java:125)
at com.mapbox.mapboxsdk.maps.MapView.onDraw(MapView.java:425)
at android.view.View.draw(View.java:16536)
...

@tobrun
Copy link
Member

tobrun commented Aug 2, 2017

@jfirebaugh I'm thinking the source of the crash will be found in our example implementation here.
If I comment out the intialise/render code, it's not crashing anymore.

@ivovandongen
Copy link
Contributor

@tobrun The crash on the Galaxy J3 could be due to bugs in the Adreno 300 series dealing with Vertex Arrays: #10253

Not sure if that is also the case for the Samsung s6 edge(+). Should check that.

The crash log for the Samsung S8 seems different all together and should be investigated separately perhaps.

@lilykaiser lilykaiser removed this from the android-v5.2.0 milestone Nov 17, 2017
@zugaldia
Copy link
Member

I was also able to reproduce this issue on a Nexus 5 emulator using master today, not on a Pixel XL device.

@ivovandongen
Copy link
Contributor

I've added fixes in #11239. @Guardiola31337 @tobrun Would you please re-test with the devices you mentioned in this ticket. fwiw, I've reproduced the issue with a Galaxy Nexus.

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

Successfully merging a pull request may close this issue.

7 participants