Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • 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
1
Question by jimbobuk · Dec 07, 2009 at 08:22 PM · editorcrashiphonedebug

Unity iPhone is crashing whilst running my game - how to debug?

I've just written some code and trying to test it using Unity Remote my new code is being triggered by a touch and then the entire Unity iPhone is stopping responding.

I have to force quit and restart it, thankfully the first time this happened most things were already saved.

I've started trying to add debug logs to see how far it gets before it crashes, though this is a little tedious as i can only see the last line output. Would prefer it if i could look at a text file of the log output. It's added to the console logs actually isn't it?

Anyways just wondered if anyone has seen this happen, any tips for things likely to crash it?

I do think it'd be nice if the play session could crash without taking down the entire editor but still i can appreciate how things could be getting a bit messy.

Thanks

Comment
Add comment · Show 1
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 equalsequals · Dec 07, 2009 at 08:33 PM 0
Share

What do you mean only one line? You mean the output that appears at the bottom left of the Unity window? Why don't you just hit shift+cmd+C to bring up the console window? That shows all your output using print or Debug.Log.

2 Replies

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

Answer by jimbobuk · Dec 07, 2009 at 08:34 PM

I managed to figure out where the crash was. An infinite loop caused by self recursion.

I'd still like to hear more expert advice on this but for anyone else, if you experience the entire program hanging then an infinite loop may be causing this. Something like this will cause it

void TestFunc()
{
  ...
  TestFunc();
}
Comment
Add comment · 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
0

Answer by Jaap Kreijkamp · Dec 09, 2009 at 03:10 AM

Yes, unity hangs if you create function that doesn't return. The same holds (and is trickier to find) for Coroutines, if a coroutine loops and never yield you're in big trouble as well.

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

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.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Using git on scripts - Why do i have to keep setting project permissions on launching unity? 1 Answer

How to get rid of the crash error in MonoDevelop 2 Answers

Debug.Log doesn't get called when Unity freezes? 2 Answers

How to stop editor from running a dead loop. 5 Answers

Debug.Log doesn't work properly in a ContextMenu function 3 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