You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Mapbox crashes our app on Android 7.0, tested on devices with 7.0(Nexus 5X/Nexus 6P). Works on Nexus 5 with Android 6.0
Shader failed to compile: ERROR: Valid GLSL but not GLSL ES
Vertex shader fill failed to compile: precision highp float;
#ifdef GL_ES
precision highp float;
#else
#define lowp
#define mediump
#define highp
#endif
attribute vec2 a_pos;
uniform mat4 u_matrix;
uniform lowp vec4 u_color;
uniform lowp float u_opacity;
void main() {
lowp vec4 color = u_color;
lowp float opacity = u_opacity;
gl_Position = u_matrix * vec4(a_pos, 0, 1);
}
java.lang.Error: Vertex shader fill failed to compile
at com.mapbox.mapboxsdk.maps.NativeMapView.nativeRender(Native Method)
at com.mapbox.mapboxsdk.maps.NativeMapView.render(NativeMapView.java:139)
at com.mapbox.mapboxsdk.maps.MapView.onDraw(MapView.java:1377)
Sounds like you might be using an emulator? Could you try changing the Emulated Performance setting to Hardware or Software and see if that resolves the issue.
I can't reproduce on any physical devices but run into this issue with emulators. It seems to be happening with the latest Android Studio emulator only, Genymotion's not having issues if the device is running greater then API 20. For now, if you need an emulator for building and testing your project I'd recommend using this till we resolve this issue.
Any updates on this? We are using software GL in the meantime, but that's definitely not a great solution in the long run. Does anyone have theories as to where the problem is?
The issue (at least for me) is that the Android Emulator is supporting OpenGL in hardware but not GLES. This is triggering different code to be compiled, and the code is evidently buggy when GL_ES is not defined. This output is using the standard Mapbox Android SDK installed via Maven (see the last line in the dump). It would appear highp needs to have a type defined, but does not!
Activity
cammace commentedon Sep 20, 2016
Sounds like you might be using an emulator? Could you try changing the
Emulated Performancesetting to Hardware or Software and see if that resolves the issue.snorrid commentedon Sep 20, 2016
This is failing on real devices in our device suite, no emulators.
cammace commentedon Sep 20, 2016
This looks similar to issue #5878.
cc: @ivovandongen to help look into this
ivovandongen commentedon Sep 21, 2016
@snorrid Anything special about those devices? And which version of Android Studio/gradle plugin are you using?
Just re-tested with the AS 2.2 on a nexus 5x with android 7.0 and I can't reproduce. The emulators do seem to be broken still though.
ivovandongen commentedon Sep 21, 2016
I've validated the shader in the error and it seems to comply to the specification. (validator)
lucaswoj commentedon Sep 21, 2016
@tobrun @bleege Can you repro this on physical device?
cammace commentedon Sep 26, 2016
I can't reproduce on any physical devices but run into this issue with emulators. It seems to be happening with the latest Android Studio emulator only, Genymotion's not having issues if the device is running greater then API 20. For now, if you need an emulator for building and testing your project I'd recommend using this till we resolve this issue.
jeffypooo commentedon Sep 28, 2016
@cammace I get the same shader crash with a Genymotion emulator running 7.0 and 6.0
Logcat:
I'm running Windows 10 with an AMD FirePro W5100 GPU
drd commentedon Oct 20, 2016
Any updates on this? We are using software GL in the meantime, but that's definitely not a great solution in the long run. Does anyone have theories as to where the problem is?
uudruid74 commentedon Oct 22, 2016
Software GL using Mesa fails for me, -gpu swiftshader works for me:
LD_PRELOAD='/usr/lib64/libstdc++.so.6' emulator -no-boot-anim -netdelay none -netspeed full -avd Nexus_5_API_22_x86 -gpu swiftshader -qemu -m 1526
uudruid74 commentedon Oct 27, 2016
The issue (at least for me) is that the Android Emulator is supporting OpenGL in hardware but not GLES. This is triggering different code to be compiled, and the code is evidently buggy when GL_ES is not defined. This output is using the standard Mapbox Android SDK installed via Maven (see the last line in the dump). It would appear highp needs to have a type defined, but does not!
jeffypooo commentedon Nov 12, 2016
Still experiencing this issue, any news?
tobrun commentedon Nov 14, 2016
Fixed with #7044, closing.