Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
5
Question by georgem85 · Apr 17, 2012 at 01:47 AM · ioscollidercrashipadphysx

iOS (iPad1) CRASH caused by Mesh.Bake PHYSX CollisionData

Hi! I have a very annoying issue in iOS. Currently I'm developing a game with extensive use of physics. The game is very particular, and really needs to have in a scene a big mesh with a "Mesh Collider" attached. Everything works fine on almost all the iOS platforms (from 3GS to iPad3), but sometimes I have a crash when loading my scenes. I tried enabling and disabling almost everything (from algorithms, to game objects), and finally I figured out that my crash was caused for the following instruction: Mesh.Bake PhysX CollisionData

This instruction was executed when my mesh with the mesh collider became activated in the scene. I tried both keep activated in the scene from the beginning the game object, and activating it with certain delay with no luck.

Also, al tried all the tricks detailed in the following link, but none of them works: http://forum.unity3d.com/threads/65346-What-is-quot-Bake-Scaled-Mesh-Physx-Collision-Data-quot

Also, I tried enabling the option "Generate Colliders" in the FBXImporter, and nothing.

Please, someone knows how to avoid the Mesh Collision Data to be calculated in runtime?

One more thing: when the MeshCollider is enabled, the mentioned instruction takes about 20 seconds to be completed in iPad 1 (causing the crash). When the collider is disabled, the scene loads as usual (loading level async doesn't make any difference).

Thanks for your time.

George

alt text

Screen Shot 2012-04-16 at 10.40.17 PM.png (55.2 kB)
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 cregox · Apr 19, 2013 at 08:50 PM 0
Share

On Unity4, when I've used the first script on the following thread, I got exactly this issue (`$$anonymous$$esh.Bake PhysX CollisionData`). I've fixed it along the thread, with a new code. Basically, I believe, I just removed the mesh from a global scope, thus recreating from zero after each iteration. $$anonymous$$aybe the point is: trying to remake a mesh can lead to collisiondata somehow. http://forum.unity3d.com/threads/14378-Raycast-without-colliders

2 Replies

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

Answer by ricardo_arango · Apr 17, 2012 at 02:21 PM

Currently (3.5.x) we calculate the Mesh Collision Data always at load time. There is no way to avoid that.

In your case I can think of four reasons why this is happening:

  1. The application runs out of memory. You can determine this by looking at the Crash report. If it doesn't contain a callstack it is an out of memory error : https://developer.apple.com/library/ios/#technotes/tn2008/tn2151.html.

  2. The Mesh is too big and Physx processes it for too long, locking the UI and triggering the ios watchdog timeout that will kill your app. (also documented in the previous link)

  3. The Mesh is malformed in some way and is causing pathological behaviour from the collision data calculation.

  4. A bug in Unity.

For cases 1 and 2 I suggest you test breaking the mesh into smaller meshes. If that doesn't resolve the problem then we would like to investigate this. You can send us a bug report following the instructions found here: http://answers.unity3d.com/questions/9292/how-do-i-report-a-bug-in-unity.html

Comment
Add comment · 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 georgem85 · Apr 18, 2012 at 02:14 PM 0
Share

Thank's for your quick answer Ricardo, it was very useful. Here are my comments:

  • About avoiding to calculate the $$anonymous$$esh Collision Data... these are bad news :-P So, what optimization gives you to enable the option "Generate Colliders" in the FBXImporter?

  1. Confirmed! the application use too much memory and...

  2. ... seems that when the ios watchdog timeout was triggered (caused by the mesh processing) makes the memory crash "more possible". It was completely confirmed by the "low memory" logs (thank you for the documentation recommended).

  3. $$anonymous$$esh is Ok.

  4. Hope it is not! :-P

We have optimized several $$anonymous$$B of texture memory and now we are dividing the mesh mentioned. We have already implemented a kind of "scene loader" and activating the game objects one by one through the updates. As soon as we have the results of the tests I'm going to give you the results :-)

Thanks

avatar image
0

Answer by georgem85 · Apr 20, 2012 at 02:03 AM

Ricardo, Too much better now! We were able to successful split the mesh and now the scenes load without freezing the execution of the game :-). This change, and several texture optimizations, allow us to have almost no more memory crashes in iPod Touch 4. Still we have minor issues in iPad, but your confirmation of how Mesh collider data was processed, help us to know were we have to tweak.

Thanks!

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

6 People are following this question.

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

Related Questions

[iOS Memory Question] At ~35MB of memory on a heavily multitasked iPhone4/iPad we are getting suspend-crashes after lowmemory warnings. Is there anything we can do? 1 Answer

Full FPS For iPad? 2 Answers

iPad: Line Renderer causes crash on on startup 0 Answers

Line Renderer causes crash on iPad on Startup 0 Answers

App crashing in one iPad and running ok in another 0 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