• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by Madarina · Jun 08, 2013 at 10:04 AM · androidcrash

Unity Android game crashes when reopened from the home screen.

Hello,

Our game is ready or not really ready for Android.

When I play the game and I hit the home button, I get to the android main screen and the app is minimized. If I go to all running apps (holding home button) I can return to my game and continue playing without any trouble. The problem is if I leave the app with home button and then i want to return to my app by clicking my game icon in android menu or "desktop".

Then the app crashes. The same things happen to big titles like Subway Surfers or Bad Piggies.

What is the problem here?

Thank you!

Peter

Comment

People who like this

0 Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image mandop · Jun 11, 2013 at 10:54 AM 0
Share

Could you provide the crash log? We may have the same issue.

avatar image Psymon · Jun 11, 2013 at 01:40 PM 0
Share

Things like this can happen when your game needs a lot of VRAM. When you go back to home, your phone reallocate some VRAM to make the Desktop appear and if the amount of VRAM is not enough, Android kill your application. That's maybe why your app restart

avatar image younity · Jun 13, 2013 at 02:35 AM 0
Share

we are experiencing the same problem here, any insight about this? is it really like how Psymon speculated, vram problem?

avatar image stevethorne · Jan 15, 2014 at 02:19 PM 0
Share

Any luck with this issue? Running into the same problem.

avatar image CORPSEGRINDER · Feb 06, 2014 at 08:22 AM 0
Share

Really need an answer to this issue because I think it's a critical bug. A lot of our users are complaining because when somebody calls them and decides to continue playing by clicking the icon, it crashes.

Show more comments

3 Replies

  • Sort: 
avatar image

Answer by trs9556 · Jun 13, 2013 at 03:26 AM

Maybe it is your device? I have ported to Android and I do NOT have this issue. Once I click the home button I can access my app by clicking the app icon or by clicking the little thumbnail preview when holding down the home button (in the "recent apps" view).

I ran a few tests, I can click the home button, open a new app, close that app, open yet another app, close that one, turn the screen off on my phone, wait 3 minutes, turn my screen on, then resume my app by clicking it's icon.

To be more specific: -My app was opened, started a new game and played for about 2 minutes [Hit the home button] -The first app I opened was open for about 5 minutes, and I closed out of it by hitting the back button till it closed. -The second app was open for about 1 minute and I clicked the home button instead of closing out. -Turned off screen for about 3 minutes -Turned screen on, waiting about 30 seconds -Clicked my app icon on my home screen -App was 100% where I left off. No crash, no reloading, just resumed.

My android device I tested this on was the Samsung Galaxy S3. I built my apk as a developer build and turned on script debugging.

My app uses ~140mb of RAM in this specific example.

Comment

People who like this

0 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Madarina · Jun 13, 2013 at 08:26 AM 0
Share

Hello, thank you for all your answers but I think I steel cant identify my true problem. This thing happens on many of our test devices, but it does not happen every time. And when it has its "period" of doing such crashes, it repeats with other unity games too (bad piggies, subway surfers). This happens to those games even when my game is not running or is not installed on the device, so I dont think it causes other apps to crash. Sometimes I can run tests for hour and wont get the crash, but when it crashes it can crash 4-5 times in a row. The unpredictable nature of the crash is really weird. I guess it must really be the RAM thing, since it happens on all devices and on many apps and not every time.

I'll paste crash log later when I remove my apps data from it. Thank you,

Peter

avatar image

Answer by codistan · May 20, 2017 at 08:58 AM

@Madarina did you find a solution to the problem?

In my case the app always crashes when running in background and opened through app icon. However, works fine when accessed through recent apps screen.

Here is my log, unfortunately doesn't tell much.

 05-17 12:44:17.824   780  1391 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.google.android.googlequicksearchbox/com.google.android.launcher.GEL} from uid 10019 on display 0
 05-17 12:44:24.988   780   791 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=pk.codistan.madhunt/com.google.firebase.MessagingUnityPlayerActivity (has extras)} from uid 10021 on display 0
 05-17 12:44:25.058   780  1476 W ActivityManager:   Force finishing activity pk.codistan.madhunt/com.google.firebase.MessagingUnityPlayerActivity
 05-17 12:44:25.569   780   793 W ActivityManager: Activity pause timeout for ActivityRecord{45b3d9f u0 pk.codistan.madhunt/com.google.firebase.MessagingUnityPlayerActivity t2165 f}
 05-17 12:44:28.364   780  1476 I ActivityManager: Process pk.codistan.madhunt (pid 29359) has died
 05-17 12:44:28.364   780  1476 D ActivityManager: cleanUpApplicationRecord -- 29359
 05-17 12:44:28.364   780  1476 W ActivityManager: Scheduling restart of crashed service pk.codistan.madhunt/com.onesignal.SyncService in 1000ms
 05-17 12:44:29.383   780   793 I ActivityManager: Start proc 30817:pk.codistan.madhunt/u0a225 for service pk.codistan.madhunt/com.onesignal.SyncService
 
Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by harrismak4 · May 22, 2017 at 07:28 AM

if it is developer build then you can launch it once, second time it will not launch from icon again.

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Android app crashing on startup 5 Answers

How to use Android native video player instead of unity player 0 Answers

Application not running on Samsung Galaxy Tab 3 1 Answer

Android Apps freezing, if in background i9000 2.3.3 1 Answer

Build for VR for Android crashes immediately, log shows NullPointerException 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges