Question

I am new to Android development and things have been going great thus far with my app. Suddenly today when my Nexus 4 is plugged in via USB for debugging the app I am getting tens of thousands of libEGL tag errors and these are taking over all room in the log - making it impossible for me to see any meaningful messages.

The libEGL errors do not seem related to my app because when I uninstall my app and plug in my Nexus 4 I still see the errors. They look like the following:

validate_display:256 error 3001 (EGL_NOT_INITIALIZED)
eglMakeCurrent:688 error3008 (EGL_BAD_DISPLAY)

I have no idea where these errors are being generated from. My Log.v and Log.i calls are not being displayed in the log at all. I thought perhaps something was misconfigured - so I did the steps here

Logcat not displaying my log calls

But that did not help. Thanks in advance.

--- EDIT - I ended up rebooting my phone and the error messages stopped. I'd still love to know why this was happening if anyone has an idea.

Was it helpful?

Solution

Logcat can tell you the PID (process id) and TID (thread id) of the process/thread that wrote the log message, which you can use to identify the offending app.

E.g. in Android Studio logcat gives me messages like this:

06-25 14:54:48.129    6276-6342/? E/libEGL﹕ validate_display:256 error 3001 (EGL_NOT_INITIALIZED)
06-25 14:54:48.129    6276-6342/? E/libEGL﹕ validate_display:256 error 3001 (EGL_NOT_INITIALIZED)
06-25 14:54:48.139    6276-6342/? E/libEGL﹕ eglMakeCurrent:688 error 3008 (EGL_BAD_DISPLAY)

The numbers 6276-6342 in this log trace are the PID and TID respectively. You can identify the process using e.g. adb shell "pid | grep 6276" (substituting the correct process id from your logs).

If you're not seeing the PID in your logcat output, see the docs for logcat and logcat output format

OTHER TIPS

I don't really understand what's causing the errors. But I noticed one time a while back that if I enabled the 'Enable OpenGL traces' in my developer options on the phone, then my logs would fill up with those messages. If you just want to ignore those errors (as in they have nothing to do with your code), then I suggest turning that option off. They don't seem to have any effect on what you're running, as far as I can tell.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top