# TSparseArray visualizer doesn't work for arrays that use TInlineSparseArrayAllocator 

**URL:** <https://forums.unrealengine.com/t/tsparsearray-visualizer-doesnt-work-for-arrays-that-use-tinlinesparsearrayallocator/2684011>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [November 3, 2025, 9:31pm UTC](https://forums.unrealengine.com/t/tsparsearray-visualizer-doesnt-work-for-arrays-that-use-tinlinesparsearrayallocator/2684011 "2025-11-03T21:31:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [November 3, 2025, 9:31pm UTC](https://forums.unrealengine.com/t/tsparsearray-visualizer-doesnt-work-for-arrays-that-use-tinlinesparsearrayallocator/2684011/1 "2025-11-03T21:31:47Z")

</div>

The visualizer for TSparseArray in the Unreal.natvis file only works for TSparseArrays that use the default allocator. This is the section that we needed to add to visualize TSparseArrays that use TInlineSparseArrayAllocator (I added it above the general-case TSparseArray visualizer, but I don’t think the order matters):

```auto
 <Type Name="TSparseArray&lt;*,TInlineSparseArrayAllocator&lt;*,*&gt;&gt;">
  <DisplayString Condition="(Data.ArrayNum - NumFreeIndices) &lt;= 0 &amp;&amp; Data.ArrayMax == 0">Empty</DisplayString>
  <DisplayString Condition="(Data.ArrayNum - NumFreeIndices) &lt;= 0 &amp;&amp; Data.ArrayMax &gt; 0">Empty, Max={Data.ArrayMax}</DisplayString>
  <DisplayString Condition="Data.ArrayNum &lt;= Data.ArrayMax">Num={Data.ArrayNum - NumFreeIndices}, Max={Data.ArrayMax}</DisplayString>
  <Expand>
   <IndexListItems>
    <Size>(Data.ArrayNum &gt; 0 &amp;&amp; Data.ArrayNum &lt;= Data.ArrayMax) ? Data.ArrayNum : 0</Size>
     <!-- in some cases, the allocator will have a valid SecondaryData, even though the AllocationFlags indicate that it should be using InlineData -->
    <ValueNode Condition="(AllocationFlags.AllocatorInstance.SecondaryData.Data == 0) &amp;&amp; (reinterpret_cast&lt;uint32*&gt;(AllocationFlags.AllocatorInstance.InlineData )[$i/32]&gt;&gt;($i%32) &amp; 1) &amp;&amp; (Data.AllocatorInstance.SecondaryData.Data != 0)">*reinterpret_cast&lt;ElementType*&gt;(&amp;(reinterpret_cast&lt;FElementOrFreeListLink*&gt;(Data.AllocatorInstance.SecondaryData.Data)[$i]).ElementData)</ValueNode>
    <ValueNode Condition="(AllocationFlags.AllocatorInstance.SecondaryData.Data == 0) &amp;&amp; (reinterpret_cast&lt;uint32*&gt;(AllocationFlags.AllocatorInstance.InlineData )[$i/32]&gt;&gt;($i%32) &amp; 1) != 0">*reinterpret_cast&lt;ElementType*&gt;(&amp;(reinterpret_cast&lt;FElementOrFreeListLink*&gt;(Data.AllocatorInstance.InlineData)[$i]).ElementData)</ValueNode>
    <ValueNode Condition="(AllocationFlags.AllocatorInstance.SecondaryData.Data == 0) &amp;&amp; (reinterpret_cast&lt;uint32*&gt;(AllocationFlags.AllocatorInstance.InlineData )[$i/32]&gt;&gt;($i%32) &amp; 1) == 0">"Invalid",sb</ValueNode>
    <ValueNode Condition="(AllocationFlags.AllocatorInstance.SecondaryData.Data != 0) &amp;&amp; (reinterpret_cast&lt;uint32*&gt;(AllocationFlags.AllocatorInstance.SecondaryData.Data)[$i/32]&gt;&gt;($i%32) &amp; 1) != 0">*reinterpret_cast&lt;ElementType*&gt;(&amp;(reinterpret_cast&lt;FElementOrFreeListLink*&gt;(Data.AllocatorInstance.SecondaryData.Data)[$i]).ElementData)</ValueNode>
    <ValueNode Condition="(AllocationFlags.AllocatorInstance.SecondaryData.Data != 0) &amp;&amp; (reinterpret_cast&lt;uint32*&gt;(AllocationFlags.AllocatorInstance.SecondaryData.Data)[$i/32]&gt;&gt;($i%32) &amp; 1) == 0">"Invalid",sb</ValueNode>
   </IndexListItems>
  </Expand>
 </Type>

```

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [November 3, 2025, 9:31pm UTC](https://forums.unrealengine.com/t/tsparsearray-visualizer-doesnt-work-for-arrays-that-use-tinlinesparsearrayallocator/2684011/2 "2025-11-03T21:31:50Z")

</div>

**Steps to Reproduce**  
In an IDE debugger, step through code that references a TSparseArray that uses TInlineSparseArrayAllocator and attempt to view the array’s elements. The list element visualizer won’t show the values.

---

<div class="post-metadata">

**Author:** ![graeme-sapworks](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@graeme-sapworks](https://forums.unrealengine.com/u/graeme-sapworks)\
**Post date:** [November 11, 2025, 5:02am UTC](https://forums.unrealengine.com/t/tsparsearray-visualizer-doesnt-work-for-arrays-that-use-tinlinesparsearrayallocator/2684011/3 "2025-11-11T05:02:12Z")

</div>

Hi Ron,

Belated response, but this has been confirmed and a bug report has been submitted. If you would like to follow the progress you can track it here:

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE%5C-352770)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

Best regards,

-Graeme
