Geometry Script Boolean crash 5.5

Anyone else playing with GS booleans in 5.5? I had a system working great in 5.4 but it is now crashing the editor with an ‘out of range array’ error whenever I try to create a boolean using a mesh to subtract. Appending built in mesh shapes like cube & cylinder, or converting a SM to dynamic.

SOLUTION NOTE : It was a setting I had customized under [/Script/Engine.PhysicsSettings] in DefaultEngine.ini that was causing this, although I’m not sure which one.

Hey there @TheWolf! Is it only failing for the migrated project?

1 Like

Thanks, yes it appears so. I just tried migrating a simple working 2-boolean BP from a blank project into my working project and adding it to a level or even trying to open the BP crashes the editor. I’m fairly used to hunting bugs but this one has me on the ropes.

The error is always:

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 783]
Array index out of bounds: ### into an array of size ### (where the first # is larger than the second - the actual numbers appear to vary but are generally in the 3-4 digit mark)

I thought I’d found the issue as I had enabled the new GS>PCG plugin and when I disabled it I could get a bit further - but its still incredibly unstable & also laggy compared to blank project. My previous discovery about Append Sweep doesn’t crash immediately, but is still causing crashes and is quite laggy.

Ahh that’s an interesting issue! The assertion itself (without seeing the full stack this is more of a guess) is likely pointing to the array of vertices for the new (or old) mesh. How this was affected by a migration is uncertain, but we have a handful of things that can (rarely) solve migration issues like this if they fall into the category of “failing due to cached data”.

First I’d back your project up, as this can break some things.

Then delete the Saved, Intermediate, and DerivedDataCache subfolders in your project folder. These will be regenerated when you next launch the project.

You can also delete the DefaultEngine.ini file inside of the Config subfolder. This will also be regenerated (though can wreak havoc on data you’d probably want to keep so do this last).

If neither pan out, and this project is integral to be ported from previous versions, you may have to build the UE source and debug the engine crash fully, as it can point out more clearly what exactly is failing, though if it’s due to changes in the modeling toolkit, that may be a difficult task.

1 Like

Thanks, I’ve tried deleting the subfolders to no avail. But yeah, since it even does this with fresh BPs it seems cache data wouldn’t likely be a culprit.

Deleting DefaultEngine next. But the thing that confounds me is even if this is a change in the modelling toolkit - why would it impact a from-scratch BP (and even one that works properly in another UE project)? This puts me on the (perhaps incorrect?) path that there is an issue internal to my project, not between engine and project. And so leads me down a path of potential plugin conflicts or settings issues (or potential corruption in settings).

Thanks so much for helping, thought for sure I’d be screaming into the void on this one.
-m

I installed symbols to get more deets, I’m not sure what it means - but I’m curious if the Chaos has some relevance. Also wondering about FDynamicMeshSceneProxy.

