Android as a Library Crashing on Resume - EGL_BAD_ALLOC

Getting a crash on 2019.3.0f5 when trying to resume the app. This does not happen every time, but it crashes the entire application after leaving the app and trying to relaunch it.

E/libEGL (21413): eglCreateWindowSurface: native_window_api_connect (win=0x7800e56010) failed (0xffffffed) (already connected to another API?)
E/libEGL (21413): eglCreateWindowSurface:729 error 3003 (EGL_BAD_ALLOC)
F/OpenGLRenderer(21413): Failed to create EGLSurface for window 0x7800e56010, eglErr = EGL_BAD_ALLOC

Full log below. I have tried several suggestions online such as:

Any thoughts on other steps to take?

/ViewRootImpl(21413): ViewRoot's Touch Event : ACTION_DOWN
I/ViewRootImpl(21413): ViewRoot's Touch Event : ACTION_UP
D/BezellessGripSuppressionFilter(21413): getdisplaysize, x : 1440 y : 3120
E/libEGL  (21413): eglCreateWindowSurface: native_window_api_connect (win=0x7800e56010) failed (0xffffffed) (already connected to another API?)
E/libEGL  (21413): eglCreateWindowSurface:729 error 3003 (EGL_BAD_ALLOC)
F/OpenGLRenderer(21413): Failed to create EGLSurface for window 0x7800e56010, eglErr = EGL_BAD_ALLOC
E/CRASH   (21413): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/CRASH   (21413): Version '2019.3.0f5 (44796c9d3c2c)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
E/CRASH   (21413): Build fingerprint: 'lge/judyln_lao_com/judyln:9/PKQ1.181105.001/1934510179867:user/release-keys'
E/CRASH   (21413): Revision: '12'
E/CRASH   (21413): ABI: 'arm64'
E/CRASH   (21413): Timestamp: 2020-01-28 21:16:59-0600
E/CRASH   (21413): pid: 21413, tid: 21470, name: RenderThread  >>> com.example.pocket <<<
E/CRASH   (21413): uid: 10475
E/CRASH   (21413): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
E/CRASH   (21413):     x0  0000000000000000  x1  00000000000053de  x2  0000000000000006  x3  0000000000000008
E/CRASH   (21413):     x4  feff71647164636d  x5  feff71647164636d  x6  feff71647164636d  x7  7f7f7f7f7f7f7f7f
E/CRASH   (21413):     x8  0000000000000083  x9  6782e839c0a15b6f  x10 0000000000000000  x11 fffffffc7ffffbdf
E/CRASH   (21413):     x12 0000000000000001  x13 ffffffffffffffff  x14 ffffffffff000000  x15 ffffffffffffffff
E/CRASH   (21413):     x16 00000078bd3242a8  x17 00000078bd245d34  x18 0000000000000010  x19 00000000000053a5
E/CRASH   (21413):     x20 00000000000053de  x21 0000000000000000  x22 0000007814f18588  x23 00000078bb075120
E/CRASH   (21413):     x24 00000078bb075060  x25 0000007814e1b000  x26 00000078be5e55e0  x27 0000000000000000
E/CRASH   (21413):     x28 0000000000000009  x29 0000007814f17d50
E/CRASH   (21413):     sp  0000007814f17d10  lr  00000078bd237394  pc  00000078bd2373bc
E/CRASH   (21413):
E/CRASH   (21413): backtrace:
E/CRASH   (21413):       #00 pc 00000000000223bc  /system/lib64/libc.so (abort+116) (BuildId: 530ce3aac3100ab48d4f30de4d7d6e59)
E/CRASH  (21413):       #01 pc 0000000000008644  /system/lib64/liblog.so (__android_log_bwrite) (BuildId: c76f103e29421b242cd1717ee824a508)
E/CRASH   (21413):       #02 pc 00000000000f71d8  /system/lib64/libhwui.so
E/CRASH   (21413):       #03 pc 000000000035f84c  /system/lib64/libhwui.so
E/CRASH   (21413):       #04 pc 0000000000368df0  /system/lib64/libhwui.so
E/CRASH   (21413):       #05 pc 000000000034c1a0  /system/lib64/libhwui.so
E/CRASH   (21413):       #06 pc 0000000000370494  /system/lib64/libhwui.so
E/CRASH  (21413):       #07 pc 00000000000100dc  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+284) (BuildId: 08cdb2d264f2aa73ec42c0510ad1d1da)
E/CRASH    (21413):       #08 pc 0000000000092efc  /system/lib64/libc.so (__pthread_start(void*)+36) (BuildId: 530ce3aac3100ab48d4f30de4d7d6e59)
E/CRASH  (21413):       #09 pc 0000000000023c78  /system/lib64/libc.so (__start_thread+68) (BuildId: 530ce3aac3100ab48d4f30de4d7d6e59)

Seems this was caused by my main application competing with the unity activity for layout. After setting my main application to force fullscreen, the issue went away.

Hello, I have the same problem. How do you “set main application to force fullscreen”?