Quick View: change a file may reset Explorer Preview mode

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Quick View: change a file may reset Explorer Preview mode

Post by *Slavic »

When we look at content of different files, Explorer Preview mode (8) is very handy. However, in Quick View mode it may be unexpectedly reset and replaced with built-in Lister modes depending on file content. This happens not regularly and apparently depends on code returned by Explorer Preview. As a result, a user has to activate EP mode again, which currently is not quite easy because of lack of menu Options in QV.

To reproduce, you need to have a set of different files in one directory, like *.doc, *.txt, *.zip, *.pdf, maybe others. Preliminary you can check any file whether it can be viewed in EP mode in normal Lister window. For *.doc files it's possible almost every time, for *.docx often but not always, for *.zip quite rarely. Then switch to QV mode Ctrl+Q, press Tab key, 8, Tab. Move the marker down and up over the file list and look at content on the opposite panel: if a particular file cannot be viewed in EP mode, the mode resets and all next files will be shown in built-in modes.

It may be quite annoying if you look at a number of docs and one of them resets QV. And it may not be noticed immediately because some files (*.txt, pictures) do look very similar in both modes. Could it be possible to memorise Explorer Preview mode in QV and keep it until exit?
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick View: change a file may reset Explorer Preview mode

Post by *ghisler(Author) »

Yes, if the Explorer mode cannot display a file, TC has to switch to another mode. After that, it tries to keep that mode. I don't know how i could handle this in a better way.
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Quick View: change a file may reset Explorer Preview mode

Post by *Slavic »

In fact, this can be solved by assigning by default the Explorer Preview (8) to all files *.* in the Lister configuration. Then Lister will always attempt to use EP and switch to built-in only as failsafe mode. Such default configuration may be not very handy, but anyway it works. There is still a couple of problems, however.

First is due to lack of Options menu in QV mode, so we cannot see current mode and change it if need. Possible solution: "Options" for Quick View mode. There may be other solutions too; anyway, it's a suggestion.

Second is with indication of Explorer View: in Lister window it's shown as <Explorer> in the title. But QV doesn't have a window with title, and TC title better to keep as is. I'd suggest to add the line "<Explorer> filename" above the view area instead of only filename which is shown there. As a result, user will see the EV mode even without Options menu.

Because both problems are not as important to be solved ASAP, this thread can be moved to TC suggestions sub-forum.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6429
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Quick View: change a file may reset Explorer Preview mode

Post by *Horst.Epp »

Not a real existent problem for me and I guess many others.
I have Explorer view mode only configured for extension *.md and *.js.
For all other possible types I have plugins assigned, like SLister for PDF and Photoviewer for images.
ULister is the last in the list which displays *.*
So the list of plugins looks like this

Code: Select all

[ListerPlugins]
0=%COMMANDER_PATH%\PLUGINS\SLister\slister.wlx
0_detect="MULTIMEDIA& (EXT="PDF" | EXT="DJVU" | EXT="DJV"| EXT="XPS" | EXT="CBZ" | EXT="CBR"| EXT="EPUB" )"
1=%COMMANDER_PATH%\PLUGINS\PhotoViewer\PhotoViewer.wlx
1_detect="MULTIMEDIA & ext="BMP"|ext="ICO"|ext="JPG"|ext="JPE"|ext="JPEG"|ext="JP2"|ext="J2K"|ext="PNG"|ext="GIF"|ext="TIF"|ext="TIFF"|ext="PSD"|ext="TGA"|ext="PCX"|ext="PCD"|ext="WMP"|ext="WMF"|ext="EMF"|ext="AAI"|ext="JXR"|ext="WDP"|ext="DICOM"|ext="DCM"|ext="WEBP"|ext="PBM"|ext="PPM"|ext="HEIC"|ext="DNG"|ext="RAW"|ext="CRW"|ext="CR2"|ext="NEF"|ext="ORF"|ext="ARW"|ext="DCR"|ext="MRW"|ext="NRW"|ext="PEF"|ext="RAF"|ext="SRF"|ext="X3F"|ext="MEF"|ext="SRW"|ext="3FR"|ext="MDC"|ext="RW2"|ext="ERF"|ext="MOS"|ext="KDC"|ext="SR2""
2=%COMMANDER_PATH%\PLUGINS\DirSizeCalc\DirSizeCalcCharts.wlx
3=%COMMANDER_PATH%\PLUGINS\SVGView\SVGView.wlx
3_detect="MULTIMEDIA & ext="SVG"|ext="SVGZ""
4=%COMMANDER_PATH%\PLUGINS\HTMLView\HTMLView.wlx
5=%COMMANDER_PATH%\PLUGINS\EMLView\EMLView.wlx
5_detect="EXT="EML" | EXT="MSG"| EXT="WDSEML""
6=%COMMANDER_PATH%\PLUGINS\CSVView\CSVView.wlx
6_detect="EXT="CSV""
7=%COMMANDER_PATH%\PLUGINS\CudaLister\cudalister.wlx
7_detect="EXT="TXT" | EXT="LOG"| EXT="CMD"| EXT="BAT"| EXT="INI"| EXT="AHK"| EXT="REG"| EXT="MD5"| EXT="PS1"| EXT="JS""
8=%COMMANDER_PATH%\PLUGINS\fileinfo\fileinfo.wlx
9=%COMMANDER_PATH%\PLUGINS\ulister\ulister.wlx
10=%COMMANDER_PATH%\PLUGINS\SQLiteViewer\SQLiteViewer.wlx
10_detect="MULTIMEDIA & ext="DB" | ext="DB3" | ext="SQLITE" | ext="SQLITE3" | ext="FOSSIL""
Windows 11 Home x64 Version 23H2 (OS Build 22631.3296)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Quick View: change a file may reset Explorer Preview mode

