Page 1 of 1

Sal 2.5 hangs when copying certain files

Posted: 02 Oct 2007, 01:41
by Apotres
When I copy files from a certain CD, I get an error message:
Error: (23) Data error (cyclic redundancy check).
The cancel button does not always work as expected. Even if I try to quit Salamander, clicking on the button [Cancel all operations] it just hangs.
This same problem occurs often if it comes to deal with corrupted files in the process of copying.

Posted: 02 Oct 2007, 07:36
by Jan Rysavy
Could you please test the same operation in Windows Explorer and let us know what happen? It looks like standard Windows or driver behavior.

Re: Sal 2.5 hangs when copying certain files

Posted: 02 Oct 2007, 15:13
by Apotres
Most of the files on the CD did copy correctly outside of Salamander. The 2 first subdirectories copied entirely, the 3rd (and last), when it got to a point of not being able to read the CD, it just gave a message saying it could not read files, I clicked OK and it just stopped normally without crashing. So I tried again the same operation in Salamander (only the 3rd subdirectory). It won't even start to copy the files of this directory. I click [Cancel] and it does not abort immediately this operation. When I try to quit Salamander, it says Checking path "E:\", press the ESC key to cancel, so I click ESC and it gives the message to [Cancel all operations].. and it says again Checking path E: ..., it loops around these 2 messages, until the 3rd time and finally it did quit Salamander. The annoyance is that it takes almost 5 minutes to finally quit Salamander. So I retried several times the same operation. If I cancel the copying process it does quit the operation after about 15 seconds. So it is quite reasonable. The crashes I experienced yesterday in Salamander could well have been related to an unstable Windows session, since I finally had to reboot the computer to get the other programs to work properly.
So it may be related to Windows XP SP2 after all.
Thank you for your time. Salamander is an excellent program, and I really use it in most situations. One tool I really appreciate particularly is the batch renamer. That it a great time saver!
Thanks again. SJ

Re: Sal 2.5 hangs when copying certain files

Posted: 02 Oct 2007, 15:17
by Apotres
Also, I have to mention that after receiving the redundancy error in Salamander, when I retry to copy the same files that did copy OK the first time, nothing will copy anymore in plain Windows from the same CD, giving the same redundancy error.

Posted: 02 Oct 2007, 22:26
by Ether
I'd like to add my experiences with this issue. I don't use Explorer at all, so I didn't consider this as a AS's bug. But now, when I read Apotres's post, it seems logical to blame AS for this behaviour, because it uses its own functions.

I see it this way:
When I read files from CD with AS and the source medium is corrupted, AS tells the drive to read the sector, the drive returns some data and AS checks the CRC. When the check goes wrong, AS tells the user and that's it.
Another situation occurs when the source media is unreadable. Then the drive tries to read the sector again and again (unknown number of times; possibly depending on the drive model and some settings given to it), effectively blocking AS and taking a lot of system resources.
Apotres wrote:I click [Cancel] and it does not abort immediately this operation. When I try to quit Salamander, it says Checking path "E:", ...
Try it again. If I'm not wrong, at this moment the status LED on the drive should be blinking, as it's still trying to read the sector, even though the command to cancel the operation has been sent. The AS process is not blocked by the copy operation, but unfortunately it's waiting for the drive to refresh the file list, so it's blocked anyway.

One way to unblock the drive is that you open and close the drive tray. The drive aborts all operations and re-reads the medium. Another one is that you just wait and the drive eventually unblocks by itself.

So, the problem lies in communication between the drive and AS. AS sends the command to abort running operation, but the drive doesn't listen.

[btw] some tips to read a damaged medium:
x] Slow the drive down. The only tool capable of this I know of is Nero DriveSpeed, it can be downloaded somewhere for free, in the case you don't have Nero suite.
x] Use some proffessional extraction tool, such as IsoBuster.

Posted: 03 Oct 2007, 08:32
by Petr Solin
Salamander uses common system functions for reading and writing to files, there is no special support for CD/DVD media. The main problem is blocking call to system function for reading file from CD/DVD. Salamander have to wait for result of this call to take any other action (report error, continue in copying, cancel operation, etc.). The drive is probably trying to read the corrupted sector several times (e.g. with different (slow) speeds), some sectors can be read only in such special conditions.

I want to ask also other users to send us their experiences with corrupted CD/DVD media. If it is really so serious and anoying problem, we will try to solve it. We can try to convert system calls for reading to nonblocking using some auxiliary thread (it may help but I do not believe it).

The same problem was discussed in Czech forum: http://forum.altap.cz/viewtopic.php?t=1605

Re: Sal 2.5 hangs when copying certain files

Posted: 03 Oct 2007, 11:56
by Jan Rysavy
Apotres wrote:Most of the files on the CD did copy correctly outside of Salamander. The 2 first subdirectories copied entirely, the 3rd (and last), when it got to a point of not being able to read the CD, it just gave a message saying it could not read files, I clicked OK and it just stopped normally without crashing.
Yes, this is the point where Windows Explorer and Altap Salamander differs.
Explorer will close progress window when you click the OK button. BUT, the problem is there and if you will try to open another Explorer window and access CD, Explorer will freeze (until driver time out). Could you confirm it please?

Posted: 04 Oct 2007, 18:21
by Ether
Petr Solin wrote:Salamander uses common system functions for reading and writing to files, there is no special support for CD/DVD media.
OK, I apologize. As I said before, I don't have much experience with real work using Explorer.
Petr Solin wrote:We can try to convert system calls for reading to nonblocking using some auxiliary thread (it may help but I do not believe it).
I don't believe it either, you'd have to make all requests to the drive in a separated thread. I mean, even when you manage to close the Copy window, the drive may be still blocked (by the copy operation or just by another application) and when you try to show the Change Drive menu, AS tries to read the medium's volume label and viola, it's blocked again.

Posted: 05 Oct 2007, 07:47
by Jan Rysavy
ether wrote:I don't believe it either, you'd have to make all requests to the drive in a separated thread. I mean, even when you manage to close the Copy window, the drive may be still blocked (by the copy operation or just by another application) and when you try to show the Change Drive menu, AS tries to read the medium's volume label and viola, it's blocked again.
Exactly. Other (non disk) API functions could be (and from our experience are) affected by these critical sections.

Posted: 06 Oct 2007, 20:47
by Ether
So, there isn't anything to do about it?

Posted: 07 Oct 2007, 18:23
by Jan Rysavy
We have no idea how to get around this problem.

Hide progress window and pretend the problem doesn't exist (like Windows Explorer does) is not option for us.

Posted: 07 Oct 2007, 19:04
by Ether
I know. I just asked. Maybe sometime in the future you could implement some advanced extraction methods. Maybe you'll find a way to shorten the timeout.

Thanks anyway.

Posted: 20 Oct 2007, 13:30
by guest
The problem is very annoying.

When the AS starts copying with the progress bar and then it hangs, opening the DVD tray cancels the operation and all is OK.

But when the the copying does not even start and I get message "Reading directory tree, press the ESC to cancel" the system just hangs (ESC or opening the DVD tray does not help) and the only remedy is restarting the computer.

Posted: 20 Oct 2007, 21:19
by Jan Rysavy
guest wrote:The problem is very annoying.
Yes, the problem is annoying, but the problem is not on our side (please read our posts above).

You can complain about Windows driver architecture or about CD/DVD drivers. But it has nothing to do with Salamander and we don't know how to get around these problems (as we often do in other cases).