
TECHNICAL EVIDENCE SUMMARY

1. FROZEN MAIN THREAD
Captured main-thread path:

Avalonia.Reactive.LightweightObservableBase`1.PublishNext
Avalonia.AvaloniaObject.RaisePropertyChanged
Avalonia.Layout.Layoutable.OnVisualParentChanged
Avalonia.Visual.SetVisualParent
Avalonia.Visual.SetVisualParent(IList, Visual)
Avalonia.Collections.AvaloniaList`1.InsertRange
Avalonia.Controls.Panel.ChildrenChanged
Avalonia.Collections.AvaloniaList`1.Add
Game2.Client!CompiledAvaloniaXaml.!AvaloniaResources+XamlClosure_1216+XamlClosure_1218.Build
Avalonia.Markup.Xaml.Templates.TemplateContent.Load
Avalonia.Markup.Xaml.Templates.DataTemplate.Build
Avalonia.Controls.Presenters.ContentPresenter.UpdateChild
Avalonia.Controls.Presenters.ContentPresenter.ApplyTemplate
Avalonia.Layout.Layoutable.Measure...
Avalonia.Controls.WrapPanel.MeasureOverride
Avalonia.Layout.LayoutManager.ExecuteMeasurePass
Avalonia.Layout.LayoutManager.ExecuteLayoutPass
Avalonia.Media.MediaContext.Render
Avalonia.Threading.Dispatcher...
Keen.VRage.UI.AvaloniaInterface.Rendering.DispatcherImpl.DispatchAllCalls
Keen.VRage.UI.EngineComponents.UIEngineComponent.UIManagerTick
Keen.VRage.DCS.Scenes.Scene.RunJob
Keen.VRage.DCS.Scenes.Scene.Tick
Keen.VRage.Core.VRageCore.Update
Keen.VRage.Library.Utils.AppLoop.Run
Keen.Game2.Program.Main

2. XAML MAPPING
Compiled closure:
  XamlClosure_1218.Build token 0x06014D8E
Parent:
  XamlClosure_1216.Build token 0x06014D8A

Both contain:
  avares://Game2.Client/UI/TerminalScreen/Inventory/InventoryItem.axaml

3. INVENTORYGRID ITEMS
Decompiled InventoryGrid.ItemsFilled():

private IEnumerable ItemsFilled()
{
    if (_itemsControl == null || _itemsControl.Bounds.Width == 0.0)
        yield break;

    _availableWidth = _itemsControl.Bounds.Width;
    int numberOfItems = 0;

    if (_inventory == null)
        yield break;

    foreach (InventoryItemModel inventoryItem in _inventory.InventoryItems)
    {
        numberOfItems++;
        yield return inventoryItem;
    }

    int? maxStacks = MaxStacks;
    if (maxStacks.HasValue)
    {
        int maxStacks2 = maxStacks.GetValueOrDefault();
        for (int i = numberOfItems; i < maxStacks2; i++)
        {
            numberOfItems++;
            yield return null;
        }
        yield break;
    }

    ...
}

4. REAL ITEM MODEL COUNTS
Observed on the pathological connected inventory network:
  290, 552, 452, 703, 741, 275, 393, 456, 235,
  306, 308, 585, 683, 540, 657, 685, 651, 500.

These were real InventoryViewModel.InventoryItems.Count values, not MaxStacks
placeholder counts.

5. OUTER NON-VIRTUALIZED CONTROL HIERARCHY
The terminal InventoryList uses an Avalonia ItemsControl whose ItemsSource is
InventoryContainers.

InventoryContainer also uses an Avalonia ItemsControl whose ItemsSource is
InventoryContainerViewModel.Inventories.

The mapped inventory target types did not reveal a VirtualizingStackPanel in this
inventory path.

6. FULL LIST REBUILD AMPLIFIER
InventoryListViewModel.SetInventories(...) calls Clear(), disposes/detaches the
existing container view models, clears the source list, then adds every inventory
container again and rebuilds filters.

7. A/B TEST
Diagnostic v0.2 changes only:
  PART_ItemsControl.ItemsSource

It supplies a snapshot of at most 60 existing real InventoryItemModel references.
It does not mutate the source model or server inventory.

Observed DISPLAY-CAP examples:
  290 -> 60
  552 -> 60
  452 -> 60
  703 -> 60
  741 -> 60
  683 -> 60
  685 -> 60
  651 -> 60
  500 -> 60

DISPLAY-CAP events total: 280.

The same run repeatedly opened:
- Cockpit150 inventory
- CargoContainer750 inventory
- CargoContainer750 again
- CargoContainer750 again
- Gearforge250
- Gearforge250 again

Complete main log result:
  ZERO "MainThreadFreeze" matches.

8. INTERPRETATION
The evidence supports a client UI scalability issue:
hundreds of InventoryItemModel entries are realized into full InventoryItem.axaml
controls inside a non-virtualized hierarchy, with expensive control-tree rebuilding
as streamed inventory state changes.

The A/B test directly changes only the number of rendered item controls and removes
the watchdog freeze, while leaving inventory contents unchanged.