Post by *Slavic »

Horst.Epp wrote: 2021-04-16, 12:16 UTC Not a real existent problem for me and I guess many others. [...]
I already tried to explain you (in other thread) that I test the beta version without added plugins and other enhancements and try to notice any strange or unobvious behaviour which cannot be seen otherwise. On my side, some people use TC installed as is with minimal changes of default settings. With TC 10 release, sure, I will add the plugins I often use, but not right now.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6429
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Quick View: change a file may reset Explorer Preview mode

Post by *Horst.Epp »

Slavic wrote: 2021-04-16, 16:13 UTC
Horst.Epp wrote: 2021-04-16, 12:16 UTC Not a real existent problem for me and I guess many others. [...]
I already tried to explain you (in other thread) that I test the beta version without added plugins and other enhancements and try to notice any strange or unobvious behaviour which cannot be seen otherwise. On my side, some people use TC installed as is with minimal changes of default settings. With TC 10 release, sure, I will add the plugins I often use, but not right now.
That sounds not logical for me but its of course your decision :)
I also test functions of the betas but use my normal environment for testing.
Specialy the area of viewing files with Lister would be useless for me without running plugins.
Thats the area in which TC is superiour compared to other file managers like XYplorer.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3296)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Quick View: change a file may reset Explorer Preview mode

Post by *Usher »

ghisler(Author) wrote: 2021-04-16, 10:15 UTCTC has to switch to another mode. After that, it tries to keep that mode. I don't know how i could handle this in a better way.
You can add option to keep the last mode selected by the user.
Andrzej P. Wozniak
Polish subforum moderator
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Quick View: change a file may reset Explorer Preview mode

Post by *Slavic »

On my side, it's almost fixed in TC 10 beta 7.
With text documents or pictures, every new file is attempted to be shown in mode 8, but if failed, mode is switched to a built-in. This failsafe does not affect the mode of next selected file; it is always 8 by default as set in Options.

