[Beta] EMF are always shown in Lister/thumbnails

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

ghisler(Author) wrote:That's NOT the problem - the problem is that I cannot exclude that an unpatched version exists with version number between 5.1.2600.1789 and 5.1.2600.1999, so it would be risky to assume that. What do you think?
Maybe you could check for the Servicepack number? With SP1 version 1798 and up will be okay with SP2 2880 and up. For W2K it may be a different version, too.

Or maybe you could give a msgbox if the display is blocked:

The display of WMF/EMF Thumbnails is disabled because a security hole in gdi32.dll. If you already use an updated version you can enable this option with wmfallowed=1-3 in wincmd.ini. Dont show this message again(tickbox).



or anything

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Maybe you could check for the Servicepack number? With SP1 version 1798 and up will be okay with SP2 2880 and up. For W2K it may be a different version, too.
In principle it's a very good idea, but what if an unpatched SP2 update dll was installed on SP1?
The display of WMF/EMF Thumbnails is disabled because a security hole in gdi32.dll. If you already use an updated version you can enable this option with wmfallowed=1-3 in wincmd.ini. Dont show this message again(tickbox).
This would be a valid solution, but would delay the release of TC 6.54 by at least 1-2 months until I have all translations (translators may be on vacation or busy, it always took a while until I had the translations).
Author of Total Commander
https://www.ghisler.com
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3300
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

