• 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 /
This question was closed Feb 17, 2015 at 04:31 PM by meat5000 for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by ThomasMarsh · Feb 15, 2015 at 05:00 PM · errorbugcrashfreeze

Unity freezes up completely without explanation

I have been having this strange issue. I had a slightly similar issue that was addressed in another question, and everything worked well for a couple days, but now this issue does not seem to be code related. Whenever one trigger collider collides with another trigger collider, Unity freezes entirely. I have commented out all code that referenced these two objects that are colliding. However, Unity still crashes.

I have also tried

  • Reinstalling Unity 4.6.2

  • Cleaning and Building my projects in Monodevelop

  • Disabling all scripts on the objects and referencing the objects

Update

With the help of @meat5000, we have determined that this issue does not occur for everyone, therefore, it is most likely an issue with my Unity Client.

Comment
Add comment · Show 16
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 ThomasMarsh · Feb 15, 2015 at 05:01 PM 0
Share

$$anonymous$$y previous question is located here: http://answers.unity3d.com/questions/892934/unity-crashes-when-ontriggerenter-occurs.html

However, I have commented out almost that entire script seen in the question but still freezing.

avatar image meat5000 ♦ · Feb 15, 2015 at 05:02 PM 0
Share

Using while loops?

Got NullRefs in console?

avatar image ThomasMarsh · Feb 15, 2015 at 05:03 PM 0
Share

No while loops at all in any code relating to the objects in question

Nothing is shown in console at all before crash.

avatar image meat5000 ♦ · Feb 15, 2015 at 05:05 PM 0
Share

It doesn't matter if they relate to the object, they could still halt the main loop.

avatar image ThomasMarsh · Feb 15, 2015 at 05:07 PM 0
Share

Everything else works fine; however, when my character walks into a certain trigger with no code (that isnt fully commented out) referencing it, Unity instantly freezes.

avatar image ThomasMarsh · Feb 15, 2015 at 05:16 PM 0
Share

I have even tried disabling the scripts and it does not fix the problem.

avatar image Mmmpies · Feb 15, 2015 at 05:47 PM 0
Share

@meat5000 is right a while loop sounds like a key candidate. Assu$$anonymous$$g you're using $$anonymous$$ono open a script so the project gets loaded and Search -> Find In Files and search the project for while statements.

FindWhile

At least you can rule it out if you find none.

findwhile.png (28.4 kB)
avatar image ThomasMarsh · Feb 16, 2015 at 09:34 PM 0
Share

alt text

triggerpartone.png (110.9 kB)
avatar image ThomasMarsh · Feb 16, 2015 at 09:35 PM 0
Share

alt text

triggerparttwo.png (416.4 kB)
avatar image InvincibleCat · Feb 16, 2015 at 10:11 PM 0
Share

Is Unity Freezing ? Like you can't use the editor ? Or is it just the game itself ?

avatar image Bonfire-Boy · Feb 17, 2015 at 12:30 AM 0
Share

Have you tried attaching a debugger? I've had a couple of editor crashes which I only managed to diagnose by attaching $$anonymous$$onodevelop.

avatar image Bonfire-Boy · Feb 17, 2015 at 01:14 AM 0
Share

Can you explain the update a bit more? "we have deter$$anonymous$$ed that the issue only occurs for my Unity client"... does this mean only in your editor (ie meat5000 has the project too and the issue doesn't arise). Or that you only see it in a build and not in the editor? Or something else? I guess it's the use of the word "client" that's confusing me here.

avatar image meat5000 ♦ · Feb 17, 2015 at 02:48 PM 0
Share

Yes, I downloaded the project and found no such error when I ran it.

avatar image ThomasMarsh · Feb 17, 2015 at 02:54 PM 0
Share

When I run the game and the triggers meet, the program becomes unresponsive and I am forced to do a forced shutdown of Unity.

avatar image ThomasMarsh · Feb 17, 2015 at 03:03 PM 0
Share

I just did another fresh, straight from Unity website, install of Unity as well as $$anonymous$$onodevelop. Did not help at all.

avatar image meat5000 ♦ · Feb 17, 2015 at 03:49 PM 0
Share

Ok. I advise you to locate your editor log and read it after a crash. It should contain useful information.

Try the suggestions here and P$$anonymous$$'d.

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by meat5000 · Feb 17, 2015 at 03:08 PM

You are getting MissingComponentException trying to access the non-existent renderer of the camera.

These errors and NullRefs have be known alone to make Unity grind to a halt.

In conjunction with OnTriggerStay, a function to be avoided, this could be the problem.

Comment
Add comment · Show 5 · 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 ThomasMarsh · Feb 17, 2015 at 03:13 PM 0
Share

The script that you refer to has worked for me in the past. Why would the camera not have a renderer? Also the OnTriggerStay function is used in the Unity S$$anonymous$$lth project, which is what I redesigned for my AI system.

avatar image meat5000 ♦ · Feb 17, 2015 at 03:15 PM 0
Share

The player/enemy has a renderer, because you want to see it. Access that ins$$anonymous$$d.

The camera will have to contain a renderer if you want to see it. But I suspect you dont.

Stay is there to be used, but you've got to be careful with it.

Expensive operations should really be avoided within it.

Your tris and draw calls are pretty high indeed. I must admit, my PC eats it for breakfast.

What are your computer specs?

avatar image ThomasMarsh · Feb 17, 2015 at 03:48 PM 0
Share

I have yet to optimize anything yet, I am also having an issue lightmapping which is one of main performance killers. I have a pretty high quality PC as well, 12 GB RA$$anonymous$$ and GeForce GTX 860$$anonymous$$, Intel i7 Processor.

avatar image ThomasMarsh · Feb 17, 2015 at 03:56 PM 0
Share

It was the renderer part. I disabled that section of code, as I do not need to implement it yet anyways, and now it works. Thanks!

avatar image meat5000 ♦ · Feb 17, 2015 at 04:18 PM 0
Share

I knew we'd get there in the end ;)

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

23 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

Related Questions

Are coroutines freezing my game? 0 Answers

Stop Editor From Crashing 1 Answer

Crash in build when reloading level with a Sprite Renderer in the scene 0 Answers

How do I report a bug in Unity? 2 Answers

After Unity Crash Camera RenderTexture 0 Alpha 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