UnrealEditor_GeometryFramework!FDynamicMeshSceneProxy::FastUpdateIndexBuffers'::2’::<lambda_1>::operator()() [D:\build++UE5\Sync\Engine\Source\Runtime\GeometryFramework\Private\Components\DynamicMeshComponent.cpp:1510]
UnrealEditor_GeometryCore!BoneAttributeHelpers::EnableIfMatchingUE::Geometry::FDynamicMesh3,FName() [D:\build++UE5\Sync\Engine\Source\Runtime\GeometryCore\Public\Util\SmallListSet.h:305]
UnrealEditor_GeometryCore!UE::Geometry::FDynamicMesh3::EnumerateVertexTriangles() [D:\build++UE5\Sync\Engine\Source\Runtime\GeometryCore\Private\DynamicMesh\DynamicMesh3.cpp:649]
UnrealEditor_GeometryFramework!FastTriWinding::ComputeCoeffs<UE::Geometry::FDynamicMesh3>'::2’::<lambda_3>::operator()() [D:\build++UE5\Sync\Engine\Source\Runtime\GeometryFramework\Private\Components\DynamicMeshComponent.cpp:1459]
UnrealEditor_GeometryFramework!UDynamicMeshComponent::ProcessMesh() [D:\build++UE5\Sync\Engine\Source\Runtime\GeometryFramework\Private\Components\DynamicMeshComponent.cpp:201]
UnrealEditor_GeometryFramework!UDynamicMeshComponent::GetPhysicsTriMeshData() [D:\build++UE5\Sync\Engine\Source\Runtime\GeometryFramework\Private\Components\DynamicMeshComponent.cpp:1569]
UnrealEditor_Engine!UBodySetup::GetCookInfo() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodySetup.cpp:305]
UnrealEditor_Engine!FChaosDerivedDataCooker::Build() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PhysicsEngine\Experimental\ChaosDerivedData.cpp:116]
UnrealEditor_Engine!TryGetDDCBuiltData() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodySetup.cpp:1353]
UnrealEditor_Engine!UBodySetup::TryGetCookedData() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodySetup.cpp:1452]
UnrealEditor_Engine!UBodySetup::GetCookedFormatData() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodySetup.cpp:391]
UnrealEditor_Engine!UBodySetup::CreatePhysicsMeshes() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodySetup.cpp:423]
UnrealEditor_GeometryFramework!UDynamicMeshComponent::RebuildPhysicsData() [D:\build++UE5\Sync\Engine\Source\Runtime\GeometryFramework\Private\Components\DynamicMeshComponent.cpp:1721]
UnrealEditor_GeometryFramework!UDynamicMeshComponent::OnMeshObjectChanged() [D:\build++UE5\Sync\Engine\Source\Runtime\GeometryFramework\Private\Components\DynamicMeshComponent.cpp:1337]
UnrealEditor_GeometryFramework!V::TBaseUObjectMethodDelegateInstance::ExecuteIfSafe() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:667]
UnrealEditor_GeometryFramework!TMulticastDelegate<void __cdecl(UDynamicMesh * __ptr64,FDynamicMeshChangeInfo),FDefaultDelegateUserPolicy>::Broadcast() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:1079]
UnrealEditor_GeometryFramework!UDynamicMesh::SetMesh() [D:\build++UE5\Sync\Engine\Source\Runtime\GeometryFramework\Private\UDynamicMesh.cpp:137]
UnrealEditor_GeometryScriptingCore!UGeometryScriptLibrary_MeshBooleanFunctions::ApplyMeshBoolean() [D:\build++UE5\Sync\Engine\Plugins\Runtime\GeometryScripting\Source\GeometryScriptingCore\Private\MeshBooleanFunctions.cpp:109]
UnrealEditor_GeometryScriptingCore!UGeometryScriptLibrary_MeshBooleanFunctions::execApplyMeshBoolean() [D:\build++UE5\Sync\Engine\Plugins\Runtime\GeometryScripting\Intermediate\Build\Win64\UnrealEditor\Inc\GeometryScriptingCore\UHT\MeshBooleanFunctions.gen.cpp:669]
UnrealEditor_CoreUObject!UObject::execCallMathFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1079]
UnrealEditor_CoreUObject!UObject::execLetObj() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:2907]
UnrealEditor_CoreUObject!ProcessLocalScriptFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1214]
UnrealEditor_CoreUObject!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void *)>() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1043]
UnrealEditor_CoreUObject!ProcessLocalFunction'::2’::<lambda_1>::operator()() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1286]
UnrealEditor_CoreUObject!ProcessLocalFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1304]
UnrealEditor_CoreUObject!ProcessLocalScriptFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1214]
UnrealEditor_CoreUObject!UObject::ProcessInternal() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1336]
UnrealEditor_CoreUObject!UFunction::Invoke() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:7192]
UnrealEditor_CoreUObject!UObject::ProcessEvent() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:2175]
UnrealEditor_Engine!AActor::ProcessEvent() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:1160]
UnrealEditor_Engine!AActor::ProcessUserConstructionScript() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ActorConstruction.cpp:984]
UnrealEditor_Engine!AActor::ExecuteConstruction() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ActorConstruction.cpp:911]
UnrealEditor_Engine!AActor::FinishSpawning() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:3964]
UnrealEditor_Engine!AActor::PostSpawnInitialize() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:3907]
UnrealEditor_Engine!UWorld::SpawnActor() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelActor.cpp:736]
UnrealEditor_Engine!UWorld::SpawnActor() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelActor.cpp:440]
UnrealEditor_Kismet!FBlueprintEditor::UpdatePreviewActor() [D:\build++UE5\Sync\Engine\Source\Editor\Kismet\Private\BlueprintEditor.cpp:10320]
UnrealEditor_Kismet!FBlueprintEditor::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\Kismet\Private\BlueprintEditor.cpp:9196]
UnrealEditor_UnrealEd!UE::Core::Private::Function::TFunctionRefCaller<FTickableEditorObject::TickObjects'::2’::<lambda_1>,void,FTickableObjectBase * __ptr64>::Call() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Templates\Function.h:315]
UnrealEditor_Engine!FTickableObjectBase::SimpleTickObjects() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Tickable.cpp:112]
UnrealEditor_UnrealEd!UEditorEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1898]
UnrealEditor_UnrealEd!UUnrealEdEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:550]
UnrealEditor!FEngineLoop::Tick() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5869]
UnrealEditor!GuardedMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:188]
UnrealEditor!GuardedMainWrapper() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:123]
UnrealEditor!LaunchWindowsStartup() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:277]
UnrealEditor!WinMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:317]
UnrealEditor!__scrt_common_main_seh() [D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]

In situations where migrations cause points of failure, it’s somewhat difficult to pinpoint. Rarely the cache gambit works, but in most cases it ends up falling to migrating to a new project base since the alternative is working from a source build for deep debugging, so we may very well be shouting into the void still.

The call stack gives a bit more insight in the path it took to fail, but the failure itself unfortunately remains a bit harder to parse, but I think the original assumption of the mesh vertices being the array that’s failing was close. The index buffer is just an array of pointers to the vertex buffer, but in this case for the proxy instead of the actual mesh before it’s written. We know a bit more about the issue now, but solving it is a different issue altogether.

1 Like

Thanks for sticking around and for recommending deleting DefaultEngine.ini - it appears to have resolved the issue!

Curious if this would give you any clue as to the source? Can def brute-force my way through rebuilding my settings but any advice on specific areas to investigate would be great.

Fantastic! Glad it worked out. Unfortunately I can’t know for sure exactly what configuration could have caused it, as I don’t tend to work within the configs manually often and not all of them will be the same. You could probably use source control and diff the original and it’s migrated version to see what changed, and if nothing there, you could diff a default ini file with one modified after the modeling toolkit is used and that may provide more insight.

Ok, thanks much - I’m just marching through that file block by block and appear to have narrowed it down to something under [/Script/Engine.PhysicsSettings]. I did see something about Chaos in the call stack. Best guess, I made a change to some physics setting which somehow interacted with GS. I luckily got Ryan Schmidt on the horn on Discord, and he said something had changed with complex collision on the DMC so I imagine I had customized a setting that was somehow arcing with that. Anyhow, thanks again for joining me on this adventure - grateful to have figured it out and for what I’ve gleaned from the bug hunt itself.

1 Like