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.
Maps SDK for Android does not render in emulator #11266
Also started getting these errors after updating to Android Studio v3.0.1 (or whatever update came out ~a week ago). At least, updating from v3.0 to v3.0.1 was the thing that introduced the errors for me.
Only way I managed to "fix" it was by changing the OpenGL renderer to "SwiftShader" in the emulator extended controls:
While changing it introduced a perceptible lag and I can now see some tearing/jaggies/artifacts on the map when panning, it did bring my map back... which is all I wanted (until I have time to investigate the OpenGL errors).
For the sake of completeness -
Mid-2014 rMBP (11,3) with the dGPU (a GT750M) running Sierra 10.12.6
Android Studio v3.0.1 with whatever emulator is current as of 27 Feb 2018 01:17:55 GMT (sorry)
Mapbox SDK v5.3.2
@tobrun whats the status of this issue? This issue is not related to GPU of the host device, its related to the version of android emulator. Currently Mapbox android SDK is not usable in the newest emulator and it crashes the Android studio (due the amount of error logs).
More details of this issue in a duplicate task of this issue: #11394
inEmulator() in EGLConfigChooser.java returns false when running on later versions of the emulators. Should be a relatively easy fix If that's the only issue.
I took a look at this before the weekend and it turns out this got introduced inadvertently by trying to duck under the maximum vertex attribute limit in #9373. The problem seems to be that in the opengl implementation in the emulator, linking the program again leads to a duplication or shift of the uniform locations. This results in an error when trying to set data on any uniform (the mat4 version is just the first one to get hit).
This is somewhat apparent when running a gl trace on it.
I am not sure wether the behaviour is defined in this case, but in any case it is solved by re-binding the uniforms after re-linking the program.
Activity
bchowTWC commentedon Feb 27, 2018
Also started getting these errors after updating to Android Studio v3.0.1 (or whatever update came out ~a week ago). At least, updating from v3.0 to v3.0.1 was the thing that introduced the errors for me.
Only way I managed to "fix" it was by changing the OpenGL renderer to "SwiftShader" in the emulator extended controls:
While changing it introduced a perceptible lag and I can now see some tearing/jaggies/artifacts on the map when panning, it did bring my map back... which is all I wanted (until I have time to investigate the OpenGL errors).
For the sake of completeness -
Mid-2014 rMBP (11,3) with the dGPU (a GT750M) running Sierra 10.12.6
Android Studio v3.0.1 with whatever emulator is current as of 27 Feb 2018 01:17:55 GMT (sorry)
Mapbox SDK v5.3.2
Edit: no change using SDK v5.4.1 or v5.3.0
And fwiw, also using
Also, here's a possible solution I just came across (haven't tried for myself yet) - https://stackoverflow.com/a/48897719
indrek-koue commentedon Mar 6, 2018
@samfader Why do you have the logs as a picture? Its hard to find this bug by doing a search using error log. Also the logs are missing part of it.
Full logs:
danswick commentedon Mar 6, 2018
@indrek-koue noted in the OP:
yang-owl commentedon Mar 6, 2018
Did a test with Android Emulator 27.1.12 (Nexus_6_API_23), Mapbox SDK version 5.5.0 with similar results:
Note "In emulator: false".
Event log:
VitaliyR commentedon Mar 12, 2018
I dunno if it is related to graphic card, but on mine Intel Iris 640 the issue is reproducing the same.
indrek-koue commentedon Mar 15, 2018
@tobrun whats the status of this issue? This issue is not related to GPU of the host device, its related to the version of android emulator. Currently Mapbox android SDK is not usable in the newest emulator and it crashes the Android studio (due the amount of error logs).
More details of this issue in a duplicate task of this issue: #11394
yang-owl commentedon Mar 15, 2018
inEmulator()inEGLConfigChooser.javareturns false when running on later versions of the emulators. Should be a relatively easy fix If that's the only issue.invised commentedon Mar 15, 2018
I've modified
EGLConfigChooserto returntruefrominEmulator(), but the problem persistsBtw, Genymotion works fine
tobrun commentedon Mar 16, 2018
Full debug log:
invised commentedon Mar 19, 2018
In emulator version 27.2.1 works smoothly if renderer is ANGLE (D3D11), also works but lags a lot if SwiftShader is used.
So the solution for now is to update emulator to version 27.2.1, go Settings - Advanced and select OpenGL ES renderer - ANGLE (D3D11)
ivovandongen commentedon Apr 3, 2018
I took a look at this before the weekend and it turns out this got introduced inadvertently by trying to duck under the maximum vertex attribute limit in #9373. The problem seems to be that in the opengl implementation in the emulator, linking the program again leads to a duplication or shift of the uniform locations. This results in an error when trying to set data on any uniform (the mat4 version is just the first one to get hit).
This is somewhat apparent when running a gl trace on it.

I am not sure wether the behaviour is defined in this case, but in any case it is solved by re-binding the uniforms after re-linking the program.
voxelbustersold commentedon Feb 1, 2019
Changing to Software Renderer (GLES 1.1) in Emulator device Advanced settings worked for me.