Android Game freezes after a few seconds of launch

Just as the title says. The game freezes after a few seconds when playing.

I am using a Motorola Moto G 2nd generation running Android 4.4.4.

Hey LoN,

Are UE4 templates also freezing on your mobile device after launching? Does the freezing happen from a packaged version of your game or from a simple launch of your project onto the device? You should also find a similar file path as this: C:\android-sdk-windows\tools and run ‘Monitor.bat’ and watch your Android devices performance.

Looking forward to hearing back from you, thanks!

Yes, this also happens when i play tappy chicken and paper 2D after i deployed them to my phone.

I have no idea what you mean by " a packaged version of your game" please enlighten me on this.

The games freeze after some seconds of play on my phone.

I didn’t know about the Monitor.bat, i’ll check it out.

Thanks replying.

Are you clicking ‘Launch’ when you deploy the game to your phone or are you going to File > Packaged Project > Android?

What did the Monitor.bat show you?

Yes, i clicked “Launch”. I am not sure of what i should search for in the “Monitor.bat” but here is the log. I opened the game called “Android_01” at the bottom of the log.

[link text][1]

52758-log.txt (618 KB)

Could you please try to go to ‘File’ > ‘Package Project’ > ‘Android’ and then package it for ‘Android All’ or ‘Android ETC1’? Once you’ve done that, with the device still installed, could you run the .bat file and install the game onto your device and let me know if it lags or freezes?

Thank you!

Here is the UE4 log of the “Android All” packaging.

When i instal it and open it it says “No play store key. No OBB found and no store key to try to download.Please set one up in Android Project Settings.”

I press exit and then the screen stays black and nothing happens.

HEre is also the log of the monitor.bat

[link text][1]

[link text][2]

52785-ue4log.txt (879 KB)
[2]: 52786-log-2.txt (638 KB)

Hey,

This is the error found within your :

08-04 17:54:16.595: D/UE4(7638): Checking for file : main.1.com.YourCompany.Android_01.obb 08-04 17:54:16.596: D/UE4(7638): which is really being resolved to : /storage/emulated/0/Android/obb/com.YourCompany.Android_01/main.1.com.YourCompany.Android_01.obb 08-04 17:54:16.596: D/UE4(7638): Or : /storage/emulated/0/obb/com.YourCompany.Android_01/main.1.com.YourCompany.Android_01.obb 08-04 17:54:16.598: D/UE4(7638): ... Whoops... missing; go go go download system!

It looks like you may not have ran the batch (.bat) file from your packaged folder? Could you please run that and see if it corrects the issue you’re running in to. If not, could you try package game data in apk.

Please let us know if this helps, or if you have any further questions. Thank you and have a wonderful day! :slight_smile:

I did run this .bat file

It fixed the problem for all the unreal projects i had in my phone. but after some use of the phone in other tasks the games froze again.

When i rebooted the device this got fixed but after a while it happened again. And right now i am stuck again with all the unreal projects freezing.

Are you able to test this out on any other device? If so, could you please tell me if the project freezes up on you or no? If you’re not able to try on another device, please zip your whole project folder up and provide a link to me so that I have the exact same settings that you’re attempting.

Thank you!

I am not able to test it on another device so here is the project folder.

https://www…com/s/fq2gb2lsecs4py5/Android_01.rar?dl=0

Thanks a lot for helping me!

Hey LoN,

I’m in UE 4.8.3 and have tested your project on a . The game did not lag once while tapping and the number continued to go up. I also went ahead and added it to a Samsung Galaxy s5 and I did not receive any lagging either.

Is this the exact project that you’ve been installing on your device?

Thanks!

Hey,

It’s been quite a while since I last heard from you and for that reason, I must mark this thread as resolved. However, if you run into any further troubles with this specific issue, please feel free to reply back here and we will assist you further.

Have a great day!

Yes, this is it. but tappy chicken and any other project i install on my device from unreal 4 freezes too.

Hey LoN,

So I’ve taken another look over your , it looks as though your OBB file is missing.

08-04 17:54:16.595: D/UE4(7638): Checking for file : main.1.com.YourCompany.Android_01.obb
08-04 17:54:16.596: D/UE4(7638): which is really being resolved to : /storage/emulated/0/Android/obb/com.YourCompany.Android_01/main.1.com.YourCompany.Android_01.obb
08-04 17:54:16.596: D/UE4(7638):  Or : /storage/emulated/0/obb/com.YourCompany.Android_01/main.1.com.YourCompany.Android_01.obb
08-04 17:54:16.598: D/UE4(7638): ... Whoops... missing; go go go download system!

If the OBB is missing or has changed, it will need to be replaced otherwise it’ll try to download it again. That may be part of the issue you’re running into.

Let us know if replacing the OBB fixes the issue, or if 4.9 Preview 4 has helped too.

Thanks!

Hey ,

