TC has stopped working - Lister and encoding bug
Moderators: white, Hacker, petermad, Stefan2
-
- Junior Member
- Posts: 6
- Joined: 2015-10-24, 11:37 UTC
TC has stopped working - Lister and encoding bug
Hi,
I've found one issue that is connected with lister and encoding and copying the file content.
It's repeatable, so it's easy to find what is wrong.
The scenario:
1. Preview the file with specific content and encoding, so press F3 (the file is attached in this post)
2. Options > 7 UTF-8 or press 7
3. Select all and copy: Ctrl+a, Ctrl+c
Bum! Total commander has stopped working.
Confirmed by my friend also.
The file that is a cause of an issue:
drive[dot]google[dot]com / file / d /0B5NjQ0lF47OLSkdCWlgyRTFLNkU/view?usp=sharing
Hope it can help you with a fix for it.
I've found one issue that is connected with lister and encoding and copying the file content.
It's repeatable, so it's easy to find what is wrong.
The scenario:
1. Preview the file with specific content and encoding, so press F3 (the file is attached in this post)
2. Options > 7 UTF-8 or press 7
3. Select all and copy: Ctrl+a, Ctrl+c
Bum! Total commander has stopped working.
Confirmed by my friend also.
The file that is a cause of an issue:
drive[dot]google[dot]com / file / d /0B5NjQ0lF47OLSkdCWlgyRTFLNkU/view?usp=sharing
Hope it can help you with a fix for it.
I can not confirm this issue. My TC doesn't crash with your file. Do you have any Lister plugins installed? If so, does TC crash when you avoid loading them by launching Lister via Alt+Shift+F3?
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
-
- Junior Member
- Posts: 6
- Joined: 2015-10-24, 11:37 UTC
No - I don't have any plugins.
To be sure that this is a bug in tc I just installed clean / fresh total commander without any plugins.
To be sure I must say that i'm viewing txt file by the lister in following way
- F3
- 7
- Ctrl+A
- Ctrl+C
Crushed!
A video that i recorded to show the steps:
youtu[dot]be/-P52lBwQp6Q
To be sure that this is a bug in tc I just installed clean / fresh total commander without any plugins.
To be sure I must say that i'm viewing txt file by the lister in following way
- F3
- 7
- Ctrl+A
- Ctrl+C
Crushed!
A video that i recorded to show the steps:
youtu[dot]be/-P52lBwQp6Q
On which OS are you testing?
There are some control characters in the text.
When using the UTF-8 view, TC will probably recode the text via MultiByteToWideChar,
which is known to work differently on different OSes.
Also: which TC version (32-bit or x64)?
There are some control characters in the text.
When using the UTF-8 view, TC will probably recode the text via MultiByteToWideChar,
which is known to work differently on different OSes.
Also: which TC version (32-bit or x64)?
TC plugins: PCREsearch and RegXtract
-
- Junior Member
- Posts: 6
- Joined: 2015-10-24, 11:37 UTC
Now I can confirm a crash on TC x64 and Win7.
The 32-bit version is not affected.
The 32-bit version is not affected.
TC plugins: PCREsearch and RegXtract
-
- Junior Member
- Posts: 6
- Joined: 2015-10-24, 11:37 UTC
- ghisler(Author)
- Site Admin
- Posts: 48096
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
It seems to happen because the file doesn't contain valid UTF-8. I will check why it crashes.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 6
- Joined: 2015-10-24, 11:37 UTC
- ghisler(Author)
- Site Admin
- Posts: 48096
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The problem was that the conversion from UTF-8 to UTF-16 failed and returned "-1" as length. This was interpreted as 2GB-1byte by TC 64-bit. When trying to set the 0 byte at the end, it crashed with an access violation. Nothing dangerous because the system was not allowing to write there. I will change it so it will be possible to handle also incomplete UTF-8 codes.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com