Build crashes with 5.1.0p1 (AnimatorStateMachine problem)

Hi folks.

I’m having a crash each time I build my app (iOS and Android) with the latest editor version 5.1.0p1.
Seems like an animation controller is broken or something? Has anyone seem such a problem yet?

Here’s the log entry for the crash:

Receiving unhandled NULL exception
Launching bug reporter
Obtained 42 stack frames.
#0  0x000001018f2ae7 in AnimatorStateMachine::ExtractDependenciesFromGraph(dynamic_array<PPtr<Object>, 4ul>&)
#1  0x0000010210d40c in void AnimatorController::TransferRuntimeDataFromEditorForBuild<RemapPPtrTransfer>(RemapPPtrTransfer&)
#2  0x0000010210d16d in void AnimatorController::TransferRuntimeData<RemapPPtrTransfer>(RemapPPtrTransfer&)
#3  0x0000010210d091 in void AnimatorController::Transfer<RemapPPtrTransfer>(RemapPPtrTransfer&)
#4  0x000001018b2420 in DependencyTreeCollector::GenerateInstanceID(int, TransferMetaFlags)
#5  0x000001018ad09d in CompileGameResourceManagerDependencies(std::string const&, int, BuildTargetPlatform, std::map<int, BuildAsset, std::less<int>, std::allocator<std::pair<int const, BuildAsset> > >&, std::set<ClassType, std::less<ClassType>, std::allocator<ClassType> >&, BuildUsageTagGlobal&, std::set<std::string, std::less<std::string>, std::allocator<std::string> >&, bool)
#6  0x0000010189d096 in BuildPlayerData(BuildTargetPlatform, BuildPlayerOptions, std::vector<UnityStr, std::allocator<UnityStr> >, AssetBundleBuildData*, std::string const&, MonoObject*, Vector2f, unsigned int*)
#7  0x0000010189777e in DoBuildPlayer(BuildPlayerSetup&)
#8  0x00000101894a91 in BuildPlayer(BuildPlayerSetup&)
#9  0x00000102320fbf in BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck(MonoArray*, ICallString, BuildTargetPlatform, BuildPlayerOptions, unsigned char, unsigned int*)
#10 0x00000121fde9ca in  (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,UnityEditor.BuildTarget,UnityEditor.BuildOptions,bool,uint&) + 0xca (0x121fde900 0x121fde9f9) [0x113786330 - Unity Child Domain]
#11 0x00000121fdd3c0 in  UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings (bool,UnityEditor.BuildOptions,bool) + 0x16c0 (0x121fdbd00 0x121fdd413) [0x113786330 - Unity Child Domain]
#12 0x00000121fdbcda in  UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings (bool,UnityEditor.BuildOptions) + 0x5a (0x121fdbc80 0x121fdbce9) [0x113786330 - Unity Child Domain]
#13 0x00000121fda1b2 in  UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.BuildPlayerWindow/BuildPlatform) + 0x452 (0x121fd9d60 0x121fda354) [0x113786330 - Unity Child Domain]
#14 0x0000011670e312 in  UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings () + 0x3622 (0x11670acf0 0x11670e454) [0x113786330 - Unity Child Domain]
#15 0x000001165e7791 in  UnityEditor.BuildPlayerWindow:OnGUI () + 0x981 (0x1165e6e10 0x1165e7924) [0x113786330 - Unity Child Domain]
#16 0x0000010aba84ea in  (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) + 0xfa (0x10aba83f0 0x10aba861d) [0x113786330 - Unity Child Domain]
#17 0x00000109c408e4 in mono_get_runtime_build_info
#18 0x00000109d64a57 in mono_runtime_invoke
#19 0x00000109d6a749 in mono_runtime_invoke_array
#20 0x00000109d2a07e in mono_register_jit_icall
#21 0x0000012e172263 in  (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) + 0x103 (0x12e172160 0x12e172292) [0x113786330 - Unity Child Domain]
#22 0x0000012e1716bc in  System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) + 0x52c (0x12e171190 0x12e17182f) [0x113786330 - Unity Child Domain]
#23 0x0000012e17dd46 in  System.Reflection.MethodBase:Invoke (object,object[]) + 0x66 (0x12e17dce0 0x12e17dd55) [0x113786330 - Unity Child Domain]
#24 0x0000012e35914d in  UnityEditor.HostView:Invoke (string,object) + 0xbd (0x12e359090 0x12e359171) [0x113786330 - Unity Child Domain]
#25 0x0000012e359050 in  UnityEditor.HostView:Invoke (string) + 0x60 (0x12e358ff0 0x12e359074) [0x113786330 - Unity Child Domain]
#26 0x000001165e4087 in  UnityEditor.HostView:OnGUI () + 0x257 (0x1165e3e30 0x1165e41e9) [0x113786330 - Unity Child Domain]
#27 0x0000010aba84ea in  (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) + 0xfa (0x10aba83f0 0x10aba861d) [0x113786330 - Unity Child Domain]
#28 0x00000109c408e4 in mono_get_runtime_build_info
#29 0x00000109d64a57 in mono_runtime_invoke
#30 0x000001010e3aa7 in ScriptingInvocationNoArgs::Invoke(MonoException**)
#31 0x000001010c0608 in MonoBehaviour::smile:oGUI(MonoBehaviour::GUILayoutType, int)
#32 0x00000101c88ef0 in GUIView::OnInputEvent(InputEvent&)
#33 0x00000101c8981a in -[GUIOpenGLView mouseUp:]
#34 0x007fff85cfc145 in -[NSWindow sendEvent:]
#35 0x007fff85c9d5d4 in -[NSApplication sendEvent:]
#36 0x00000101c943b1 in -[EditorApplicationPrincipalClass sendEvent:]
#37 0x007fff85aed9f9 in -[NSApplication run]
#38 0x007fff85ad8783 in NSApplicationMain
#39 0x00000101c94a96 in EditorMain(int, char const**)
#40 0x00000101c952e9 in main
#41 0x00000100001c24 in start
Launching external process: /Applications/Unity5.1.0p1/Unity.app/Contents/BugReporter/Unity Bug Reporter.app/Contents/MacOS/unity.bugreporter.exe

