# Unreal Engine 5.4.2 missing collisons because constraint IDs are not unique

**URL:** <https://forums.unrealengine.com/t/unreal-engine-5-4-2-missing-collisons-because-constraint-ids-are-not-unique/1929473>\
**Category:** Programming & Scripting\
**Tags:** collision-detection, unreal-engine, Physics, Collision, bug-report, question\
**Created:** [July 7, 2024, 3:02pm UTC](https://forums.unrealengine.com/t/unreal-engine-5-4-2-missing-collisons-because-constraint-ids-are-not-unique/1929473 "2024-07-07T15:02:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Exetos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Exetos](https://forums.unrealengine.com/u/Exetos)\
**Post date:** [July 7, 2024, 3:02pm UTC](https://forums.unrealengine.com/t/unreal-engine-5-4-2-missing-collisons-because-constraint-ids-are-not-unique/1929473/1 "2024-07-07T15:02:23Z")

</div>

Chaos creates for handling collisions constraints (FPBDCollisionConstraint) for each collision. If a constraint ID is the same as a existing one, the collison is missing.

This feels like if you get colliding with a wall like jelly and you can bug trough.

Open todo in /Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/Collision/ParticlePairMidPhase.cpp

So I think this issue is known.

```auto
// @todo(chaos): fix key uniqueness guarantee. We need a truly unique key gen function
// If we get here, we have a key collision. The key uses a hash of pointers which is very likely to be unique for different implicit pairs, 
// especially since it only needs to be unique for this particle pair, but it is not guaranteed.
// Creating a new constraint with the same key could cause fatal problems (the original constraint will be deleted when we add the new one 
// to the map, but if it is asleep it will be referenced in the contact graph) so we just abort and accept we will miss collisions. 
// It is extremely unlikely to happen but we should fix it at some point.

```

No Epic, this issue is not unlikely. It depens on how complex you’re level is and on the amount of constraints and/or movable obejcts.

In my case I get this error without the need to play with my pawn. Its enough if I click on simulate and I get to this instand!

Error:

```auto
LogOutputDevice: Error: === Handled ensure: ===
LogOutputDevice: Error: Ensure condition failed: false [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Experimental\Chaos\Private\Chaos\Collision\ParticlePairMidPhase.cpp] [Line: 1726] 
LogOutputDevice: Error: Stack: 
LogOutputDevice: Error: [Callstack] 0x00007ffa957d7880 UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa957dc619 UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa957c6f78 UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa957c72fe UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa957c7f69 UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa957db246 UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa957db6ea UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa957db093 UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa95ba603e UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa95b83804 UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa9591a8fc UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa95921914 UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffa95928a11 UnrealEditor-Chaos.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffaa05024c5 UnrealEditor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffaa05021ff UnrealEditor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffaa052a155 UnrealEditor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffaa04f23d0 UnrealEditor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffaa06f7c93 UnrealEditor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffaa0b5c93d UnrealEditor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffaa0b502b7 UnrealEditor-Core.dll!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffb2c93257d KERNEL32.DLL!UnknownFunction []
LogOutputDevice: Error: [Callstack] 0x00007ffb2d40af28 ntdll.dll!UnknownFunction []

```

Please please please fix that. I also reported this bug at the bugtracker without any reaction. If it helps here is the case id # 11526819

Does anybody know how we can workaround of this issue?! For example special naming to prevent the hashing algorithm not generates the same IDs?

---

<div class="post-metadata">

**Author:** ![vfXander](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vfxander/32/1123964_2.png) [@vfXander](https://forums.unrealengine.com/u/vfXander)\
**Post date:** [August 2, 2024, 9:58pm UTC](https://forums.unrealengine.com/t/unreal-engine-5-4-2-missing-collisons-because-constraint-ids-are-not-unique/1929473/2 "2024-08-02T21:58:57Z")

</div>

I’m getting the same error. But it seems to cause a severe lag (1-2 seconds) only when I play in the editor, not in the packaged game.

---

<div class="post-metadata">

**Author:** ![Exetos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Exetos](https://forums.unrealengine.com/u/Exetos)\
**Post date:** [September 11, 2024, 4:21am UTC](https://forums.unrealengine.com/t/unreal-engine-5-4-2-missing-collisons-because-constraint-ids-are-not-unique/1929473/3 "2024-09-11T04:21:14Z")

</div>

Fixed in 5.4.4

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [October 11, 2024, 4:21am UTC](https://forums.unrealengine.com/t/unreal-engine-5-4-2-missing-collisons-because-constraint-ids-are-not-unique/1929473/4 "2024-10-11T04:21:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
