chromafiler icon indicating copy to clipboard operation
chromafiler copied to clipboard

View state property bag sometimes doesn't work

Open vanjac opened this issue 2 years ago • 4 comments

Sometimes view state settings can't be written to the IPropertyBag -- every call to Write fails with E_FAIL. This happens inconsistently.

Notes:

  • This seems more likely to happen if the parent folder has never been visited
    • For files (not folders), it can also happen if the parent folder was visited for the first time and hasn't been closed yet.
  • Releasing and re-creating the prop bag doesn't resolve the issue.
  • Closing and reopening both the parent folder and the file window sometimes resolves the issue.
  • Can only reproduce in v0.7.0 or later
  • ~~SHGetViewStatePropertyBag is only specified to work for folders, so this might be an issue of using the API out-of-spec. I assumed it wasn't actually looking at the namespace and it would make no difference, but maybe this isn't the case. Or maybe it has something to do with the shell view also using the property bag, which wouldn't happen for files?~~

vanjac avatar Nov 19 '23 22:11 vanjac

Bug was introduced for folders in 6192f99f72640a77300c55d0781948c1a37ae1c8 (files were already broken)

vanjac avatar Nov 20 '23 01:11 vanjac

Bug was introduced for files in 0ebaa67b11c731ab99934d6857d8c001702eebc2 (first commit where files can have view state)

vanjac avatar Nov 20 '23 01:11 vanjac

Idea: only write view state on close (item change marks dirty)

vanjac avatar Nov 20 '23 02:11 vanjac

https://stackoverflow.com/a/56803447

vanjac avatar Nov 22 '23 01:11 vanjac