Many thanks for help!

Hi, please use the bug reporting system, we will then be able to investigate the issue for you.

@karl_jones Already done: http://fogbugz.unity3d.com/default.asp?704939_msinnlgmuv8kebaq :slight_smile:

I hoped somebody else maybe had the same problem already.

@karl_jones Any updates on this one? It currently hinders our testers to test the release candidates.

Hi.
The URL you were sent when you reported the bug will have any updates, from what I can see it is currently with our QA team who will verify the bug and then pass it to the relevant team to fix.
Are you able to roll back to 5.0 whilst you wait?
Does the error occur in 5.1.0f3 (the official release)?

From the editor log that you attached to the ticket I can see “Receiving unhandled NULL exception”.
Check that you have no null objects in your code, I can see several warnings about objects being defaulted to null, such as:
Assets/Scripts/GamePlay/WorldMap/SNSWorldMapBanner.cs(59,23): warning CS0649: Field SNSWorldMapBanner.avatar' is never assigned to, and will always have its default value null’

Hey.

The problem also occurs with 5.1.0f3 (we tried the patch version only after that). I’ll check that worldmapbanner tomorrow again, but afaik we haven’t changed anything to it since the last successful build.

I can try to roll back to 5.0 if I don’t find anything there.

Thanks for the help!

I checked the null refs in our project, they are harmless. Most of them are generated by the compiler, as it seems not to understand that the references are set via the inspector.

I’ll try to roll back to 5.0 today. Hopefully it solves the problem.

@karl_jones I spend most of the time to roll back to 5.0.1p4 and the build is created with that version (sadly some other features are not working anymore). So I can confirm that it is related to 5.1.0f3 / 5.1.0p1.

I’ll try to update to 5.1.1 and will update the ticket for you guys. Hope you can find the bug soon.

Sadly 5.1.1f1 has the same problem, so no luck with that :frowning: