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
Hi,
I'm writing about an ANR that happens every time a user switches opengl context during a live wallpaper preview. This ANR is present on all Android 9.0+ devices and on very few 8.0 - 9.0 devices.
Reproduction steps/code
The reproduction is really easy given a live wallpaper developed with the libgdx framework and an Android 9.0+ device or an Android Studio emulator (9.0+):
Open the live wallpaper preview (it is the view where you can see the live wallpaper running but you still haven't set it as your live wallpaper)
Press the home button to switch to the home screen.
Press the recent apps button and resume the live wallpaper app.
At this moment the screen goes black and an ARN occurs with the message:
E/libEGL: eglCreateWindowSurface: native_window_api_connect (win=0x7e53b97010) failed (0xffffffed) (already connected to another API?)
E/libEGL: eglCreateWindowSurface:896 error 3003 (EGL_BAD_ALLOC)
As you can imagine, these ANRs are very frequent and I have something like 1500+ reports per day across my live wallpaper apps. If someone has any clue on how to proceed that would be awesome. Many thanks for all your efforts.
Issue details
Hi,
I'm writing about an ANR that happens every time a user switches opengl context during a live wallpaper preview. This ANR is present on all Android 9.0+ devices and on very few 8.0 - 9.0 devices.
Reproduction steps/code
The reproduction is really easy given a live wallpaper developed with the libgdx framework and an Android 9.0+ device or an Android Studio emulator (9.0+):
https://play.google.com/store/apps/details?id=com.cyphercove.doublehelixfree
or build your own through the various live wallpaper examples.
At this moment the screen goes black and an ARN occurs with the message:
E/libEGL: eglCreateWindowSurface: native_window_api_connect (win=0x7e53b97010) failed (0xffffffed) (already connected to another API?)
E/libEGL: eglCreateWindowSurface:896 error 3003 (EGL_BAD_ALLOC)
After some searching, I found out that the ANR happens due to opengl context loss, not only for libgdx live wallpapers but for all live wallpapers that use opengl, (an Android bug probably) and the possible workaround is given here:
https://stackoverflow.com/questions/36312209/opengls-eglcreatewindowsurface-gl-error-egl-bad-alloc
But I have no idea how to implement it on libgdx.
As you can imagine, these ANRs are very frequent and I have something like 1500+ reports per day across my live wallpaper apps. If someone has any clue on how to proceed that would be awesome. Many thanks for all your efforts.
Version of LibGDX and/or relevant dependencies
All versions
Stacktrace
Please select the affected platforms
The text was updated successfully, but these errors were encountered: