Search Issue Tracker

Fixed in 2017.2.X

Votes

10

Found in

5.5.0f3

Issue ID

861008

Regression

No

Instantiating a UI prefab into another UI prefab crashes player

UI

-

Steps to reproduce:
1. Open attached project "prefab_instantiation.zip"
2. Open Build settings, add "test" scene and build WSA Universal 10 SDK (or any WSA SDK)
3. Open VS solution
4. Deploy on local machine
5. Press any key
Result: player crashes when trying to instantiate a UI prefab into another UI prefab: Assertion failed on expression: 'hierarchy.transformChangedMask[index] == 0

Reproducible with .NET and IL2CPP scripting backends

Reproducible with: 5.4.0f3, 5.4.3p3, 5.5.0p1, 5.6.0b1

Callstack:
UnityPlayer.dll!Transform::ValidateHierarchyRecursive(TransformHierarchy & hierarchy, int & hierarchyOrderIndex, int & nextIndex, int parentIndex, unsigned char * hasTransformBeenVisited) Line 1891 C++
UnityPlayer.dll!Transform::ValidateHierarchyRecursive(TransformHierarchy & hierarchy, int & hierarchyOrderIndex, int & nextIndex, int parentIndex, unsigned char * hasTransformBeenVisited) Line 1905 C++
UnityPlayer.dll!Transform::ValidateHierarchy(TransformHierarchy & hierarchy) Line 1850 C++
UnityPlayer.dll!CollectAndProduceGameObjectHierarchy(Transform & root, Transform * newParent, vector_map<int,int,std::less<int>,stl_allocator<std::pair<int,int>,1,16> > & remappedPtrs) Line 142 C++
UnityPlayer.dll!CollectAndProduceClonedIsland(Object & o, Transform * newFather, vector_map<int,int,std::less<int>,stl_allocator<std::pair<int,int>,1,16> > & remappedPtrs) Line 204 C++
UnityPlayer.dll!CloneObjectImpl(Object * object, Transform * newFather, vector_map<int,int,std::less<int>,stl_allocator<std::pair<int,int>,1,16> > & ptrs) Line 259 C++
UnityPlayer.dll!CloneObject(Object & inObject, Transform & newFather, bool worldPositionStays) Line 336 C++
UnityPlayer.dll!Object_CUSTOM_Internal_CloneSingleWithParent(void * data_, void * parent_, int worldPositionStays) Line 42 C++
UnityEngineDelegates.dll!_Object_CUSTOM_Internal_CloneSingleWithParent@16() Unknown
1ccde3a6() Unknown
[Frames below may be incorrect and/or missing]
1ccde288() Unknown
1ccde131() Unknown
1ccde0c1() Unknown
1ccde080() Unknown
1e54502d() Unknown
1e544fa2() Unknown
1c75a1a0() Unknown
003ed236() Unknown
UnityPlayer.dll!metro_invoke_method(ScriptingMethodDotNet method, WinRTScriptingObjectWrapper object, ScriptingArguments * arguments, WinRTScriptingObjectWrapper * exception, bool convertArgs) Line 66 C++
UnityPlayer.dll!scripting_method_invoke(ScriptingMethodDotNet method, WinRTScriptingObjectWrapper object, ScriptingArguments & arguments, WinRTScriptingObjectWrapper * exception, bool convertArgs) Line 802 C++
UnityPlayer.dll!ScriptingInvocation::Invoke(WinRTScriptingObjectWrapper * exception, bool convertArguments) Line 288 C++
UnityPlayer.dll!ScriptingInvocation::Invoke() Line 80 C++
UnityPlayer.dll!MonoBehaviour::CallMethodIfAvailable(int methodIndex) Line 462 C++
UnityPlayer.dll!MonoBehaviour::CallUpdateMethod(int methodIndex) Line 561 C++
UnityPlayer.dll!MonoBehaviour::Update() Line 566 C++
UnityPlayer.dll!BaseBehaviourManager::CommonUpdate<BehaviourManager>() Line 153 C++
UnityPlayer.dll!BehaviourManager::Update() Line 171 C++
UnityPlayer.dll!`InitPlayerLoopCallbacks'::`2'::UpdateScriptRunBehaviourUpdatestruct::Forward() Line 1501 C++
UnityPlayer.dll!PlayerLoop() Line 173 C++
UnityPlayer.dll!metro::MainLoop(bool performRendering) Line 202 C++
UnityPlayer.dll!UnityPlayer::AppCallbacks::DoPerformUpdateAndRender() Line 1306 C++
UnityPlayer.dll!UnityPlayer::AppCallbacks::PerformUpdateAndRender() Line 1262 C++
UnityPlayer.dll!UnityPlayer::AppCallbacks::_AppThreadImplementation(void * param) Line 180 C++
UnityPlayer.dll!UnityPlayer::AppCallbacks::_AppThread(void * param) Line 212 C++
UnityPlayer.dll!win32::CreateThread::__l2::<lambda>(Windows::Foundation::IAsyncAction ^ __formal) Line 276 C++
UnityPlayer.dll!Platform::Details::__abi_FunctorCapture<void <lambda>(Windows::Foundation::IAsyncAction ^),void,Windows::Foundation::IAsyncAction ^>::Invoke(Windows::Foundation::IAsyncAction ^ <__args_0>) Line 881 C++
UnityPlayer.dll!Windows::System::Threading::WorkItemHandler::Invoke(Windows::Foundation::IAsyncAction ^ __param0) C++
UnityPlayer.dll!Windows::System::Threading::WorkItemHandler::[Windows::System::Threading::WorkItemHandler::__abi_IDelegate]::__abi_Windows_System_Threading_WorkItemHandler___abi_IDelegate____abi_Invoke(Windows::Foundation::IAsyncAction ^ __param0) C++
threadpoolwinrt.dll!Windows::System::Threading::CThreadPoolWorkItem::CommonWorkCallback() Unknown
threadpoolwinrt.dll!Windows::System::Threading::CThreadPoolWorkItem::TimeSlicedCallback(void *) Unknown
kernel32.dll!@BaseThreadInitThunk@12() Unknown
ntdll.dll!__RtlUserThreadStart() Unknown
ntdll.dll!__RtlUserThreadStart@8() Unknown

Comments (6)

  1. v-stelee

    Jun 02, 2017 23:22

    Got this when compiling an app in HoloLens ... but only in debug build ...

  2. jyuMobius

    May 06, 2017 01:08

    Occurs when reparenting a Transform in Awake

  3. Thrawn666

    May 02, 2017 09:03

    Also happens in Windows Store 10 Universal build, but not in editor...

  4. rsahel

    Apr 04, 2017 16:34

    Same problem targeting for Hololens. Although it also happens when setting parent using transform.SetParent() in a Start() method. For now, the workaround is to put it in a Coroutine that executes the SetParent on the next frame.

  5. wouter_vugt

    Mar 28, 2017 09:04

    same here

  6. moz

    Jan 11, 2017 15:51

    Same problem targeting for hololens. Workaround is to instantiate without providing a transform parent and then setting it manually.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.