Android app crashes on launch

Hello, my app crashes on launch. I tried removing everything from the scene but it still crashes.

This only happens on one of my Android devices. [79299-out.txt|79299]Runs fine on the others.

I ran adb logcat and I get the attached log file.

The last thing reported before the crash is:

ANativeWindow: (1440/2560) RequestedResolution: (0/0) EGLSurface: (1440/2560)
[EGL] Unable to acquire context: EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
(Filename: ./Runtime/GfxDevice/egl/WindowContextEGL.cpp Line: 250)

When I search the web it says this should be fixed. My version of Unity is 5.4.0f3

Thanks,
–Mike

This may not be related but here is my experience on same issue and how I SOLVED it.

While working on my game, I deleted Facebook SDK from my game because I couldn’t make FB.AppRequest function work on my game. My game was building and working just fine before I deleted FB SDK but soon after that my app crashed on launch even before the splash screen. Using ABD tool, I found that my apk is still looking for some facebook related assets or things.

So I started looking for anything that still looks for facebook sdk assets and found facebook related code on androidManifest.xml at Assets>Plugins>Android. Once I deleted the code, my app ran just fine on my device.

Hope this will be of any help.

Thanks

I found the source of the crash.

We checked “Protect Graphics Memory” in Player Settings.

On some Androids this is not supported so the app just crashes.

This was extremely hard to narrow down!!

See: Unity - Scripting API: PlayerSettings.protectGraphicsMemory

It crashes before the splash screen for me

Did you upgrade this project from an earlier version by chance? It looks like the upgrade tool sometimes strips out sharers and makes them return null.