I think everybody who doesnt update XP to SP2 should live with the way it is right now... today there is now reason not to update to sp2 for security reasons :)
Hoecker sie sind raus!
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
I sent those two images to you, sorry for the delay.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, got them! They don't display at all here on Win98SE. Any lister plugins installed?
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
Again, sorry for the delay, very many tests had to be performed... :( Well, here are the results (all on Win98SE). By 6.54 only 6.54pb2 is meant, pb3 was not tested yet.

:arrow:
1. About the color artifacts.
The cause of the wrong colours and of the dialog box was found: it is the EMF filter from MS Office 2000 package:
C:\Program Files\Common Files\Microsoft Shared\Grphflt\EMFIMP32.FLT
It is used only if Use Explorer method (OLE2) checkbox on the Settings - Thumbnails dialog box is turned on (and when either Get from Lister plugins turned off, or when there are no plugins installed). All other tests were performed with this filter removed.
But there is still a question: why does 6.54 use this filter, while 6.53 does not? :?:

:arrow:
2. About plugins.
Here are the results of viewing images without plugins and with them on two TC versions: 6.53 and 6.54pb2. There were 3 modes:
1. No plugins at all.
2. Using Imagine (0.9.0.0 - Sep 16 2005)
3. Using SGViewer (1.8.7 RC - Jan 5 2006)

In the tables below the following signs are used:
+ : image is shown correctly
: image is not shown at all
x : plugin fails (see details below)

First, 6.53, depending of whether a plugin is used:
                     No plugins  Imagine  SGViewer
EMF–Lister          +             +               +
WMF–Lister         +             +               +
EMF–Thumb         –             +               +
WMF–Thumb       +             +               +

Then, 6.54 without plugins, depending of the WmfAllowed option:
WmfAllowed    -1    0   1    2    3
EMF–Lister        –    –    +    –    +
WMF–Lister       –    –    +    –    +
EMF–Thumb       –    –    –    –    –
WMF–Thumb      –    –    +    –    +

Then, 6.54 with Imagine installed, depending of the WmfAllowed option:
WmfAllowed    -1    0   1    2    3
EMF–Lister        –    –    +    –    +
WMF–Lister       –    –    +    –    +
EMF–Thumb       –    –    +    –    +
WMF–Thumb      –    –    +    –    +

And finally, 6.54 with SGViewer installed, depending of the WmfAllowed option:
WmfAllowed    -1    0   1    2    3
EMF–Lister        –    –    x    –    x
WMF–Lister       –    –    +    –    +
EMF–Thumb       –    –    +    –    +
WMF–Thumb      –    –    +    –    +


By "plugin fails" the following is meant: when trying to load the image one of two situation occurs: either
1: double error message about access violation is shown, and Lister then shows the file by itself (without the plugin), or
2: message box about fail on calling OS system function, and it cannot be closed at all, restart of TC is needed.


So, as we can see, Lister shows the thumbnails even without plugins at all, but plugins are needed for EMF thumbnails.
The questions for this part of tests are:
1. Why is there errors in SGViewer while in 6.53 the same SGViewer version works well? :?:
2. Why does TC show EMF images in Lister but does not show them in thumbnails? :?:


:arrow:
3. Summary.
To summarize all this post, I'll write here only problems found:
1. Using the MS Office filter by 6.54 TC version.
2. Errors while using SGViewer with EMFs in TC 6.54.
3. TC 6.53/6.54 shows EMFs in Lister (even without no plugins) but not in thumbnails.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2Flint
Thanks for your very extensive tests! Here are my comments in detail:
1. The color artefacts: Did you install 6.53 and 6.54 to the same location, and start with the same dir? Was office running or not? TC 6.53 and 6.54 call the OLE extract method in the exact same way, so the problem must be releated to these filters - once they get called and once not.

2. About plugins
- 6.54 without plugins behaves as expected
- 6.54 with Imagine also behaves as expected
- 6.54 with SGViewer: Please retry after a reboot. Maybe something got corrupted here. I checked my code, lister plugins are called 100% like in TC 6.53.

About your questions:
Why is there errors in SGViewer while in 6.53 the same SGViewer version works well?
Sorry, I don't have any explanation.
Why does TC show EMF images in Lister but does not show them in thumbnails?
Lister and thumbnails are two completely separate parts of the program. Lister uses the TImage component in Delphi to display bmp, ico, wmf, and emf files. The thumbnail function uses irfanview, ole2 (Explorer) and Lister plugins to load wmf and emf files. No internal functions exist to load EMF files in thumbnails.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I'm replying to my own question here:
That's NOT the problem - the problem is that I cannot exclude that an unpatched version exists with version number between 5.1.2600.1789 and 5.1.2600.1999, so it would be risky to assume that. What do you think?
I have now checked many of my MSDN CDs and DVDs, and found out the following version numbers for gdi32.dll:
XP original eng+ger (home+pro): 5.1.2600.0
XP sp1a eng+ger: 5.1.2600.1106
XP SP2 eng+ger very first official release: 5.1.2600.2180

Patched versions (WMF patch):
XP SP1: 5.1.2600.1789
XP SP2: 5.1.2600.2818

So it seems to be safe to assume that Microsoft started with minor version numbers somewhere above 2000 for SP2, when the release had minor version 2180. I will therefore implement what I suggested above: assume that all gdi32.dll versions between with version number between 5.1.2600.1789 and 5.1.2600.1999 are patched.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
We do apologize: some of tests were incorrect. :( After new (more accurate) testing it was found that the MS Office filter is used by all TC versions 6.50-6.54pb3. So, the only problem with this filter is why it creates incorrect thumbnails, but this may be some bug in the filter itself.

Now, to the other questions.

:arrow:
1. Lister/Thumbnails showing.
Thanks for the explanation, now we understand.
So, a natural feature request: ;)
to make these two parts of the program behave equally to each other, because the current misbehaviour may confuse the users. (Of course, it's not critical, maybe for v7?)

:arrow:
2. SGViewer.
Please retry after a reboot.
Of course, it was one of the first things that was done. :)
Now, SGViewer was tested more thoroughly. Here are the results:
a. In 6.54pb3 it crashes "harder": now it either throw 3 message boxes instead of 2 that were in 6.54pb2 (I hope, in pb4 it will not change into 4 error messages :D ), or (more frequently) TC itself just crashes with the message about invalid operation.
b. Under Win2k this plugins behaves very strangely: on clear TC (with only this plugin and Imagine installed) it works correctly. But when my friend (all this testing is still performed on his computer) moves his fully customized TC onto that Win2k machine, SGViewer just stops working: it does not show errors, and also it does not handle images. TC works as if SGViewer is not installed at all.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2Flint
Thanks for your further tests. A question: there is no pb4 - do you mean non-public beta 4?
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
A question: there is no pb4 - do you mean non-public beta 4?
That was just a joke. :D
I meant: in 6.54pb2 SGViewer throws 2 message boxes; in 6.54pb3 - 3 message boxes. So, one may suppose that in the future 6.54pb4 (if it will be released) this plugin will throw 4 message boxes. :)
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Ah, I see. :)

I know of at least one plugin which doesn't work well when loaded for thumbnail extraction first. Try this: Start TC in normal view, view a file with sgviewer with F3, then view the thumbnails. Does it work better now?

If yes, the plugin writer will need to work at the multi-threading abilities of his plugin.
Last edited by ghisler(Author) on 2006-01-31, 09:39 UTC, edited 1 time in total.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
Try this: Start TC in normal view, view a file with sgviewer with F3, then view the thumbnails. Does it work better now?
No, it didn't help. :(
All it seems like there is some bug in SGViewer that was "hidden" in 6.53 but was revealed in 6.54 because of some changes in TC code. We'll try to contact the author of this plugin, maybe he will be able to reproduce this bug and describe the situation in more details...
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, this would be nice. I will not wait with the release of TC 6.54, though - all other plugins seem to work just fine both with TC 6.53 and 6.54.

Btw, I have just tried SGViewer here with some WMF and EMF thumbnails - it did not crash, not with Total Commander 6.53 and not with 6.54. The only way to crash it was with some "denial of service" sample WMF files which use a yet unpatched WMF bug. According to security sites, this bug cannot be used for attacks, though.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
I will not wait with the release of TC 6.54
Yes, we think that would be the best solution in current situation. Maybe, it will become more defined by v7.0.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
Post Reply