Why does my Android app crash on open?

I have successfully built, packaged, and deployed my android app to my Samsung Galaxy S2. However, when I open the app to test it on the phone, it will show my splash screen for about 10 seconds, then just exit out without any errors to the phone screen or anything. A few more bits of specific info:

  • Deployment settings: Android-Multi, Development
  • Phone: Galaxy S2 running Android 2.3.6
  • Runs TappyChicken just fine
  • Able to deploy and play a blank 2D sidescroller without crash (although the graphics were a little messed up)
  • Game works perfectly in the editor, as well as when I package it for windows 32 and 64 bit

I’ve attached the logcat I was able to generate from when I opened the app to after the crash.
Any help or guidance would be greatly appreciated.

Edit 1

Should probably make some of the logcat visible for those who would search their errors. I tried to isolate where I thought the area of interest was.

D/UE4     (30987): Signal 11 caught!

D/UE4     (30987): [2016.04.09-23.43.25:388][  0]LogEngine:Error: 

D/UE4     (30987): libUE4.so!ADPCM::DecodeBlockStereo(unsigned char const*, unsigned char const*, int, short*) 

D/UE4     (30987): libUE4.so!FADPCMAudioInfo::DecodeStereoData(unsigned char*, bool, unsigned int) 

D/UE4     (30987): libUE4.so!FADPCMAudioInfo::ReadCompressedData(unsigned char*, bool, unsigned int) 

D/UE4     (30987): libUE4.so!FAsyncAudioDecompressWorker::DoWork() 

D/UE4     (30987): libUE4.so!FAsyncTask<FAsyncAudioDecompressWorker>::DoWork() 

D/UE4     (30987): libUE4.so!FAsyncTask<FAsyncAudioDecompressWorker>::DoThreadedWork() 

D/UE4     (30987): libUE4.so!FQueuedThread::Run() 

D/UE4     (30987): libUE4.so!FRunnableThreadPThread::Run() 

D/UE4     (30987): libUE4.so!FRunnableThreadPThread::_ThreadProc(void*) 

D/UE4     (30987): libc.so!__thread_entry() 

D/UE4     (30987): libc.so!pthread_create() 

The issue you are seeing shouldn’t happen in the final 4.11 release. Are you running an earlier preview instead? Looking at the log I see sections from earlier preview (the libcurl and openssl are old, for example).

I had downloaded the “release” branch off Github late February. If that Github folder contained a preview-version at that time, then I guess so!

After re-downloading and setting up the “release” version of UE4, deleting temporary project files, and re-deploying the project onto my device, I am still getting the exact same logcat error lines.

Okay, this may be a bad data issue. The DecodeBlockStereo() is in Engine\Source\Runtime\Engine\Private\AudioDecompress.cpp.

You can also look at the Android Project Settings for your project at the Audio encoding setting in the Data Cooker section and try Vorbis instead.

I re-deployed it after switching the Audio encoding to “Ogg Vorbis” as suggested, and those specific errors went away. However, the app still catches a signal 11 and crashes. I’ve extracted and condensed all of the warnings and errors thrown in the logcat in the attached file.

The shader warnings can be ignored in this case; the engine is testing to see which shader modifications are needed for the driver on the device to work. There wasn’t anything after the signal 11?

Nope. It crashes immediately after and stops writing to the log.

EDIT: at least the UE4 outputs. Should I filter the log to look for anything else?

Look for a callstack in the unfiltered log after the signal 11.

Are you using a source build or the launcher? If you are working with source you can try commenting out “FPlatformMisc::SetCrashHandler(EngineCrashHandler);” in AndroidJNI.cpp and see if you get a more complete crash report.

I’m using the source build. I commented out that line in that folder, and ran it again. There are now quite a few “I/Debug”, however no lines containing “callstack”.

Something I did find though was the interesting line: “debuggerd committing suicide to free the zombie!”. Doesn’t sound too good.

attach the log and I’ll see if I see anything.

Alright thank you, I really appreciate the help.

Below is the important part, but unfortunately it seems to indicate the crash occurs in the crash handler trying to show the stack:

D/UE4     (24042): Signal 11 caught!
I/DEBUG   (20311):          #00  pc 00016468  /system/lib/libc.so (__libc_android_abort)
I/DEBUG   (20311):          #01  pc 00014684  /system/lib/libc.so (dlmalloc)
I/DEBUG   (20311):          #02  pc 00014b18  /system/lib/libc.so (dlrealloc)
I/DEBUG   (20311):          #03  pc 00014d96  /system/lib/libc.so (realloc)
I/DEBUG   (20311):          #04  pc 000517bc  /data/data/com.WW.RumRunners1/lib/libgnustl_shared.so (d_growable_string_callback_adapter)
I/DEBUG   (20311):          #05  pc 00058de0  /data/data/com.WW.RumRunners1/lib/libgnustl_shared.so (d_demangle_callback.constprop.16)
I/DEBUG   (20311):          #06  pc 00058f50  /data/data/com.WW.RumRunners1/lib/libgnustl_shared.so (__cxa_demangle)
I/DEBUG   (20311):          #07  pc 0158edbc  /data/data/com.WW.RumRunners1/lib/libUE4.so (_ZN25FAndroidPlatformStackWalk26ProgramCounterToSymbolInfoEyR25FProgramCounterSymbolInfo)
I/DEBUG   (20311):          #08  pc 015e86ac  /data/data/com.WW.RumRunners1/lib/libUE4.so (_ZN25FGenericPlatformStackWalk16StackWalkAndDumpEPcjiPv)
I/DEBUG   (20311):          #09  pc 01547540  /data/data/com.WW.RumRunners1/lib/libUE4.so (_Z18EngineCrashHandlerRK20FGenericCrashContext)
I/DEBUG   (20311):          #10  pc 01586dfc  /data/data/com.WW.RumRunners1/lib/libUE4.so (_Z20PlatformCrashHandleriP7siginfoPv)
I/DEBUG   (20311): 
I/DEBUG   (20311): libc base address: afd00000

I’m not sure where you are hitting the issue from this.

Okay I was able to reconfigure some settings and eliminate the “signal 11 caught” line. I also got what seems to be a “stack” from I/DEBUG.

I can get past the splash screen now, and I see my main menu for about 1 second before it crashes.

Ok, it looks like the Buffer->AudioData is null:

FAILED OPENSL BUFFER Enqueue SL_PlayerBufferQueue 0x0 params( 0x0, 3386880)

This is likely from FSLESSoundSource::EnqueuePCMBuffer() called by FSLESSoundSource::Init() in AndroidAudioSource.cpp. Seems to be a problem with ThemeMusic1.

Okay so after removing those sound cues as well as all of the references to them, the app did not crash. Would you say that it was originally due to a bad sound file? Or something like a bad conversion to a UAsset from an mp3?

Again thank you so much for your help.

Yes, a bad sound file import is likely.

this is a bug. android projects crash after splash screen due to using sound at all. it does not related to the sound file import. this is a bug for 4.11 and