However, the problem may happen with multimedia files. If you change a file when Lister shows a static screen of Windows Media Player, all is OK. But if new file is selected while current media is being played, then next media file is shown in binary mode (it's possible to switch manually to 8, however). Reproduced on sounds and videos.

I suppose it's not entirely a TC bug; maybe a problem is with time needed to switch external player from one media to another. Within this "dead" time the Explorer handler may return a fail code. If this assumption is true, some delay after new selection may help, but I am not sure.

Could anyone else test this, especially with additional plugins?
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick View: change a file may reset Explorer Preview mode

Post by *ghisler(Author) »

But if new file is selected while current media is being played, then next media file is shown in binary mode
This doesn't happen here. Can you give me more details? Here is what I tried:
1. Opened Lister configuration
2. Clicked "Define view method by file type"
3. Defined mode 8 for *.mp3
4. Ctrl+Q on mp3 file -> Explorer preview opens, but doesn't start playing
5. Click play
6. Click on a different mp3 file or use cursor keys
-> the next file opens also in Explorer preview mode.
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Quick View: change a file may reset Explorer Preview mode

Post by *Slavic »

Yes, exactly the same way failed here, the only difference is that mode 8 is set for all *.* files. Some additional info:
1. I use Windows 8.1 Pro with default Windows Media Player for most of media files; VLC player is also installed here, but not as a default player. So, double-click on a file like *.mp3 and *.wav opens the Media Player (compact window in my case).
2. I tested this with different files, here are two short wav sounds for mobile phone uploaded on Google Drive: waves.zip.
3. Besides Ctrl+Q, I also used Ctrl+Shift+Q to open separate Lister window; the result is the same.
4. Maybe the most important detail: the problem occurs not only during playing, but also after the end. So, you can press Play and wait until the sound ends, then select another sound file. Here it is always shown in Binary mode (2). Selecting next media like the first file returns to Explorer mode (with Media Player background image and control below).

I can give more details if it will help.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick View: change a file may reset Explorer Preview mode

Post by *ghisler(Author) »

Maybe the most important detail: the problem occurs not only during playing, but also after the end. So, you can press Play and wait until the sound ends, then select another sound file.
Do you have to choose specific file types for this to happen? For example, only when you choose a wav file while last playing an mp3 or so?
I ask because I still can't reproduce it.
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Quick View: change a file may reset Explorer Preview mode

Post by *Slavic »

No, this bug may happen with any media files, for example, two wav or two mp3 or two videos. First I supposed that something may be wrong with my Media Player: sometimes, not often, Window Media Player Rich Preview Handler (wmprph.exe 12.0.9600.17415) crashed at file changing. I decided to test on other PC.

I used Acer Travelmate TMB 113 laptop with the same Windows 8.1 Pro and TC 10 beta 7. I connected external HDD with videos, added *.* 8 to Lister config and tested Quick View. With avi or wmv videos, this bug happens unfrequently, less than in half of cases. Whether I change a file during playing media, or change when playing was paused - the result is unstable. Apparently it happens much less often if the second media file was recently opened, and most often if it was never viewed/played before. Maybe the Windows cache affects this. Anyway it's a random bug on laptop, unlike my main PC.

I will add more info if find other clues.

=================================
P.S. I tried to check API calls on PC and see that OLE call:

CoCreateInstance (Windows Media Player Rich Preview Handler, NULL, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER, IPreviewHandler, ppv)

always returns S_OK - either after new file is selected without playing (when mode 8 remains) or during/after playing (when mode changes to Binary).
The only difference is in amount of subsequent calls IsEqualGUID(): in a "good" case the last call returns TRUE, while in a "bad" last 4 calls return FALSE.
Not sure that it's much helpful, but anyway...
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Quick View: change a file may reset Explorer Preview mode

Post by *Slavic »

Possible solution
I suspect that the problem roots in some improper re-initialisation of multimedia handler after playing a media file. If we can reset it one way or another, it should be initialised well next time. So, I created two test files: notext.txt with 0 bytes and 1x1.bmp with white 1x1 dot. Any of them works well:

Quick View > select media file > play it > select second media > mode 2 is set (in most cases)
Quick View > select media file > play it > select notext.txt > select second media > mode 8 is set
Quick View > select media file > play it > select 1x1.bmp > select second media > mode 8 is set

One such file may be used internally as intermediate selection after playing (or even selection of playable media without playing, no harm). User will not notice this short process. Maybe some kind of reset or simply close and reopen the multimedia handler without such "remedy" as intermediate file may give the same result. But I cannot test it because need to change TC code.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Quick View: change a file may reset Explorer Preview mode

Post by *Usher »

2Slavic
When you want to play multimedia in Lister/QuickView, the program (Lister, Explorer, some plugin) has to load needed filters/codecs on start and unload them on close or on switching to the next file. Both actions take some time and during that time filters/codecs are unavailable.
If I understand correctly, TC already forces LAVfilters unload on close for Lister in mode 4. IMHO there may be some delay needed when switching Lister/QuickView to the next file in both modes 8 and 4.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quick View: change a file may reset Explorer Preview mode

Post by *ghisler(Author) »

2Slavic
Could you please test this also with Total Commander 9.51? You can simply install it as an "update" and keep all settings. I would like to know whether this is a new problem of Total Commander 10, or if it was already in 9.51. Reason: I cannot reproduce it and didn't get any similar reports for 9.51. The beta is used only by a small group, so not getting any similar reports doesn't say much.
Author of Total Commander
https://www.ghisler.com
Post Reply