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
3
Question by Foxmanx_7 · May 20, 2010 at 10:43 PM · freezestacktraceconcurrency

Unity freezes with deadlocks.

We are working with a project in unity, and are having some problems with dead locks, but we have no way to debug it, i tried to start another thread to access the stack trace of the unity's thread after it freezes, but in this version of mono the stack trace methods are not implemented. I tried several debug programs like windbg, but all these programs just get stack trace of the proccess system calls. Any sugestions on some way to debug this? There's some way of get the current unity's thread stacktrace after it freezes??

Comment
Add comment · Show 5
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 duck ♦♦ · May 21, 2010 at 11:25 AM 1
Share

is it really a deadlock? (i.e. two threads waiting on locks that the other is respectively holding) or is it just that you've accidentally created a tight infinite loop?

avatar image Foxmanx_7 · May 21, 2010 at 05:24 PM 1
Share

it's not an infinite loop, the process stay with 0% of processor use.

avatar image Lucas Meijer 1 ♦♦ · May 22, 2010 at 10:26 PM 0
Share

What makes you think this is a deadlock? are you talking about a deadlock in your own code, or a deadlock in Unity's code? Can you be more specific on exactly what you are doing, and what the exact results are you are seeing, and how those differ from what you expect. thnx

avatar image jonas-echterhoff ♦♦ · May 23, 2010 at 02:02 PM 0
Share

Why are stack trace methods not implemented in this version of mono? In what version of mono? They should always work in the mono implementation, which runs in the Unity editor.

avatar image yoyo · Mar 03, 2011 at 09:00 PM 0
Share

You can get a stack trace with System.Environment.StackTrace -- this doesn't really help on the freeze itself, but might help in tracking it down.

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Dreamora · May 24, 2010 at 01:29 AM

When it freezes it has commonly not crashed so you don't get stack traces.

Once it crashes though it will write the according stack trace to the log file (in the editor to the current one, once you reopen the editor it will be renamed to become the -prev one)

Without knowing what you are doing in general its hard to impossible to offer suggestions on what might be the cause as there are quite a few possibilities. As you added the concurrency tag you should potentially be warned that threads in Mono 1.2.5 aren't that stable and also its important to keep in mind that Unity 2 is not threadsafe so if you have any threading in there ensure to not touch anything create thats not part of System (including the "Object" class which unless specified differently, normally is UnityEngine.Object)

Comment
Add comment · Show 2 · 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 Foxmanx_7 · May 25, 2010 at 07:28 PM 0
Share

Debugging i discovered that the problem occurs inside the Instantiate method, specially when instantiating a lot of gameobjects in a row (not that many, around 10 objects). Any sugestions? i am out of ideas here.

avatar image Mike 3 · May 28, 2010 at 12:35 PM 0
Share

without seeing the code i don't think guessing will help - instantiating doesn't deadlock if it's done synchronously

avatar image
0

Answer by Foxmanx_7 · May 27, 2010 at 03:22 PM

Sorry wrong answer. (Question instead answer)

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

Why APK freezes at start of game level? 0 Answers

Windows Forms freezes Unity game 1 Answer

OnTriggerEnter2D first collision causes lag/freeze 1 Answer

Unity creates up to 25 threads / freezes after building project. 1 Answer

Objects moving despite everything being removed 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