Preview - not showing until after re-visit (focus) selection - not always

Discussion related to "Everything" 1.5 Alpha.
Post Reply
photozulu
Posts: 5
Joined: Wed Jul 03, 2024 4:22 pm

Preview - not showing until after re-visit (focus) selection - not always

Post by photozulu »

An odd issue I've noticed for some time, still present as of 2024-07-03 with v 1.5.0.1367a. Happens on multiple different machines.

When searching images and using the Preview pane, it often occurs that an image (often most or all) won't show in the preview until after moving *off* that row, then coming back to it. See linked video: https://imgur.com/a/90bxuSX

Some notes & things I've tried:
  • happens on various file types (jpg, png, tif, etc.)
  • does NOT always happen / I have not yet deduced a pattern
  • >> though it _seems_ more likely with larger files
  • it does not depend on waiting ... can sit on current row for long time with no preview; likewise can very quickly move off, then back, and preview is immediately now there
  • happens whether changing row selection with mouse or keyboard (see video)
  • happens whether have preview open at first search, or whether preview opened after search results visible
Any tips to further troubleshoot or confirmation others can reproduce appreciated. Thanks.
Last edited by photozulu on Wed Jul 03, 2024 6:38 pm, edited 1 time in total.
therube
Posts: 4972
Joined: Thu Sep 03, 2009 6:48 pm

Re: Preview - not showing until after re-visit (focus) selection - not always

Post by therube »

See attached video.
;-).


Perhaps related, Preview is slow (on a sleeping drive).
photozulu
Posts: 5
Joined: Wed Jul 03, 2024 4:22 pm

Re: Preview - not showing until after re-visit (focus) selection - not always

Post by photozulu »

Oop, thanks. Couldn't attach MP4 but forgot to fix before posting. Updated the OP to link to the vid instead.

Thanks for the linked issue. The drive(s) sleeping is definitely not at play. (Different machines, VMs & real, SSD, different disks all have this behavior.)
I tried enabling logs and reproduced the behavior. I don't see any errors - I will try to 'tail' the log and reproduce to see if anything more clear happens.
photozulu
Posts: 5
Joined: Wed Jul 03, 2024 4:22 pm

Re: Preview - not showing until after re-visit (focus) selection - not always

Post by photozulu »

Not sure if helpful but I attached a log of some cases where in some the preview appeared immediately and some with the {no-preview » change-row » change-back » now-preview} cases.
Last edited by void on Wed Jul 03, 2024 11:14 pm, edited 1 time in total.
Reason: removed log
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preview - not showing until after re-visit (focus) selection - not always

Post by void »

Everything will try to preview image files itself by using the image thumbnail.
Third party preview handlers can be installed to change the default behavior.

There's no preview handler for jpg files on your system.
However, there might be a preview handler instance still running from another file type.
This may cause interference with the preview window.

Please try disabling preview handlers and see if the issue persists:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    preview
  • Select: show_preview_handlers_in_preview_pane
  • Set the value to: false
  • Click OK.
The preview pane was re-written in 1376a.
This might help with problematic preview handlers.



Do you have trouble with thumbnails not loading sometimes?

Please try rebuilding thumbnail cache:

From the Start menu, type in the following search:

cmd

click Command prompt.

In the command prompt, navigate to local app data folder by typing in the following and pressing enter:

cd %localappdata%\Microsoft\Windows\Explorer

Remove the hidden attribute from the icon cache database by typing the following and pressing enter:

attrib thumbcache_*.db -h

Terminate Everything by typing the following and pressing enter:

taskkill /f /im everything.exe

Terminate Windows Explorer by typing the following and pressing enter:

taskkill /f /im explorer.exe

Delete the thumbnail cache database by typing the following and pressing enter:

del thumbcache_*.db

Restart Windows Explorer by typing the following and pressing enter:

explorer
photozulu
Posts: 5
Joined: Wed Jul 03, 2024 4:22 pm

Re: Preview - not showing until after re-visit (focus) selection - not always

Post by photozulu »

Thanks for the quick reply and further things to try. Just love the tool and this forum and responses are great!

(Slight correction to prior- 2 of the 3 machines I had tested before were running the portable version and the latest version. The one where I made the vid from was the regular/full install and was a few builds behind. But I changed it to also the portable one (for my own consistency) and behavior was the same. Just to correct the record though.)


tl;dr - tried both things; still same results...

But some interesting observations - just in case anything triggers some ideas or suggestions of what else I might try. Sorry if all the detail is overkill.
And some questions also, at the end.

1. Never really use the thumbnail view; when trying it, noticed that some images did not produce TNs and some did
*Generally* [but not perfectly consistently] the ones without TNs mostly were the ones that also did not show previews at first

2. Deleted the TN cache as recommended. Sadly tried various things and before and after resetting the TN cache both had the same behaviors.

3. (I use DOpus rather than Explorer) But tried standard Win Explorer on some folders with same JPG images as Everything wasn't showing at first. Explorer built TNs of all w/o any issues and showed previews of all w/o issues. After Explorer TN-ified a whole folder, I re-tried some Everything searches for the same images, but got the same intermittent behavior.

