x


Stop Editor From Crashing

Is there any possible way to stop the editor from crashing anytime it receives an exception? It would be useful to just have the "game" crash - instead of having everything go down in flames. It makes debugging very difficult, since these errors are only thrown in unity and not in other test environments. Any ideas would be very helpful.

more ▼

asked Feb 09 '10 at 05:13 PM

azupko gravatar image

azupko
19 3 3 4

can you be a bit more specific on what kind of exceptions you are getting? Perhaps even throw in a few lines of stacktrace?

Feb 09 '10 at 06:56 PM Nicolaj Schweitz ♦♦

if you're in doubt how to find a stacktrace, look at this answer: http://answers.unity3d.com/questions/2252/how-can-i-find-editor-log-file. If Unity crashes, the Editor.log ends with a Stacktrace followed by some lines starting with "at". The stacktrace can help identify a problem in some cases.

Feb 15 '10 at 09:35 AM Nicolaj Schweitz ♦♦

You can also display a stack trace from your own code by using System.Environment.StackTrace (doesn't help on a crash, but might help in the process of narrowing down where the crash is occurring.)

Mar 03 '11 at 09:01 PM yoyo

@Nicolaj I noticed your link is now dead, that is the problem with linking to older questions/answer, they don't stay around for as long as the newer question

Aug 25 '11 at 12:27 PM sp00ks
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Do you get this message in the Console after starting Unity? If so, do what it suggests!

Your 64 bit Windows installation is missing an imporant service pack patch.
Please apply http://support.microsoft.com/kb/976038 to ensure stability.  
more ▼

answered Jun 19 '12 at 11:22 AM

Wolfram gravatar image

Wolfram
9k 8 20 52

No, i guess he's "producing" an exception that isn't handled in his game and that terminates the Unity editor when you test in the editor.

Usually all exceptions related to the Unity API are caught by Unity itself and displaying an error in the console. I guess he's using something from the .NET / Mono library that is quite sensitive against misuse like: Threads, FileIO, Networking / Sockets, other OS native code related things.

There is a small chance of a bug in Unity, but most the time it's a fault by the user ;)

Btw, this question is 2 years old and the OP wasn't online since then ... ^^

Jun 19 '12 at 12:03 PM Bunny83

Umh, must have clicked it in the "Related Questions" suggestions and then answered by instinct, sorry. It's confusing (but obviously intentional), that these usually refer to ancient questions.

Jun 19 '12 at 12:13 PM Wolfram

:) Well, unanswered, buried questions also deserve an answer ;) Otherwise it would make more sense to delete the whole question...

Jun 19 '12 at 06:10 PM Bunny83
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1949
x1673
x591
x510

asked: Feb 09 '10 at 05:13 PM

Seen: 2581 times

Last Updated: Jun 19 '12 at 06:10 PM