# UE 5.6.1 Editor Crashes with ensure at InstancedStaticMeshComponent.h:128 during AddInstance in VS Debug Mode 

**URL:** <https://forums.unrealengine.com/t/ue-5-6-1-editor-crashes-with-ensure-at-instancedstaticmeshcomponent-h-128-during-addinstance-in-vs-debug-mode/2736406>\
**Category:** Programming & Scripting\
**Tags:** vscode, unreal-engine, Blueprint, question\
**Created:** [July 17, 2026, 1:01pm UTC](https://forums.unrealengine.com/t/ue-5-6-1-editor-crashes-with-ensure-at-instancedstaticmeshcomponent-h-128-during-addinstance-in-vs-debug-mode/2736406 "2026-07-17T13:01:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.WYunT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr.WYunT](https://forums.unrealengine.com/u/Mr.WYunT)\
**Post date:** [July 17, 2026, 1:01pm UTC](https://forums.unrealengine.com/t/ue-5-6-1-editor-crashes-with-ensure-at-instancedstaticmeshcomponent-h-128-during-addinstance-in-vs-debug-mode/2736406/1 "2026-07-17T13:01:57Z")

</div>

Hi everyone,

I am a beginner developer currently learning Unreal Engine 5 with the help of AI. I’ve encountered a persistent issue that only occurs when running the Unreal Editor ( **version 5.6.1** ) through **Visual Studio (F5 Debugging)**.

**Problem Description:** Whenever I attempt to add instances to an `UInstancedStaticMeshComponent`, the editor immediately triggers a breakpoint and halts in Visual Studio. This happens both in the **Construction Script** and during **BeginPlay**.

**Error Log:** `LogOutputDevice: Error: Ensure condition failed: !bCheckValid || bIsValid [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Classes\Components\InstancedStaticMeshComponent.h] [Line: 128]`

**Context:**

- I am trying to generate a 24x24 hexagonal grid (576 instances) using Blueprints.
- The hexagonal mesh was created using the built-in **Modeling Mode** tools in UE.
- As shown in the attached image, the moment the `AddInstance` node (with the target connected to my Instanced Static Mesh Component) is executed, the crash occurs.
- ![5ace83fa433fcd1237d798abf137e7f5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/b/d/dbdf14b3e926348988da77b79a744b0c9b25e66f.png)

**Crucially** , if I launch the project directly from the `.uproject` file (without the VS debugger), the grid generates perfectly, and there are no crashes or errors.

It seems like the VS Debugger is sensitive to a race condition or an initialization state in the rendering proxy that I don’t fully understand. Has anyone else encountered this `Line 128` ensure in UE 5.6.1? Is there a recommended way to **eliminate** this conflict or a specific setup I should use to avoid this while debugging?

I would truly appreciate any help or guidance!
