-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Maps SDK for Android does not render in emulator #11266
Comments
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 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 |
@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:
|
@indrek-koue noted in the OP:
|
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:
|
I dunno if it is related to graphic card, but on mine Intel Iris 640 the issue is reproducing the same. |
@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 |
|
I've modified |
Full debug log:
|
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) |
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. |
Changing to Software Renderer (GLES 1.1) in Emulator device Advanced settings worked for me. |
Platform: Android
Mapbox SDK version: 5.4.1
Steps to trigger behavior
Expected behavior
Map should load in emulated Android device.
Actual behavior
Map view loads but only renders the background layer. Attempting to interact in any way with the app produces these types of errors:
Note: we've tested this on computers with Intel Iris 6100 graphics cards and they are having no issues.
Here are some screenshots of the LogCat and the Event Log - I couldn't get any text because Android Studio keeps freezing.
cc @langsmith @cammace
The text was updated successfully, but these errors were encountered: