Unity3D Fatal Error on Startup Workaround

This morning starting up Unity 5.1.0 greeted me with the following message and a blank project selection window (I have unity configured to ask me which project to load on startup)

Fatal error!
GetManagerFromContext: pointer to object of manager ‘(null)’ is NULL (table index 5)

Update

Confirmation from Unity that this is a bug in the updater and they have now disabled this server side checking for versions 5.1.0f3 – 5.1.1f1 so hopefully that’s the last we see of it!

Solution

Many thanks to @Rusty_Bolt on twitter who tweeted to suggest switching WiFi/Internet off which lead me to the following steps. Switching WiFi off would indeed allow unity to start, however after quitting and starting again if WiFi was on (usually is!) it would crash again.

  1. Switch your internet connection off
  2. Load Unity and select a project
  3. Switch your internet connection on
  4. Now within Unity load a new project via File->OpenProject
  5. Quit unity

Hopefully now when you start unity everything is back to normal!

Other things I tried

As part of trying to track this down I tried the following, none of which helped.

  • Delete all unity settings from ~/Library/Preferences
  • Delete my Unity license file from Library/Application Support/PACE Anti-Piracy/License Files see link
  • Moved all of my unity projects to a different location to ensure they were not involved
  • Deleted Unity
  • Installed Unity

Unity3D Canvas Render Order Anomalies

I’m posting this here just so that other’s who experience similar issues know they are not alone and that there is indeed an issue within Unity. (Reported as Issue 707375)

The following occurred in Unity 4.6 and the current 5.1.1f however it did not occur in 5.0. Update: This is now fixed in Unity 5.1.2, thanks Unity!

I’ve spotted in a few different locations in projects that just occasionally, often for a frame or two in an animation a canvas image will flicker. On further inspection it is evident that the item in question gets rendered at the wrong time.

I’ve not been able to determine exactly what causes the issue as usually it’s in quite a complex scene and as soon as I start to edit it the issue goes away. However I have now created a simple test scene which shows up the issue.

Here’s the simple scene a screen space canvas (the bug occurs in other modes too) with red, white and blue Image components being rendered in that order as expected:

Screenshot_062515_011848_PM

Now all I do is add 7 Image components before these and bang the blue image component is now rendered before the white one.

Screenshot_062515_011740_PM

If I add an extra component or delete any of them the bug goes away. Of note the bug does reappear when there are more components in the scene, this scene started off life with 100’s of images in a complex hierarchy and I slowly removed components to get to this simplified version. During this process the sorting order would change but I have not managed to get the issue with anything simpler than this.

You can download this test project here: TestROrder5

I also have another scene which I have not managed to simplify (yet) which has a hierarchy of images which have their scale animated via Unity’s animation system, their active state is not changed and during 2-3 frames of a 50s animation a couple of images render before they should, disappearing behind something.