• 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
0
Question by Lukas77i · Aug 02, 2010 at 08:31 AM · buildcrashiphone

iPhone game turns off unexpectedly

Hi,

Lately I've come across a really strange behaviour in my game. I have been trying to debug it for a few days now but I still can solve this.

I'm using XCode 3.1.4 and publishing 2.2.1 build for compatibility reasons.

The problem is:

When I run the build on my iPod Touch 2nd gen 8gb (3.1.3), the game turns on and when it get to loading the main menu it just turns off, unexpectedly. Sometimes, it does load it and sometimes not. Same happens for loading my main scene( when I manage go get to that point).

I tried removing objects from my scenes, cutting down on side by removing audio, etc. Yet I still can not get to the cause. I also tried restarting my iPod touch but it doesn't seem to help either.

If someone had the same experience or know what the cause is, please let me know.

NOTE: everything works absolutely fine in the unity iPhone editor.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by spinaljack · Aug 02, 2010 at 11:37 AM

Your game is probably using too much RAM, if it goes over 25MB there's a chance that the device will simply stop the process depending on what other programs are running, which might explain the randomness of the cut outs. Other than compressing every sound file and texture you have you can also try not to maintain pointers to objects and store as few variables as possible.

Also removing debug symbols and using code stripping if you haven't already will help, removing unused libraries and frameworks will save you some memory.

If you're sure you're well under the safe memory limit then there might be exceptions in your game. The device doesn't handle exceptions so check through your code with a fine tooth comb.

Comment
Add comment · Show 3 · 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 Lukas77i · Aug 02, 2010 at 11:40 AM 0
Share

Ok thanks, but one more thing. What if I add a very small loading scene between the memory consu$$anonymous$$g big scenes?

avatar image spinaljack · Aug 02, 2010 at 11:55 AM 0
Share

Loading scenes is a very slow process on iPhone so it'll be very noticeable and it wouldn't have much effect in solving your problem.

avatar image Lukas77i · Aug 02, 2010 at 12:18 PM 0
Share

Oh man! Solved it!!! You were absolutely correct that "literally" loading a big scene with a loading scene is slow. I think I found another way.

I created a "Fake" loading scene with just one "Loading image" and a script that yields for 2 secs and then loads the next big scene.

$$anonymous$$y game doesn't just turns off anymore so that's perfect.

Thanks for your help, I really appreciate it.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Distribute terrain in zones 3 Answers

Problem when building to development iPhone 1 Answer

Unity Build Crashes Once Characters Touches Ground 0 Answers

Command line builds for iOS - pro only? 0 Answers

Unity iPhone - App Deployment Help 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