Emulator: glClear:466 GL err 0x502
Asked Answered
G

10

15

How to solve the Android Studio 3.0.1 Emulator?

When I start to run the project with virtual device, the error start showing (Emulator: glClear:466 GL err 0x502).

The virtual device keep on blinking whenever by clicking it.

Thanks in advance...

Greaves answered 2/1, 2018 at 13:7 Comment(1)
Happens with the emulator in Flutter too.Quasimodo
S
23

I'm not sure if this counts as an answer or a work around. Yesterday after updating the emulator in Android Studio to version 27.0.2 under SDK Tools I received the exact same error on all of my AVDs. The error appeared on multiple windows laptops I have running Android Studio whenever I started any virtual device in the emulator. The only things I had done to both the laptops in the last day was update Android Studio and I ran a general Windows update.

After some testing I found that if I change the configuration on the virtual devices in the emulator under "Emulated Performance - Graphics" so they use Software GLES 1.1 the error goes away. Before that I had the default setting of Automatic. I tested starting up the virtual devices with the Emulated Performance Graphics setting on Hardware GLES 2.0 and the error came back. No hardware or display drivers were changed on either of my laptops so no idea why the error came up all of a sudden after the Emulator update.

Spectroradiometer answered 3/1, 2018 at 20:42 Comment(0)
E
11

I faced the same problem after upgrading to Android studio 3.0.1. I was using emulator Nexus_6P_API_23 where screen started flickering after upgrade. To be precise, screen was toggling up-side down and reverse.

Following changes solved the problem making two changes in emulator settings:

  1. "Emulated Performance - Graphics" -> Software - GLES 2.0
  2. Memory RAM increased to 3072 MB
Elicia answered 21/2, 2018 at 3:25 Comment(0)
K
4

I resolved it by reinstalling Android Emulator from SDK tool section. Apart from it, also reinstall HAXM with 4GB memory. Then create a new AVD with 2GB RAM and 512 MB VM space.

enter image description here

Kakalina answered 13/2, 2018 at 6:4 Comment(0)
P
1

I get this when I have started Firefox and afterwards started the emulator in Adnroid studio, seems that Firefox hogs som resource or that the resource is not sharable. It starts with that the event log spits out:

07:31 Emulator: libpng warning: iCCP: known incorrect sRGB profile

07:31 Emulator: libpng warning: iCCP: known incorrect sRGB profile

Usually ends with Emulator: glClear:470 GL err 0x506 and the emulator dies.

My workaround, dont have firefox open when I start the emulator, opening firefox after doesnt now cause this error

Running system, Win10 latest patches as this date and firefox 60.0.2 (64-bit) and android studio 3.1.4

Persimmon answered 31/8, 2018 at 5:54 Comment(0)
A
0

Updated my video card drivers by downloading them directly from Nvidia, solved the issue. Changing Emulated Performance - Graphics" -> Software - GLES 2.0 will causes the virtual device to lag. Hardware acceleration is the way to go.

Advancement answered 17/5, 2018 at 2:4 Comment(0)
P
0

I was getting this ambiguous error, specifically when glLinkProgram(programId) was being called, and none of these solutions resolved the issue. My problem turned out to be that I didn't correctly set up my shader program. I used glCreateShader(GL_VERTEX_SHADER) for both my vertex and fragment shaders. After I corrected the mistake, the error stopped showing up.

Purgation answered 3/3, 2020 at 4:41 Comment(0)
S
0

Just updated the android API in the current emulator from android API33 to android API 35 such as this : SDK Component Installer

Snaggletooth answered 23/6, 2024 at 10:11 Comment(0)
A
0

No need to change Emulated Performance graphics to SOFTWARE. Just go to emulator extended controls and select settings then change the OpenGL ES API level to [Compatibility (OpenGL ES 1.1/2.0)]. Close your emulator and start it again. This works for me and makes my day.

Aviles answered 17/7, 2024 at 11:24 Comment(0)
A
0

I think a cold reboot will fix that issue.

Assert answered 5/8, 2024 at 7:43 Comment(0)
T
-1

Ya I was faced same problem before. Try this

  1. Change the Emulated Performance to Software - GLES 2.0

  2. increase the RAM to 3044MB

I hope this will help you.

Thwack answered 30/7, 2018 at 10:35 Comment(1)
Please don't repeat other answers. This is essentially the same answer as https://mcmap.net/q/750705/-emulator-glclear-466-gl-err-0x502, which preceded yours by more than 4 months.Abreu

© 2022 - 2025 — McMap. All rights reserved.