Assertion failed: InSkeletalMesh->RefSkeleton.GetNum() == OutComponentSpaceTransforms.Num()

Hi guys,
so i just finished upgrading to 4.18 (from 4.16) and now i am running into a mayor issue. every time i set skeleton mesh it crashes my engine

i am not sure if this is multiplayer related (i am running a multiplayer only game)

engine crash message :

Assertion failed: InSkeletalMesh->RefSkeleton.GetNum() == OutComponentSpaceTransforms.Num() [File:D:\Build\++UE4+Release-4.18+Compile\Sync\Engine\Source\Runtime\Engine\Private\Components\SkeletalMeshComponent.cpp] [Line: 1233]

UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:414]
UE4Editor_Engine!USkeletalMeshComponent::FillComponentSpaceTransforms() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:1243]
UE4Editor_Engine!USkeletalMeshComponent::InitAnim() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:611]
UE4Editor_Engine!USkeletalMeshComponent::SetSkeletalMesh() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:2204]
UE4Editor_Engine!USkinnedMeshComponent::execSetSkeletalMesh() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\classes\components\skinnedmeshcomponent.h:185]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:4515]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:732]
UE4Editor_CoreUObject!UObject::ProcessContextOpcode() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2167]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:954]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:856]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:954]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:856]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:954]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:856]
UE4Editor_CoreUObject!UObject::ProcessContextOpcode() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2167]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:954]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:856]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:954]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:856]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:954]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:4515]
UE4Editor_CoreUObject!UObject::ProcessEvent() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1314]
UE4Editor_Engine!AActor::ProcessEvent() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\actor.cpp:693]
UE4Editor_Engine!FLatentActionManager::TickLatentActionForObject() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\latentactionmanager.cpp:186]
UE4Editor_Engine!FLatentActionManager::ProcessLatentActions() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\latentactionmanager.cpp:94]
UE4Editor_Engine!AActor::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\actor.cpp:899]
UE4Editor_Engine!APlayerController::TickActor() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\playercontroller.cpp:4345]
UE4Editor_Engine!FActorTickFunction::ExecuteTick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\actor.cpp:132]
UE4Editor_Engine!FTickFunctionTask::DoTask() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:273]
UE4Editor_Engine!TGraphTask<FTickFunctionTask>::ExecuteTask() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:784]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:651]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:560]
UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:1330]
UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:542]
UE4Editor_Engine!FTickTaskManager::RunTickGroup() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:1454]
UE4Editor_Engine!UWorld::RunTickGroup() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:760]
UE4Editor_Engine!UWorld::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:1408]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\editor\unrealed\private\editorengine.cpp:1659]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:396]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3296]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
kernel32
ntdll

Hi,

Did you upgrade directly from 4.16 to 4.18, or did you convert the project up 1 engine version at a time? If you do one at a time this will help sort which version the issue is in. There were a lot of heavy changes since 4.16. Also, where are you setting the skeletal mesh? Can you give me the exact steps that you are taking to get this to happen?

-Thank you

Hi Ridley,

so i build directly from 4.16 to 4.18.

  • i will try doing it 1 version at a time in the next few days ( i never upgraded to 4.17 becouse plugin issues)

please bare with me becouse my system is kinda complicated, it realy need some cleaning done :wink:

when i hit play (pie) i recieve info of the player from my backend database then

In my PlayerController i spawn my Player actor , then i posses it. after this i call an event
https://gyazo.com/0efe3f9dbc2051caddfef49fef95c740

in this event i make use of a data base response , i create a array from this string, and i execute a event on my player

this event runs on the server, its going to search a datatable for a item with the name , here i get the reference to the skeletanmesh part i want to set. i put this one in an array (array is put on repnotify)

in the on rep i check what array index changed , and then update that one (setting skeletal mesh)

Hi,

What plugins do you have enabled? Because that is something to keep in consideration as well, especially if it experimental. Even so, it may be easier to fix errors as you move forward versions. If you can send me your logs, I can take a look at them.

-Thank you

sorry for my late respond, i can’t work on my project every day :frowning:
i have yet to successfully upgrade my engine from 4.16 to 4.17 (i will keep trying today)

for now i have the log (4.18 version)

also somewhere else i use set skeleton mesh as wel. i just can’t compare these 2 (one is for the character creator while the issue is in the main character).

plugins i use :
Varest
Advanced Sessions
Advanced steam sessions
Ocean Plugin ( [Community Project] WIP Weather & Ocean Water Shader - Work in Progress - Unreal Engine Forums )

Hi,

Looking at your logs, it seems like it’s an issue with the plugin. Try disabling the plugin and check if the issue occurs from there. If the problem does lie within the plugin, you will have to get in touch with the plugin creator since it is one that we do not directly support.

-Thank you

hi,

what plugin is the possible cause of the issues ? (wich one should i disable ?)

and how am i supposed to disable a plugin and keep the project functioning ? is there a way to make unreal just ignore them and just execute the next function (so i don’t have to recreate things down the road

Hi,

Due to the amount of time that this thread has remained inactive, I will be closing it out. If you have another other questions regarding the issue above, feel free to reopen it and I will get back to you.

-Thank you

Hi,

You would need to be able to reproduce the issue without having any of the listed plugins enabled, as we do not provide support for unofficial plugins. If it is an issue with one of the plugins you will need to contact the creator. If you can get this to happen in a clean project and list the steps in which you got this issue to occur, I can take a look at it.

-Thank you

hey Ridley,
sorry for giving no response for a bit.
i have manged to reproduce this bug in a stripped down version (no plugins and no unneeded things). and gues what ? i found the issue !

it seems to be happening becouse i use the function “set master pose component” on the server.
(so fair it didn’t fix the issue in my real project).

Hi,

If you can get it to reproduce in a clean project with the 3rd party plugins disabled, and with the repro steps, I can take a look at the issue.

-Thank you

I am also having the same issue upgrading directly from 4.16 to 4.18. I do not have a clean repro, but here is the problem.

Assert Information.txt

There appears to be two skinned mesh components being initialized, while pointing to the same skeletal mesh. When the second one is registered, it never initializes ComponentSpaceTransformsArray. There is a check later in the frame that expects data to be in that array.

Callstacks with some params attached. Trying to create a minimal repro.

Hi,

Does this occur in a project with the plugins disabled for you?

-Thank you

I found a workaround that might just be correct. It seems to me that the ComponentSpaceTransformsArray should only be emptied when the SkeletalMesh is NULL in USkinnedMeshComponent::AllocateTransformData(). I’m not certain I understand how MasterPoseComponent is driving the state in the USkinnedMeshComponent, but this made things stop crashing for me.

		ComponentSpaceTransformsArray[0].Empty();
		ComponentSpaceTransformsArray[1].Empty();

becomes

	else if (SkeletalMesh == NULL)
	{
		// Reset the animation stuff when changing mesh.
		ComponentSpaceTransformsArray[0].Empty();
		ComponentSpaceTransformsArray[1].Empty();
	}

as i did this in blueprints and not c++ im not sure for a 100% , clearing the mastercomponent fixed this issue for me a while back