(I normally use Lightroom when doing much with folders or TN views, so not an area I'd notice much.)

4. Same behavior with "show_preview_handlers_in_preview_pane" in any of True, False, or Default setting.

5. The previews that show - either at first or always reliably after {chg-focus} then {go back to} - are definitely larger res than the TNs. So something beyond TNs only is for sure working.

6. Tried with some larger TIF images. Generally a bit of (expected) delay such as with 200mb - 2+gb files. But generally worked fine. Not 100%, and maybe just coincidence but seemed 2x more reliable than the JPG samples. Some were Photoshop TIFs with layers etc., some were simpler.


The Preview Handler and TNs gives me questions. Would love any clarification if possible.

Q: is there anything I should try in way of adding additional handlers, such as 3rd-party or something?
(I don't really grok why some would work instantly and some not at first but always on 2nd focus. Seems if no handler, it'd never preview. Also confuses me why Explorer and DOpus are 100% and it's only Everything [ of things I use ] that has this inconsistency.)

Q: anything to help me understand why it seems every image type (that I've tried at least)?
(Tried jpg, tif [ 2 different tif encodings/content ], bmp, gif, png ... )


This clearly isn't a show-stopper and Everything's awesome with or without this. But I am definitely puzzled and would be super curious to see what's at bottom of this. Thanks again!
Attachments
2024-07-03_16-49-45.PNG
2024-07-03_16-49-45.PNG (193.36 KiB) Viewed 7881 times
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preview - not showing until after re-visit (focus) selection - not always

Post by void »

5. The previews that show - either at first or always reliably after {chg-focus} then {go back to} - are definitely larger res than the TNs. So something beyond TNs only is for sure working.
Everything uses 1024x1024 thumbnails for the preview pane.
Everything uses 256x256 thumbnails for the result list.

To set the preview pane thumbnail load size:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    preview
  • Select: preview_load_size
  • Set the value to: 1024
  • Click OK.
Please try setting preview_load_size to 256 and see if it helps.

preview_load_size



To set the result list thumbnail load size:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    thumbnail
  • Select: thumbnail_load_size
  • Set the value to: 256
  • Click OK.
thumbnail_load_size



Please try disabling IShellItemImageFactory:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Advanced tab on the left.
  • To the right of Show settings containing, search for:
    shell
  • Select: shell_item_image_factory
  • Set the value to: false
  • Click OK.
When disabled, Everything will fall back to IExtractImage.

shell_item_image_factory
extract_image



The next alpha update will move loading the preview thumbnail to a separate thread which might help with COM deadlocks.

Debug logs when thumbnails fail to load in the result list when using thumbnail view might help.


Q: is there anything I should try in way of adding additional handlers, such as 3rd-party or something?
(I don't really grok why some would work instantly and some not at first but always on 2nd focus. Seems if no handler, it'd never preview. Also confuses me why Explorer and DOpus are 100% and it's only Everything [ of things I use ] that has this inconsistency.)
Please avoid third party preview handlers for images.

Disable thumbnail handlers with ShellExView.
Try different thumbnail handlers.


Q: anything to help me understand why it seems every image type (that I've tried at least)?
(Tried jpg, tif [ 2 different tif encodings/content ], bmp, gif, png ... )
Please try disabling shell_item_image_factory as mentioned above and see if the issue persists.
I'll make some changes to how Everything loads thumbnails in the next alpha update which might help..
I will have an update soon and make another post here.
photozulu
Posts: 5
Joined: Wed Jul 03, 2024 4:22 pm

Re: Preview - not showing until after re-visit (focus) selection - not always

Post by photozulu »

This is excellent; thank you and happy to help diagnose where I can. Bit rushed tonight but think I tried most items and I hope some of this is helpful. Let me know if I missed anything important or other things to try and over next couple of evenings I should have a bit of time.

(Also, thank you for the clarification on TN and Preview sizes. My bad for assuming. Explains what I saw on the larger previews.)

In order I tried things:

A) try [preview_load_size] @ 256 (not 0 or 1024 default)
• seemed to help some for preview / but not all; bit anecdotal
• TN creation still hit and miss
• back to 1024 or 0 and prior behavior returned (no-prev 1st visit, yes preview on 2nd row visit)

B) try [thumbnail_load_size] @ 256
• seemed to successfully create TNs for ALL -further-down- images, as scrolled, earlier ones already in view stayed at missing; did not recreate those TNs
• when both TNs and Preview set at 256, seems ALL cases work (though previews are too small to be too useful of course)
• for ones where TNs made through manual 256 setting, then it seems virtually all previews work, even at 1024 or 2048 size
• With quick tests, the workaround seemed to resolve: JPG, PNG, TIF, GIF, / but NOT: SVG, BMP, PPT ... not sure; but seems maybe since different TN handlers

👏🏼 **so setting TNs to 128 or 256 as override seems an excellent stop-gap for now** - gets about 3/4 of my cases of interest to then work

C) try disable [shell_item_image_factory]
• with disabled, TNs hit and miss (same as before troubleshooting)
• Previews now ONLY worked at all for images that also succeeded at making TNs; even {visit-then-return} did NOT provide previews. Seems interesting.

D) try different TN handlers or disable ones
• hrm,... Google DriveFS has handler for: BMP, PNG / tried disabling but same behaviors for PNG (not enough BMPs to easily test)
• MOST seem from 2 MS built-in O/S ones

E) I tried making a log file - first bit has "the issue", many TNs failed to load. Changed settings at 19:05 to have TNs at 128 size. Then did search into different results to confirm the earlier mentioned findings. Hope it helps.


----------
(Side note - super clean & well done Advanced settings, with highlighting changed & the search. Very satisfying.)
Last edited by void on Wed Jul 10, 2024 4:41 am, edited 2 times in total.
Reason: removed log
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preview - not showing until after re-visit (focus) selection - not always

Post by void »

Thank you for the logs.
thumbnail getbitmap
Everything is failing to load the thumbnail.
However, the failure reason is not logged.

I will add more debug information for the next alpha update to try to catch the failure reason.
Post Reply