Virtualized TreeView with "Auto" scrollbars - Hanging / freezing on scrolling
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
Hey, I work for DevExpress and it looks like we've been affected by rounding errors in float-point calculations that pertain the WPF internal layout engine. I found a few fixed bug reports that look very close as they concern the same infinite measure issue:
https://github.com/dotnet/wpf/issues/4834
https://github.com/dotnet/wpf/issues/9944
### Reproduction Steps
1. Set screen resolution to 3440 x 1440 or 2560 x 1440.
2. Set Scale factor as 125%.
3. Navigate to the project's folder and do `dotnet run`. Note: no DevExpress license is required.
4. Expand all three foldes in the Field List dialog and try scrolling.
[T1321745.zip](https://github.com/user-attachments/files/25343905/T1321745.zip)
### Expected behavior
No freezing
### Actual behavior
```callstack
System.Windows.ContextLayoutManager.fireLayoutUpdateEvent() + 0xcb <-- 0x2c30912b
System.Windows.ContextLayoutManager.fireLayoutUpdateEvent() + 0xcb <-- 0x2c30912b (No unwind info)
System.Windows.ContextLayoutManager.UpdateLayout() + 0x94e <-- 0x2c2f42ee (No unwind info)
System.Windows.ContextLayoutManager.UpdateLayoutCallback(System.Object) + 0x17 <-- 0x2c2f5947 (No unwind info)
System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() + 0x67 <-- 0x2c21f287 (No unwind info)
System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object) + 0x8f <-- 0x2c21dd0f (No unwind info)
System.Windows.Media.MediaContext.RenderMessageHandler(System.Object) + 0x23 <-- 0x2c2fae03 (No unwind info)
System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) + 0x65 <-- 0x291aa8f5 (No unwind info)
System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) + 0x2e <-- 0x291aa81e (No unwind info)
System.Windows.Threading.DispatcherOperation.InvokeImpl() + 0x125 <-- 0x2983bc25 (No unwind info)
System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object) + 0x26 <-- 0x2983baee (No unwind info)
MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object) + 0x11b <-- 0x2983ba33 (No unwind info)
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) + 0xa9 <-- 0x28fda839 (No unwind info)
MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object) + 0x1ce <-- 0x2983b37e (No unwind info)
System.Windows.Threading.DispatcherOperation.Invoke() + 0x39 <-- 0x2983b0b9 (No unwind info)
System.Windows.Threading.Dispatcher.ProcessQueue() + 0x3a3 <-- 0x28f94c53 (No unwind info)
System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) + 0x3f <-- 0x28f93faf (No unwind info)
```
### Regression?
_No response_
### Known Workarounds
UseLayoutRounding="False"
### Impact
_No response_
### Configuration
.NET 8
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.