I’m having a strange issue with my project in Unity 5.5.0p3
I can switch platforms between Mac Standalone and IOS without any issues.
I can also build from these platforms which then runs OK on my Mac and iPhone.
However, if I try to import any Asset into my project I get a crash every time when compiling.
This is a sample of the log entries around when it crashes:
Platform assembly: /Applications/Unity 5.5.0p3/Unity 5.5.0p3.app/Contents/PlaybackEngines/macstandalonesupport/UnityEditor.OSXStandalone.Extensions.dll (this message is harmless)
Loading /Applications/Unity 5.5.0p3/Unity 5.5.0p3.app/Contents/PlaybackEngines/macstandalonesupport/UnityEditor.OSXStandalone.Extensions.dll into Unity Child Domain
Non platform assembly: /Applications/Unity 5.5.0p3/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll (this message is harmless)
Loading /Applications/Unity 5.5.0p3/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll into Unity Child Domain
Non platform assembly: /Applications/Unity 5.5.0p3/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Common.dll (this message is harmless)
Loading /Applications/Unity 5.5.0p3/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Common.dll into Unity Child Domain
metadata.c:887: assertion ‘index < meta->heap_strings.size’ failed
metadata.c:887: assertion ‘index < meta->heap_strings.size’ failed
metadata.c:887: assertion ‘index < meta->heap_strings.size’ failed
metadata.c:915: assertion ‘index < meta->heap_blob.size’ failed
metadata.c:915: assertion ‘index < meta->heap_blob.size’ failed
metadata.c:915: assertion ‘index < meta->heap_blob.size’ failed
metadata.c:887: assertion ‘index < meta->heap_strings.size’ failed
metadata.c:887: assertion ‘index < meta->heap_strings.size’ failed
metadata.c:915: assertion ‘index < meta->heap_blob.size’ failed
The following assembly referenced from /Users/user/Unity-RAD_Rally/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll could not be loaded:
Assembly: (assemblyref_index=3)
Version: 25970.29806.29779.29793
Public Key: 0907d8af90186095
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/Users/user/Unity-RAD_Rally/Library/ScriptAssemblies/).
I then get plenty of “Could not load file TypeLoadException” and “The class … could not be loaded, used in …” errors - hundreds of them.
Once it gets into this state I have to kill Unity. If I then delete the Asset I just imported from the Asset Store (together with its .meta files), and also delete Library/ScriptAssemblies it compiles OK and I’m back with what appears to be a usable project.
If I then manually create a C# Script from the project view, Unity compiles OK and does not seem to have the same issue. If I edit any of my existing scripts Unity compiles OK.
It would therefore appear to be isolated to an issue with Importing new assets, and the subsequent compilation of the imported scripts.
I have only noticed this after upgrading from 5.5.0p2 to 5.5.0p3. This project is also pretty big (20GB+) so unfortunately there is no way I’m going to be able to upload it easily with a bug report.
I have submitted bug case 865933 with the Editor Log as an attachment.
Any help would be really appreciated, thanks!
UPDATE 1 - I have tried doing a full uninstall/reinstall of Unity - still has the same issue. Have also tried deleting Library/metadata - this rebuilds OK however the same issue exists when I go to import any new Assets/C# scripts - Unity crashes with the same metadata.c errors.
I have confirmed the issue is only with this project - if I take another existing project and import an Asset Unity compiles OK - no issues at all.
Deleting the entire Library folder also does not fix this issue - it still ends up with the exact same errors.
UPDATE 2 - managed to reproduce this every time importing uNature, yet AltTrees System imports OK. Thought it might therefore have something to do with corrupt meta information coming from the Cache Server, however after disabling the Cache Server and deleting the Library/metadata folder it still ends up crashing in the same way.