I have no idea what the OBB is and how to change it.

When i test it in 4.9 i’ll let you know.

But is the OBB also the problem in tappy chicken?

LoN,

I’ve spoken with our Android Developer and he’s more concerned with what’s actually running on your device. We see multiple ‘Failure removing stale classloader’ errors in your , which typically mean something else is in the background causing these issues you’re experiencing with your device.

Here is an example of the stale classloader, there is more to these errors than what is posted below, you’ll need to look further into [your ][1]:

08-04 17:46:04.124: E/ActivityThread(4838): Failure removing stale classloader
08-04 17:46:04.124: E/ActivityThread(4838): java.lang.NullPointerException
08-04 17:46:04.124: E/ActivityThread(4838): 	at android.app.ActivityThread.handleDispatchPackageBroadcast(ActivityThread.java:4089)
08-04 17:46:04.124: E/ActivityThread(4838): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
08-04 17:46:04.124: E/ActivityThread(4838): 	at android.os.Handler.dispatchMessage(Handler.java:102)
08-04 17:46:04.124: E/ActivityThread(4838): 	at android.os.Looper.loop(Looper.java:136)
08-04 17:46:04.124: E/ActivityThread(4838): 	at android.app.ActivityThread.main(ActivityThread.java:5097)
08-04 17:46:04.124: E/ActivityThread(4838): 	at java.lang.reflect.Method.invokeNative(Native Method)
08-04 17:46:04.124: E/ActivityThread(4838): 	at java.lang.reflect.Method.invoke(Method.java:515)
08-04 17:46:04.124: E/ActivityThread(4838): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
08-04 17:46:04.124: E/ActivityThread(4838): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
08-04 17:46:04.124: E/ActivityThread(4838): 	at dalvik.system.NativeStart.main(Native Method)
08-04 17:46:04.124: E/ActivityThread(8058): Failure removing stale classloader
08-04 17:46:04.124: E/ActivityThread(8058): java.lang.NullPointerException
08-04 17:46:04.124: E/ActivityThread(8058): 	at android.app.ActivityThread.handleDispatchPackageBroadcast(ActivityThread.java:4089)
08-04 17:46:04.124: E/ActivityThread(8058): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
08-04 17:46:04.124: E/ActivityThread(8058): 	at android.os.Handler.dispatchMessage(Handler.java:102)
08-04 17:46:04.124: E/ActivityThread(8058): 	at android.os.Looper.loop(Looper.java:136)
08-04 17:46:04.124: E/ActivityThread(8058): 	at android.app.ActivityThread.main(ActivityThread.java:5097)
08-04 17:46:04.124: E/ActivityThread(8058): 	at java.lang.reflect.Method.invokeNative(Native Method)
08-04 17:46:04.124: E/ActivityThread(8058): 	at java.lang.reflect.Method.invoke(Method.java:515)
08-04 17:46:04.124: E/ActivityThread(8058): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
08-04 17:46:04.124: E/ActivityThread(8058): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
08-04 17:46:04.124: E/ActivityThread(8058): 	at dalvik.system.NativeStart.main(Native Method)
08-04 17:46:04.127: E/ActivityThread(3122): Failure removing stale classloader
08-04 17:46:04.127: E/ActivityThread(3122): java.lang.NullPointerException
08-04 17:46:04.127: E/ActivityThread(3122): 	at android.app.ActivityThread.handleDispatchPackageBroadcast(ActivityThread.java:4089)
08-04 17:46:04.127: E/ActivityThread(3122): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
08-04 17:46:04.127: E/ActivityThread(3122): 	at android.os.Handler.dispatchMessage(Handler.java:102)
08-04 17:46:04.127: E/ActivityThread(3122): 	at android.os.Looper.loop(Looper.java:136)
08-04 17:46:04.127: E/ActivityThread(3122): 	at android.app.ActivityThread.main(ActivityThread.java:5097)
08-04 17:46:04.127: E/ActivityThread(3122): 	at java.lang.reflect.Method.invokeNative(Native Method)
08-04 17:46:04.127: E/ActivityThread(3122): 	at java.lang.reflect.Method.invoke(Method.java:515)
08-04 17:46:04.127: E/ActivityThread(3122): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
08-04 17:46:04.127: E/ActivityThread(3122): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
08-04 17:46:04.127: E/ActivityThread(3122): 	at dalvik.system.NativeStart.main(Native Method)

52786-log-2.txt (638 KB)

Thanks about that. but i have no idea of what it might be.

What should i do ?

You’re going to need to research your phone a bit more and figure out what all is running on your device. At this point in time, we believe that there is some other program running on your phone that is causing these issues, or perhaps even a driver.

If you have evidence that it is in fact a UE4 project that’s causing the issue, please provide a detailed message back to us with .

Thanks!

Thanks, i’ll check it out. The only thing that is strange though is that only apps made with unreal 4 have this behaviour.