2
AkulaBig
from
this comment i gather you are the author of the TCSumatraPDF plug-in. As there is no dedicated forum thread here for TCSumatraPDF and me being unable to find any other venue for filing bug reports for TCSumatraPDF, please excuse me for using this thread to report a quite severe bug.
I was and am using the SumatraPDF as viewer (associated with the .pdf file extension) for PDF files on my Windows 11 box. So, installing TCSumatraPDF plug-in to integrate SumatraPDF also in TC would make perfect sense. However, in a scenario like mine where i want to use SumatraPDF stand-alone as well as within TC, things can go badly quite quickly.
TC version: 11.01, x64
TCSumatraPDF version: 1.6, x64 (downloaded from
https://totalcmd.net/plugring/wlx_TCSumatraPDF.html)
SumatraPDF version: 3.5.2, x64
OS: Windows 11 Pro 23H2, x64, english
sumatrapdf.ini:
Code: Select all
[Options]
path64=C:\Program Files\SumatraPDF\SumatraPDF.exe
The path64 specified in my sumatrapdf.ini is the path of the SumatraPDF.exe that is also used for stand-alone PDF viewing (outside of TC).
When there is already a stand-alone SumatraPDF viewer running, TCSumatraPDF (or the SumatraPDF instance started by TCSumatraPDF; i don't know the implementation of the TCSumatraPDF plug-in to make a definite statement) will hijack this stand-alone SumatraPDF viewer instead of creating its own SumatraPDF instance for lister/quick-view in TC. This freezes TC, and messes up the UI of the stand-alone SumatraPDF viewer instance (when a navigation key like one of the cursor keys is then pressed in SumatraPDF). Even worse, it seems to intercept keyboard events on a global level, messing up keyboard input of other unrelated applications (like the cursor keys for example).
Steps to reproduce:
1. Close all instances of SumatraPDF, whether stand-alone or in TC.
2. Open a PDF in stand-alone SumatraPDF viewer (outside of TC).
3. Open some (larger) web page in a web browser and confirm that you can scroll the web page with the cursor keys. (I am using Firefox.)
3. Switch to TC (with TCSumatraPDF installed), and press F3 on another PDF file for viewing it in lister.
Observed issues:
- Unexpectedly, the PDF file is not being opened in lister but in the stand-alone SumatraPDF instead.
- TC freezes, and "(Not responding)" appears in its title bar when trying to click on the TC window.
- Switch to the web browser showing the aforementioned larger web site. Trying to scroll it with the cursor keys won't work, pressing a cursor key will switch from the web browser to the SumatraPDF viewer instead.
- Pressing cursor keys (or probably other navigation keys) in the SumatraPDF viewer now makes its tab bar and the min/max/close buttons in its top right corner disappear.
Also, sometimes it is impossible to close the SumatraPDF viewer with ALT+F4 when this problem occurs, sometimes it is possible to still close it with Alt+F4. But i have not invested the time yet to discover the conditions required for ALT+F4 to stop working for the stand-alone SumatraPDF viewer (seems possibly be related to trying to ALT+TAB to TC, but i am not entirely certain about it).
Workaround:
The bug seems to be reliant on both the stand-alone SumatraPDF viewer and TCSumatraPDF using the same path to the same SumatraPDF.exe executable. Therefore, to side-step this issue it is sufficient to make a copy (or symlink) of SumatraPDF.exe in a different directory and/or with a different file name. One SumatraPDF executable is used as stand-alone viewer (associated with the .pdf file extension), and the copy (or symlink) of the SumatraPDF executable is then used for TCSumatraPDF.
If you can't fix the issue in code and prefer affected users doing the workaround i described, i think would be nice to include an advice to this effect in the plug-in's readme.txt and caveat/rewrite this sentence in the readme.txt
readme.txt wrote:
For the installed SumatraPDF, you must specify the paths to its executable files
SumatraPDF.exe in the sumatrapdf.ini file, which is automatically created in the
folder plugin after the first use.
-----------------------------
(I also noticed another cosmetic responsiveness issue when TCSumatraPDF is used in lister and for quick-view at the same time, but this issue is not only minor but also unrelated to the bug i report above. And it might even perhaps be resolved coincidentally by a fix for the reported bug. So, i am undecided whether this would be worth reporting...)