Android game crashing when Google Play services enabled

Hello Triblade,

After further testing, it appears that your APK has an issue. I tested this issue with the provided project (RABBiT) and my APK appears to be working.

OK, so to clarify: It originally wasn’t a problem with our projects, and this new fix does correct something, but there’s a second issue, that is now only present in our projects?

If so, any idea what the issue is now? Or any pointers as to where we can look?

I should note that all of the testing that I have done has been with the Samsung S5. You will also need the commit below along with the commit that was mentioned above for the solution that was given for the jira I wrote up.

https://github.com/EpicGames/UnrealEngine/commit/6f7dc7e12a4c62cbc00e68460324af99a3def1bd

In order to narrow things down further, I would need you to reproduce this issue in a clean project. This would also help determine if this is project specific.

Additional information (Android Device Compatibility):

Hey,

Samsung S5 was the phone I mentioned that someone claimed had an issue, but seemed to be cleared up along the way. So I’m not sure it’s even showing the same problem.

Tonight I made that change you suggested to UE4DeployAndroid.cs (I presume it’s safe to make only that change, and avoid the need to update the entire engine from 4.11.P2?). Trying a shipping build on the Alcatel, it still crashed. I’m in the middle of exporting various shipping builds with different android settings to see if anything fixes the problem, but it’s going to take me a while. I’ll let you know if anything comes of that.

But I’m 99% sure this isn’t project specific. Remember we have two projects that exhibit this crash: One built in 4.6 and updated to 4.10. The other built in 4.9 and updated to 4.11, which was then rebuilt from scratch in 4.11 (which is the one you have). So technically three projects. To be fair, I have no way to test the other project with this version of the engine (unless the changes you mentioned above are in UE4.11.P3 on the launcher - in which case let me know and I’ll grab it, update the other project and let you know the results).

But in order to test it with a new project I’m going to have to duplicate the engine, make a new project, hook up the show external logic UI, create a store key, create a placeholder set of game services, build and upload a shipping build to the store to enable the services properly… and I’m willing to be it’ll still crash. And even if it doesn’t, we’d still be no closer to knowing what’s wrong with our other two projects.

OK, I have some new information about this - it’s not related to the Google Play Services sign in at ALL.

Doing some testing on a bunch of different things last night / this morning, trying to get a build that worked (nothing did - I tried every combination of Android settings I can think of), I occasionally did manage to sign in (it has always been possible ~1/5 times) and get into the game proper (at which point, everything’s fine and you can play the game for as long as you want).

UNTIL you try access the achievements. Or you lock the phone and then unlock it again. Or anything else that takes rendering away from the game. You can browse the achievements list for 3-4 minutes, going in and out of sub panels, but the second you close the panel: Crash.

I went back to an older build of the other project and confirmed that, yes, you can lock the phone as many times as you like and it won’t crash. So something changed in 4.10 that causes this problem.

Hello Triblade,

Additional questions:

  1. Would it be possible for you to provide a list of all the devices that you know of that are experiencing this issue as well as the devices at your disposal for testing?
  2. Out of the devices that you have, which ones are reproducing this issue?
  3. Are you sure that this is the same issue that was originally reported for this thread?
  4. Could you provide an updated version of your project to insure that we end up with the same results?
  1. We haven’t have any new confirmations since before Christmas. So the list remains the same for now.

We have a Galaxy Nexus, a LG G4 and a Samsung Galaxy Tab4. And then of course, the recently acquired Alcatel Pixi.

  1. Just the Alcatel Pixi - as you know, we purchased this device explicitly to test this issue, as none of the devices we had were exhibiting it.

  2. No, I’ve got no idea. If it’s not the same issue, they’re exhibiting extremely similar behaviours.

  3. Yup, I’ll send you a copy to you on the forum.

Hello Triblade,

After doing a bit of digging I was unable to find a similar device (to the Alcatel Pixi) on our end to run the test with. Provide the logs from the device from when the crash occurs?

Here’s a logcat log of the crash upon going into the achievements window.Crash Log

Hi Rudy,

Did the crash log help highlight the issue at all?

After taking a look at the logs it appears as though a lot of the useful information had been stripped out could you try the steps below to grab the logs I need?

  1. adb logcat -c
  2. adb logcat >log.txt
  3. launch your game and wait until after the crash and dismiss any error dialog and end it running in background
  4. ctrl-C to stop logging

I followed the steps you suggested above and have attached the output log: link text

Note, there’s two instances of this crash in there: 1) Attempting to sign into Google Play initially and 2) Once sign-in is successful, attempting to view the achievements window.

Also, yesterday we finally managed to roll out an updated open BETA of RABBiT and, by coincidence, I bumped into the guy with the Wiko Highway Signs phone in the pub. Early this morning he kindly grabbed the latest build and tried signing in and it still crashed.

He also clarified that, actually, he’s never attempted to actually sign in - and has always just cancelled the sign-in request dialog (he doesn’t have a Google Play account). So that confirms it’s displaying any external window and then returning to the game and is not specifically tied to signing into the Google Play services.

