Game crash on Android Lollipop

I have this game that used to work fine on my Android 4.4.2 phone.

Since I updated my phone to Android 5, the game no longer works. It crashes on start.

What’s weird is that it generates no log at all on the Android Device Monitor, filtering by the tags UE4|Debug. Other (not related to UE4) are there.

The device is an Asus Zenfone 5 (ASUS_T00J); Android version is 5.0. Using UE 4.8.3.

I have also tried changing NDK API Level to android-21.

[Here’s a version of the game][1], with NDK API Level set to android-21.

And [here’s another version of the game][2], with NDK API Level set to whatever the default was. This is the version that used to work on Android 4.4.2, before I updated my device to Android 5.

Cahoots — Ann Arbor tech coworking
[2]: Cahoots — Ann Arbor tech coworking

Hey ,

I was able to install both of these files you provided onto the Nexus 9 Android version 5.0. If you could please provide the from the ‘monitor.bat’ file from , that will be much better for us to sort through and figure out why it’s crashing.

Looking forward to hearing back from you, thanks!

Hey,

Just to clarify: I am also able to install the game, the problem is that it crashes upon starting.

[Here’s the full log][1] (no filters).

54088-log.txt (512 KB)

This is the error that you’re receiving when the game crashes on your device:

08-14 00:34:05.082: I/DEBUG(22153): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------

This looks like a driver crash in POWERVR_SGX544.

Basically, this is a GPU driver that’s crashing when your project is launching. Are you able to push this project to a different device? If not, are you able to see if regular blank, no starter content templates from UE4 are causing the same crash?

Thanks!

The only other device I have is another Zenfone 5, but still running Android 4.4.2.

A blank project (First Person BP, no starter content) works fine on the 4.4.2 phone, but still crashes on the 5.0 phone.

Here’s the [log][1] for the FirstPersonBP project on the 5.0 phone.

The project is called “deletemeeeee” if you wanna do a search. (I have too many projects here, gotta know which are safe to delete :stuck_out_tongue: )

54510-log.txt (538 KB)

I found an issue with Houdini with some versions of the NDK and version of Android. A fix is in for 4.9 as of yesterday and is now in 4.9 preview 4.

I built from source (4.9 branch, downloaded some 5h ago) and it’s still crashing on Android 5.0.

[Log][1]

54715-log.txt (43.2 KB)

To help rule out Houdini as the cause, please try building an APK for x86 instead of ARMv7 and see if it behaves the same. The crash dump shows it happening in the GPU driver but I was wondering if Houdini was contributing to the problem.

Huh how do I do that?

In Project settings → Android → Uncheck “support armv7” and check “support x86”, then package?

Nope, didn’t work. [Log][1]

That was a fresh C++ First person template, no starter content.

54859-log.txt (60.8 KB)

Ok, this gives us a better stack. Looks like it is happening in InitDebugContext calling glIsEnabled(GL_DEBUG_OUTPUT_KHR) in AndroidES31OpenGL.h. This is an attempt to run ES31?

If so, try replacing the call with bDebugContext = false; and see if you get past this. The driver may not understand this property.

If so, try replacing the call with bDebugContext = false;

Did you mean changing D:\UnrealEngine-4.9\Engine\Source\Runtime\OpenGLDrv\Private\Android\AndroidES31OpenGL.h? I changed to this:

	static FORCEINLINE void InitDebugContext()
	{
		//bDebugContext = glIsEnabled( GL_DEBUG_OUTPUT_KHR) != GL_FALSE;
		bDebugContext = false;
	}

Compiled and packaged the game again, and it’s still crashing. [Log][1]

Regarding the ES3 question… I think it should be running ES2… this is what my project settings looks like:

InitDebugContext() is empty for ES2. Try adding some logging messages in FPlatformOpenGLDevice::Init() in AndroidOpenGL.cpp:

FPlatformMisc::LowLevelOutputDebugString(TEXT("Before first InitDebugContext"));
InitDebugContext();
FPlatformMisc::LowLevelOutputDebugString(TEXT("After first InitDebugContext"));

etc.

It’s crashing on the first InitDebugContext:

08-20 16:38:05.339: D/UE4(1061): Before first InitDebugContext
08-20 16:38:05.339: E/IMGSRV(1061): debug.c:1336: Debug assertion failed!

[[Full log][1]][1]

I’ll try to run the game with VS debugger attached on the weekend (never done that before, don’t even know if it’s possible), to see if I can figure out where and why it’s crashing in InitDebugContext.

Other ideas are welcome :slight_smile:

55050-log.txt (69.3 KB)

InitDebugContext should be empty for ES2 (comes from FOpenGLBase in OpenGL.h). For sanity sake, throw some logging into this empty function and into AndroidES31OpenGL.h with a different message just to see if it somehow got there instead.

I put logging on those two places you suggested, and none of them were hit.

I also put on the beginning and ending of InitDebugDevice in OpenGLDevice.cpp. It printed only the “begin” one.

Ok, then try just returning at the beginning of InitDebugContext in OpenGLDevice.cpp… one of these calls likely doesn’t work on this driver. Possibly the GL_KHR_debug.

Hey ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you!

Sorry for the delay. Returning at the beginning of InitDebugContext OpenGLDevice.cpp solved the problem. The game ran fine on the same Android 5.0 phone. Thanks!

Now the question is, what’s wrong with it, and what to do to ensure it works without having to ignore that function call?