Lister crashes on reading beyond file

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
AniseSoup
Junior Member
Junior Member
Posts: 6
Joined: 2020-08-25, 00:25 UTC

Lister crashes on reading beyond file

Post by *AniseSoup »

When opening a file in Lister and somehow reading beyond the end of the file, tcmd crashes.

Steps to reproduce:
[*]open a file for viewing in Lister; in my case ~500MB
[*]navigate towards the end of the file; in my case ~80%
[*]overwrite/truncate the opened file with a smaller one; in my case ~50MB
[*]navigate in any direction in Lister, but still being beyond the file's end
[*]crash occurs

I have a memdump of the crash, but I believe the bug is very reproducible.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: Lister crashes on reading beyond file

Post by *gdpr deleted 6 »

I cannot reproduce with TC 9.51 32-bit and 64-bit on Windows 7 x64 Pro.

I tested with lister in both binary and text only mode, and made separate tests for "wrap mode" on and off.
The files i used were just some random files with binary content. File sizes were about 650 MB and 12 MB, respectively.

After overwriting the file (using TC itself to copy the new smaller file over the bigger file) and scrolling up/down in lister (step 4 in the issue report), lister window will eventually go blank because there is no file content to show. When scrolling (the blank) lister window up to a point that is within the scope of the new file, then lister shows the content of the new file.

It seems the problem is not very reproducible. :(


Try to reproduce your problem with a fresh INI file (i.e., one with default settings only). To do so, start TC with the following command line:

Code: Select all

<PathToTcExe>\totalcmd64.exe /i=<PathToDummy>\test.ini
(Replace <PathToTcExe> and <PathToDummy> with the directory paths to TC and the location you would like to put the fresh test ini. If you are running on some 32-bit Windows, use the totalcmd.exe instead of totalcmd64.exe. Your normal INI file with all your user settings will not be affected by this, and if you run TC without the /I parameter, it will use your normal INI file again.)

Report back if you can or cannot reproduce the problem with a fresh INI file. If the problem disappears with a fresh INI file, then there would be something in your lister settings that is required for the problem to occur. In this case, either tell us in detail the lister settings and lister plug-ins in use when observing the problem. Or, alternatively, post your INI file here (but you might want to go through it and strip any personal/private/confidential information from it before you make it public here on the forum)
AniseSoup
Junior Member
Junior Member
Posts: 6
Joined: 2020-08-25, 00:25 UTC

Re: Lister crashes on reading beyond file

Post by *AniseSoup »

I have managed to crash tcmd in the first try, new ini did not seem to solve it (and I can confirm a new ini was used). :D
Would you like me to record my desktop and give it another try?
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: Lister crashes on reading beyond file

Post by *gdpr deleted 6 »

If you can capture it, it would be most appreciated. It would also be helpful to specify what OS and OS version you are using, and the nature of the drive/volume on which the files reside. If you do the capture, also show the lister settings as displayed in the Lister's Options menu. This will help people trying to reproduce your problem.
AniseSoup
Junior Member
Junior Member
Posts: 6
Joined: 2020-08-25, 00:25 UTC

Re: Lister crashes on reading beyond file

Post by *AniseSoup »

Hello,
I am using W10 x64 version 2004 (build 19041.450) with 64-bit TCMD version 9.51. The issue occurs on 32-bit TCMD aswell.
The drive in the video is a nothing-special-about-it 2TB HDD, but the issue occurs on another HDD and SSD aswell. My laptop (same Windows same TCMD, SSD) seems to have the same problem. Issue occurs with different file content "types": .txt file filled with "0" or .bin file filled with "\0".

Video link
The 2 terminals opening right after the crash are procdump creating a memdump. I can confirm that the issue occurs with or without prodcump.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: Lister crashes on reading beyond file

Post by *gdpr deleted 6 »

I guess somebody with Win10 2004 needs to try reproducing the problem. I attempted to mimick what you have done in the video as closely as possible. Lister settings, file sizes, file name, zero byte content, Explorer window with the test folder open, "Explorer copy" through context menu copy&paste. I even tried to mimick your mouse movements as closely as possible. Still no crash. But i am running Win7, so there is one known variable i myself cannot account for. :(
AniseSoup
Junior Member
Junior Member
Posts: 6
Joined: 2020-08-25, 00:25 UTC

Re: Lister crashes on reading beyond file

Post by *AniseSoup »

I managed to crash on W10x64 ver 1909, but oddly enough, on an 1809 the issue does not seem to reproduce. Lister just blanks and keeps displaying data up to the end of the file. Unfortunately, that's all I have in terms of OS'. I'll try and see if I can find a W7 machine lying around.

here are the dumps corresponding to the crash in the video, maybe they will be useful.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Lister crashes on reading beyond file

Post by *ghisler(Author) »

Thanks for your report, I will try to reproduce it. Does it only happen in Binary mode, or also in Text mode?
Author of Total Commander
https://www.ghisler.com
AniseSoup
Junior Member
Junior Member
Posts: 6
Joined: 2020-08-25, 00:25 UTC

Re: Lister crashes on reading beyond file

Post by *AniseSoup »

Both modes.
Post Reply