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

Shader failed to compile: ERROR: Valid GLSL but not GLSL ES #5878

Closed
ivovandongen opened this issue Aug 5, 2016 · 11 comments
Closed

Shader failed to compile: ERROR: Valid GLSL but not GLSL ES #5878

ivovandongen opened this issue Aug 5, 2016 · 11 comments
Labels
Android Mapbox Maps SDK for Android bug

Comments

@ivovandongen
Copy link
Contributor

The shaders won't compile on the android emulators anymore, resulting in crashes of all maps.

08-05 16:12:33.409 1550-1550/com.mapbox.mapboxsdk.testapp E/mbgl: {pboxsdk.testapp}[Shader]: Shader failed to compile: ERROR: Valid GLSL but not GLSL ES
08-05 16:12:33.409 1550-1550/com.mapbox.mapboxsdk.testapp E/mbgl: {pboxsdk.testapp}[Shader]: 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);
                                                                  }
@ivovandongen ivovandongen added bug Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl labels Aug 5, 2016
@ivovandongen ivovandongen added this to the android-v4.2.0 milestone Aug 5, 2016
@jeffypooo
Copy link

jeffypooo commented Aug 24, 2016

This can be fixed by changing your emulated graphics to Software - GLES 2.0 in your AVD settings. This is not ideal, but it will work (and is still much faster than emulating an ARM device).

I suspect this is emulator specific.

@jeffypooo
Copy link

@ivovandongen any updates on this?

@ivovandongen
Copy link
Contributor Author

@masterjefferson I just retested this with updates to Android Studio and I don't see the issue anymore. Can you verify?

@ivovandongen
Copy link
Contributor Author

Just tried to verify this. It worked for me on Android Studio 2.1.3, but not on 2.2-rc2.

@zugaldia
Copy link
Member

zugaldia commented Sep 6, 2016

Just confirming @ivovandongen 's finding, not getting the crash on Studio 2.1.3.

@ivovandongen
Copy link
Contributor Author

Thanks @zugaldia. I'm closing this one now than as it seems to be related to the emulators in the upcoming Android Studio release.

@ivovandongen ivovandongen removed the Core The cross-platform C++ core, aka mbgl label Sep 6, 2016
@jeffypooo
Copy link

@ivovandongen @zugaldia Thanks for the info

@saadfarooq
Copy link

This exists in 2.1.3 now with SDK Tools and Build tools upgrade. After upgrade, I have the following versions installed:

SDK Tools: 25.2.2
Platform-tools: 24.0.3
Build-tools: 24.0.2

I did not change anything in the project. It still uses:

minSdkVersion = 18
compileSdkVersion = 23
targetSdkVersion  = 23
buildToolsVersion = "23.0.3"

But mapbox is now broken in all emulators.

@jeffypooo
Copy link

Problem still persists in AS 2.2

SDK Tools: 25.2.2
Platform-tools: 24.0.3
Build-tools: 24.0.2

@mgtitimoli
Copy link

I'm leaving here a setup that works in case anyone decides to rollback the upgrade while we wait for the fix...

nitaliano/react-native-mapbox-gl#415 (comment)

@tobrun
Copy link
Member

tobrun commented Nov 14, 2016

Fix has landed with #7044

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

No branches or pull requests

6 participants