Handling of bad sectors

Features wanted...
Post Reply
Kob
Posts: 22
Joined: 20 Apr 2011 13:27

Handling of bad sectors

Post by Kob »

Right now, when I try to get into a directory with bad sectors, the program hangs for a few minutes. Every operation on files there (even just a file selection) hangs XYPlorer for some additional minutes. Trying to get out of that directory is almost impossible (more than 10 minutes, needing to kill the XYPlorer process).
Windows File Explorer also hangs in there, but only for a relatively short duration and let me get in and out of the bad directory much faster (in 20-30 seconds or so).

It would be nice to have a feature in XYPlorer that would let the user avoid the lengthy time priod trying to get into a directory with bad sectors or touch a file in there, with an adjustable lockout period. A popup message that an I/O error has been encountered would be great.

As a reference, there are disk management programs (e.g. DiskGenius) that allow me to set a timeout on bad sector reading, and contrary to CHKDSK, I can set in the DiskGenius program the time limit to a reasonable 200 mS lockout and check the sectors for "badness" really fast.

(Tested with XYPlorer 28.30.1700 on Win Server 2012R2)

Horst
Posts: 1398
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Handling of bad sectors

Post by Horst »

A file manager is not designed to handle bad sectors.
It uses Windows API's to read from disk.
Fix the file system and/or replace the hardware is the final solution.
Windows 11 Home, Version 25H2 (OS Build 26200.9168)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1422b (x64), Everything Toolbar 3.2, Listary Pro 7.0.0.9 beta

Kob
Posts: 22
Joined: 20 Apr 2011 13:27

Re: Handling of bad sectors

Post by Kob »

When suddenly there is a bad sector in a directory, XYPlorer hangs or crashes if you try to get into that directory.
You can not use XYPlorer to retrieve any good file from there.

On the other hand, Windows' File Explorer (Windows native file manager) does let you enter and retrieve good files.
Also, FastCopy has no problem listing the directory content and copy all the good files from that directory.

eil
Posts: 1887
Joined: 13 Jan 2011 19:44

Re: Handling of bad sectors

Post by eil »

If Don could find some delicate way to catch such situations and provide "Warning+Ignore" behavior, it actually could be useful. I had similar situations as topic starter and XY definitely handles "dirs with bads" worse than other file managers - even Explorer handles them better, though i usually used TotalCommander in such situations.
Surely, the "bads" aren't a work-field of XY, but at least not hanging on them would be good. I'd presume, hanging happens due to lots of info retrieved when dir is opened in XY, and other managers do less(obviously cause less features on board), so those hang only if user tries to do smth exactly with "bad" items and work fine when it's about others.
Win 7 SP1 x64 100% 1366x768|1900x1080

rpnfan
Posts: 85
Joined: 07 Jan 2016 21:42

Re: Handling of bad sectors

Post by rpnfan »

Horst wrote: 11 Aug 2026 17:10 A file manager is not designed to handle bad sectors.
It uses Windows API's to read from disk.
Fix the file system and/or replace the hardware is the final solution.
A file manager should be designed to handle "bad" situations gracefully, that includes bad sectors, network drives not be available, displaying information and giving options to the user _if_ something does not go nicely. Exactly that is one differentiating feature of a great file manager. I used Salamander for many years and it handled different situations better than the Explorer. XY handles these mostly similar, sometimes even worse.

I still use XY for other reasons, but hope the program will become more robust in the future.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Handling of bad sectors

Post by highend »

A file handler should handle files, not underlying hardware errors.
Map bad sectors out or if that isn't possible anymore, replace the drive^^
One of my scripts helped you out? Please donate via Paypal

Kob
Posts: 22
Joined: 20 Apr 2011 13:27

Re: Handling of bad sectors

Post by Kob »

highend wrote: 12 Aug 2026 14:43 A file handler should handle files, not underlying hardware errors.
Map bad sectors out or if that isn't possible anymore, replace the drive^^
Some years ago, XYplorer got stuck on a startup if an assigned netwok drive had been off. The community response was not "this is a network issue - fix your network first". Don fixed the hanging issue in a subsequest update. Disk issues should be handled the same - via a watchdog timer or whatever, but leading the user to reboot because the XYplorer program sometimes is hung for minutes after attempting to kill the process is no fun.

Native2904
Posts: 143
Joined: 23 Apr 2025 18:48
Location: Aachen

Re: Handling of bad sectors

Post by Native2904 »

2Kob

Just a quick question – if you get that error on a shared hard drive, why don’t you run ‘chkdsk C: /R’ in the console and sort out the problem for the future, it's faster as waiting any time.
Lts. 64-bit XY-Port. ƒ JetBrainsMono @ Windows 11 Pro 24H2 ▣ 1920x1080 ⇵ 115%
xytags4tc

Kob
Posts: 22
Joined: 20 Apr 2011 13:27

Re: Handling of bad sectors

Post by Kob »

Native2904 wrote: 12 Aug 2026 18:56 2Kob

Just a quick question – if you get that error on a shared hard drive, why don’t you run ‘chkdsk C: /R’ in the console and sort out the problem for the future, it's faster as waiting any time.
I did run CHKDSK (actually with the /B switch, which is a superset of /R), but neither it nor other disk utilities, although they found the bad secor, could mark it to let the OS bypass it. The only viable solution was to remove all good files from that volume and do slow format to map out the bad sectors.

Post Reply