HTMLView Bug

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

HTMLView Bug

Post by *romulous »

Hi everyone,

Just posting this here just in case HTMLView is still being developed (using the 1.2.4 version from http://htmlview.googlepages.com/ site, but the same happens with the 1.1 version from totalcmd.net), and the author frequents here (couldn't find any other contact info for them). I have a bit of a bug with the plugin at my end:

1. Save a MHT file from a website in your browser (say test1.mht)
2. Save another MHT file from a DIFFERENT website in your browser, to the same folder as the first file, but with a different filename (say test2.mht)
3. You should now have two different MHT files in the same folder
4. Open the first MHT (test1.mht) file using Lister and HTMLView
5. Close Lister
6. WITHOUT DOING ANYTHING ELSE FIRST, rename the second MHT file to the first MHT filename (in other words, copy test2.mht to test1.mht)
7. Open the first MHT file again (test1.mht)
8. Instead of showing the contents of the second MHT file (test2.mht), the contents of the first MHT file are shown (test1.mht, this is why the two files have to have different content, and you cannot just create the second by copying test1.mht to test2.mht)

Note that renaming the files is the quick way to reproduce the bug. The main way it otherwise occurs, is if you save test1.mht, then move or delete it, and then later - without having closed TC - save another webpage to your hard drive, giving it the same name as the original (test1.mht). This is a daily occurrence for me, as I save a lot of webpages to my hard drive.

Christian thinks the plugin is not unloading itself (oddly, unloading a plugin is listed as a fix in v1.2.3 for the plugin, but it still doesn't work), and it ignores a TC button to use the cm_unloadplugins command (that is, the effect is the same even if you try viewing the second file after clicking the button), so I don't know what the problem is. However, if you shut TC down after step 6, and then re-open TC and view the first MHT file, the correct contents will be shown. Sadly, I've only in the last few months became aware of this bug, and have deleted probably quite a number of MHT files I didn't think I needed, because I THOUGHT I already had a copy of them (i.e. when viewed in Lister, they were showing the contents of another file entirely, so I've gone "Oh, I already have a copy of that file, I can delete this one").

CM
Last edited by romulous on 2009-08-16, 09:00 UTC, edited 4 times in total.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

Cannot confirm. It works as expected here.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

I've just edited my original post, to remove reference to HTML. Try with MHT (has to unpack to view, HTML does not need to be unpacked - I am not actually sure if the bug occurs with HTML files as I only save webpages in MHT) only. 100% reproduceable when done correctly. Also clarified:
1. That the two files have to have DIFFERENT content, otherwise you will have no idea you've encountered the bug.
2. Do not do anything else in between when you close Lister for the first time, and when you copy (Shift+F5, change the filename) the second MHT file over the top of the first.
Last edited by romulous on 2009-08-16, 09:04 UTC, edited 1 time in total.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

I used MHT files and followed your directions and it still works fine for me. It shows whatever the file actually contains. I cannot reproduce your bug. I tried it numerous times.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

Confirmed!

It can also be reproduced without copying: you can delete both files, copy something different into the same directory and rename it.

And this is rather serious.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

2fenix_productions
What exactly did you do? I couldn't get it to act up for me.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

fenix_productions wrote:Confirmed!

It can also be reproduced without copying: you can delete both files, copy something different into the same directory and rename it.

And this is rather serious.
Yeah, it is a serious one (I've lost data because of it - when I think of just how many times I've deleted a file after viewing in Lister because it looked to be the same file as one I had just moved or removed, I get really depressed), and yes, that way will also reproduce it. The critical thing I think is that somehow - and there are multiple ways - the second file has to be given the same filename as the first.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

Well, so far I can't reproduce it so I can't help you guys.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Boofo
Two files in one directory:
- 7zip.mht
- blat.mht.

Both are some threads from this board.

1. hit F3 on 7zip.mht and get preview,
2. delete this file,
3. focus on blat.mht and hit Shift+F6,
4. rename it to 7zip.mht,
5. hit F3 and see already deleted file.

The closer I look the stranger it gets.

I could reproduce it every time I've tried but now I can say it is not always happening. I will try to find some pattern.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

2fenix_productions
Still can't reproduce it. It is working like it should and showing the correct file. Do you both have IEView installed, too, by chance? I don't.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

Nope, not me. I only have two Lister plugins installed:
HTMLView
EML Viewer
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

What is EML Viewer? I never heard of that.

I still can't reproduce your bug, sorry. What is your WATCHDIRS setting at in the wincmd.ini file?
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Boofo
I did more testing and I can no longer confirm any problems with HTMLview 1.2.4 here. It started to work correctly after complete plugin removal and adding it once again.

I had compared all settings which differ from old and new installations and found nothing. I have no idea what was wrong.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

2fenix_productions
Strange. romulous must have something messing with it somewhere. Would WATCHDIRS or another setting in the wincmd.ini affect that at all?

Do you also have IEView installed?
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
User avatar
romulous
Senior Member
Senior Member
Posts: 226
Joined: 2003-11-19, 04:10 UTC

Post by *romulous »

Boofo:
EML Viewer: http://www.totalcmd.net/plugring/wlx_msg.html (basically views emails in MSG or EML format)

There is no watchdirs line in my wincmd.ini

fenix_productions:
How did you remove the plugin? Just remove it from Options-Plugins-Lister Plugins, and then re-added it? Or did you remove it from there, totally delete the HTMLView install folder, then reinstalled it?
Post Reply