You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When finding files in the GUI, the application tries to scroll the window contents so that the found item is selected. It needs to do this in the file list and, for hierarchical filesystems, in the directory tree.
The application has a DirectoryTreeItem method called BringItemIntoView that took several hours and a couple of stackoverflow posts to figure out. It calls an internal VirtualizingPanel method called BringIndexIntoView. Most of the time this works, but sometimes it crashes like this:
---> System.InvalidOperationException: Cannot call StartAt when content generation is in progress.
at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.StartAt(GeneratorPosition position, GeneratorDirection direction, Boolean allowStartAtRealizedItem)
at System.Windows.Controls.VirtualizingStackPanel.MeasureOverrideImpl(Size constraint, Nullable`1& lastPageSafeOffset, List`1& previouslyMeasuredOffsets, Nullable`1& lastPagePixelSize, Boolean remeasure)
at System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
[...]
at System.Windows.Controls.VirtualizingStackPanel.BringIndexIntoView(Int32 index)
The next Find operation blows up while trying to traverse the TreeView.
These failures can be ignored, since ultimately it just means that the directory tree isn't getting scrolled, but it's not ideal.
Reproduction steps:
Open devcdjan92.iso (an image of the January 1992 Apple Developer CD-ROM).
Hit Ctrl+F, type "gsbug", click "Find Next". That causes the first crash.
Click "Find Next". That causes the second failure.
Continuing to click "Find Next" works without issue, until you wrap around to the top again.
Unrelated but interesting: if you select an item in the file list in the middle of a large archive, and move the scrollbar elsewhere, sometimes the file view jumps back to the item if you move the directory tree scrollbar around. More weird interactions with virtualization?
The text was updated successfully, but these errors were encountered:
Repositioning a virtualized WPF TreeView control is hard. This
doesn't fix the underlying problem, but does prevent the application
from exploding.
(issue #22)
When finding files in the GUI, the application tries to scroll the window contents so that the found item is selected. It needs to do this in the file list and, for hierarchical filesystems, in the directory tree.
The application has a
DirectoryTreeItem
method calledBringItemIntoView
that took several hours and a couple of stackoverflow posts to figure out. It calls an internalVirtualizingPanel
method calledBringIndexIntoView
. Most of the time this works, but sometimes it crashes like this:The next Find operation blows up while trying to traverse the TreeView.
These failures can be ignored, since ultimately it just means that the directory tree isn't getting scrolled, but it's not ideal.
Reproduction steps:
devcdjan92.iso
(an image of the January 1992 Apple Developer CD-ROM).Unrelated but interesting: if you select an item in the file list in the middle of a large archive, and move the scrollbar elsewhere, sometimes the file view jumps back to the item if you move the directory tree scrollbar around. More weird interactions with virtualization?
The text was updated successfully, but these errors were encountered: