Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 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 /
  • Help Room /
avatar image
1
Question by victor410165 · Dec 05, 2019 at 11:56 AM · unityeditorplaymodehang

Unity Editor got hang after clicking play

Let me explain my scenario first. Recently, due to some known issues, my team decided to upgrade our unity firebase SDK to 6.7. The former one was 6.0. However, we found that on Firebase SDK 6.7, it wouldn't support editor sign in with P12 key anymore. Hence, we turned to use the same signIn method as android. At first, it works fine. But we found that after playing for an hour in editor mode, when you restart the play mode(press to leave 'play' and press to start 'play'), the editor gets hang forever. I have created a dump and had a basic analysis on it. However, I could not go any further. So I came here for help.

Here is my analysis:

  • I try to know which thread got stuck so long. I use windbg to get the lasting time of each threads. alt text

  • After that, I try to see the call stack of thread 4a74, which is like below. alt text

  • I found that it hangs because unity wants to unloadDomain. Hence, I start to check the mono open source to see what had happened.

  • It seems like that mono_domain_try_unload would fork a thread to call unload_thread_main, which I also found the thread in my dump(I can't put any more picture due to limitation). Then I check what does that thread do. It seems like it would like to finalize monoDomain. However, it just waits there forever.

    Here are some bizarre things about my findings.

  • I found that unload_thread_main only last for less than 1 seconds in my dump. It is not like what I expected.

  • The issue only happened after I upgraded my firebase SDK to 6.7 and I have tested with SDK 6.0. It works fine.

  • As mentioned above, I need to play in editor for about an hour. I think this may have some relation with FIrebase id token refresh

    Here are my questions.

  • What is monoDomain?

  • Why gc monoDomain causes my editor hang?

  • Is this relative to firebase SDK?

  • If so, is that because unity could not garbage collect firebase SDK?

  • What should I do now...


I post this question here because my threads got hanged on unity call stack. Hope it is the right place to ask the question. BTW, I have tested Unity with 2018.4.4f and 2018.4.13f.

Thanks in advance.

callstack.png (65.6 kB)
runaway.png (10.8 kB)
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
0

Answer by dstrongman · Apr 08, 2020 at 04:57 PM

Hi! You can read some about domain reloading here DomainReloading I have a same issue with editor that's hang on play button. After researching and decompiling Firebase.Editor.dll, I was find out what it uses [InitializeOnLoad] on some classes and every time when you push play button executes heavy code for ios, android platform dependencies resolving. You can just try temporarily remove this dll - and see the project will run faster! Try to contact with firebase team, open issue, etc...

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

226 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 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 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 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 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 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 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 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 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 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 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

Weird error appearing after playing in editor? 0 Answers

Trying to set scene object variables in MenuItem editor script and start playing 0 Answers

Editor hangs (freezes) after pressing play. Possible loop? Have to force quit. 1 Answer

Cancel quit before stop in Editor Playmode 1 Answer

Need Invert vertexcolors pasted unity-chan 2.0 shader 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