fix errors from unity editor crash logs or editor log

Sometimes unity will pop up some errors that really block your work. You can not figure out why and can not determine what the real situation is. And those errors are less documented and seem a bit random or very strange. For example:

  • Once you open the one project, the unity editor crash.
  • You successfully load with some projects, and no errors display in the console output. Now you try to run the app, a message display: “You must fix some errors before run the project”.
  • And so on.

Most those error can be fixed if you know how to find unity editor log or crash log, and identify something maybe suspicious.

i. Unity Editor Log

The first thing is unity editor log. Open it from Console -> Open Editor Log

This editor Log is very useful to find some assets errors warnings or some script errors. Not all script error or warnings will be display in console and clearly ask you fix before run it.

Error: Unity5 APIUpdater encountered some issues and was not able to finish. This message show but no errors display in console clearly.

To address this issue, ran the updater, then searched the editor log for “upgradable” or “UnityUpgradable”and manually fixed the issues. Because some the upgrade work can not be done automatically. You need to fix it by hand.

ii. Unity dump handler

With those crash dump files and error address, someone may find the right point with WIn64Debug. Well I am not good at assembly code debug, usually I would not do such debug stuff. Because most of time, those crash must be NULL Pointer error according to my previous c/c++ development experience. So I guess there must be some error in some assets, there are other ways to find the problem one. I will explain it later in this article. This method is much more efficient although it was labor costly.

iii. Event Viewer

Event Viewer is a Windows tool that can be accessed by simply searching “event viewer” The tool is essentially a unified log reader allowing you to view notable events that happened. The Event Viewer is a priceless tool for debugging application crashes that Unity just never caught.

The Event Viewer logs events that occur on the system, typically logging system services and application crashes. These crash logs can often contain information about what caused a crash that Unity may not detect in its logs.

Use the Event Viewer if your unity logs and crash reports are failing to provide any helpful information.

This tools not only works for unity, but also for others applications that run on windows.

iv. Running log

Those logs are AndroidStudio CatLog, or XCode console output. If you switch on il2cpp and use some dynamic create instance function, the error will display very clearly for you. Or if you not set up Admob correctly, you will face launch crash on device, a log will directly show what you should do.

v. Other but Unofficial

First backup your project or commit all your changed to the SVN repo, then exclude some assets by delete it. Those files are usually .unity sense, .asset file (project setting .asset files also included), and prefabs. Errors or unity crash may cause by upgrade unity version, unreadable prefabs, changes without intention. The removing and testing process is boring, but much efficient then debug with assembly code.

This process can be much easier if the project is managed by SVN. Update and check the version one by one will narrow the scope much quickly.