Any updates on this?

The error that caught my attention was the following:

F/libc (23452): Fatal signal 11 (SIGSEGV) at 0x00000009 (code=1), thread 23469 (arch_worker)

I/DEBUG (23718): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000009

Signal 11 is a segmentation fault. It means that the program is trying to access memory it doesn’t have permission to. so i believe it’s going to come down to the gpu chip. Do you have any other versions of your game for lower end phones?

I don’t really understand the question. A different version of the game? Our game’s about as low end as a unreal mobile game could be. Not to mention the game works fine on the affected devices as long as you don’t bring up any external windows (e.g. the google play sign in). And we know it worked on 4.9 without issues.

It really seems like you guys need to get hold of one of these devices and witness this crash for yourself.

Any updates on this?

It’s been two months now since we flagged it and it’s still blocking us from releasing our games.

Hello Triblade,

We are still testing this issue on several devices and we have not been able to reproduce the crash that you are seeing on your end. If at all possible now that you have a device that reproduces the crash, could you try and reproduce this issue in a clean project? If you are successful in doing so, could you provide the steps needed to reproduce this issue on our end? This would go along way in helping narrow down what issue it is that you are experiencing(please include screen shots of any blueprint/code).

I’ve already explained it’s not localised to a single project (we’ve seen it on three different ones, built in three different ways), but to prove the point, I’ll play along.

I’ve NO idea what the minimum steps are for getting the Google Play Sign in to occur, so this took me a lot of effort to reproduce and I had to do it over two projects to try and get it down to the minimum number of steps (I could probably get it down further, but I’m not going to - this is ultimately pointless). I’ve also listed everything I did here in detail, just so there’s no doubt it’s not a project issue:

ATTEMPT 1

  • Updated UE 4.10 to 4.10.4 (Figured I may as well do this on the latest hot fix)

  • Made a new project called “CrashTest” (Blueprint || Blank || Mobile / Tablet || Scalable 3D or 2D || No Starter Content)

  • Went to Google Play Console | Google Play Console

  • Added a New Application

  • Named it “Crash Test” and choose “Prepare Store Listing”

  • Switched to Game Services.

  • Added a new game. Named it “Crash Test”; Made it an action game; Hit Continue.

  • Grabbed the services ID.

  • Went to the UE4 project settings:

  • Went to the ‘Android’ sub section.

  • Hit ‘Configure Now’ at the top.

  • Hit ‘Configure Now’ in the middle.

  • Checked ‘Enable Google Play Support’.

  • Added the services ID.

  • Open the level blueprint:

  • After ‘OnBeginPlay’ added the ‘ShowExternalLoginUI’ node (hooked in GetPlayerController(0) to this).

  • Compiled; Saved as ‘MainLevel.umap’ in the root of Content.

  • Went to File → Package Project → Android → Android ETC1 (Choose CrashTest->Build as the destination).

  • Navigated to CrashTest->Build->Android_ETC1. Ran Install_CrashTest_Development-armv7-es2.bat

Ran fine, didn’t crash - But no Google Sign in displayed. (CON’T)

Continued:

  • Went to project settings → ‘Packaging’ → Switched to a shipping build.

  • Went to File → Package Project → Android → Android ETC1.

  • Navigated to CrashTest->Build->Android_ETC1. Ran Install_CrashTest_Shipping-armv7-es2.bat

Same as before.

  • Went back to the Google Play Developer console:

  • Switched to ‘All Applications’. Chose ‘Crash Test’.

  • Switched to the ‘APK’ sub section.

  • Switched to BETA testing. Chose ‘Update your first APK to Beta’.

  • Chose the Shipping APK.

This failed, as it’s a debugging APK.

  • Returned to the project settings:

  • Changed the ‘Packaging’ subsection.

  • Checked ‘For Distribution’.

  • Generated a new Android signing key (keytool -genkey -v -keystore CrashTest.keystore -alias CrashTest -keyalg RSA -keysize 2048 -validity 10000).

  • Followed the instructions.

  • Moved CrashTest.keystore to CrashTest->Build->Android.

  • Returned to Project Settings:

  • Switched to the ‘Android’ subsection.

  • Filled out the ‘Distribution Signing’ section.

  • Went to File → Package Project → Android → Android ETC1.

  • Returned to the Google Play Developer console:

  • Uploaded the new .APK to BETA.

  • Switched to the ‘Game Services’ subsection.

  • Switched to ‘Linked Apps’

  • Added ‘com.YourCompany.CrashTest’ to the package name.

  • Hit ‘Save and Continue’.

  • Hit ‘Authorize your app now’.

  • Hit ‘Confirm’ on the ‘Create Android OAuth Client’ dialog.

  • Navigated to CrashTest->Build->Android_ETC1. Ran Install_CrashTest_Shipping-armv7-es2.bat

Still no sign in screen. (CON’T)