Author Topic: Error 4000  (Read 39021 times)

Bodtje

  • Newbie
  • *
  • Posts: 8
    • View Profile
Error 4000
« on: September 16, 2013, 13:39:44 »
Hi,

from time to time when I'm trying to copy or move a folder from one HD to another I get the message: Error 4000. When I click the Abort button a  new window pops up stating: Unexpected Error. Write Thread should not be running. But is (sic!) is... (ID 3001).
Can someone please tell me what this means, what is going wrong and how I can avoid this error?

Yours gratefully,
Bodtje

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Error 4000
« Reply #1 on: September 16, 2013, 13:55:37 »
Error 4000 is that an unknown error happened that it did not know how to handle.

"Unexpected Error. Write Thread..." message is because of a timing issue that happen on some machines under very rare conditions.

Are the "Error 4000" and "Unexpected Error , Write Thread..." message always shown after each other ?

What version are you running ?
« Last Edit: September 16, 2013, 14:00:01 by Mathias (Author) »

Bodtje

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Error 4000
« Reply #2 on: September 16, 2013, 14:10:59 »
Thanks for your quick reply.

I'm using v. 3.5 (build 1500) 64 edition under Windows 8.
And yes, when the first message show the second does also after hitting the Abort button.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Error 4000
« Reply #3 on: September 16, 2013, 14:19:53 »
Ok, then the second is probably because of the unhanded error of the first.

Are there any thing special with the copy operation that is aborted. ?  network ?, ftp ?, archive ? NAS, same drives or copy to different drives , or other information that can be valid.

« Last Edit: September 16, 2013, 14:23:48 by Mathias (Author) »

Bodtje

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Error 4000
« Reply #4 on: September 16, 2013, 14:23:01 »
No, the situation is this one: I've got an external HD onto which I download a torrent. Once the folder is ready (completely downloaded), I rename the folder and try to copy this folder to another external HD.
(I already tried to switch of the bittorrent client, but the error keeps popping up). That's when the error shows.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Error 4000
« Reply #5 on: September 16, 2013, 14:28:32 »
Strange.  Im not able to recreate it.. Error 4000 happens because it tries to do something that the device did not like or support, exactly what is impossible to say

You can enable the filesystem log and set log level to debug level in MC  under  Core settings -> Logging (tab) that might give more information on what fails.

Bodtje

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Error 4000
« Reply #6 on: September 16, 2013, 14:53:29 »
Thanks.

Log file attached  ;)
« Last Edit: September 16, 2013, 15:02:01 by Mathias (Author) »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Error 4000
« Reply #7 on: September 16, 2013, 15:03:22 »
Thanks.

Log file attached  ;)

I will take a look at the log..

(Btw I removed the attachment from your post.  )

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Error 4000
« Reply #8 on: September 16, 2013, 15:19:30 »
The file copy fails directly when trying to write.  0 bytes was copied before the error 4000 is shown.
It is strange that the internal error code is not shown there. I can not see if it failed to read the file or if it failed to write to the target file.

Lets to a test.

Test if you can to view the file with the extension *.BUP in the video subfolder with the internal viewer. (F3 or F1 depending on Keysetup).
(You will see lots of binary text and garbage I think. But it is a test to see if it is possible to read the data in the file)

Also can you write another (any other) file to the same location as your are trying to copy to ? (Test if it really works to write files to that location)



Bodtje

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Error 4000
« Reply #9 on: September 16, 2013, 15:39:36 »
OK, I did some tests.

I can read the data in the BUP files.
I did some copy tests with other files from the same directory to the same target directory. Strangely enough this error shows only when the folder I try to copy contains a VIDEO_TS folder and video files.
All other folders copy fine.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Error 4000
« Reply #10 on: September 16, 2013, 16:51:23 »
Strange..

So if you create a new empty folder next to the VIDEO_TS folder and copy the file to that folder it works ?

Sound like you got something that block the writing of files. like AntiVirus or something else like that, But why AV program would block writing into a VIDEO_TS folder I do not know. Might be some other kind of program that blocks it.

I did some googling and there are virus that hide them self as VIDEO_TS.exe so maybe your AV software get confused ?

Bodtje

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Error 4000
« Reply #11 on: September 16, 2013, 17:00:08 »
I only use Microsoft Defender, no third party AV...
No problem copying the files within the same drive.

Strange indeed..
Thanks for investigating. Hope you'll stumble upon the solution some time  :D

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Error 4000
« Reply #12 on: September 16, 2013, 17:47:05 »
I do not think the problem is in MC (except to handle the error better) since it will not block files, the blocking is outside of MC.

Bodtje

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Error 4000
« Reply #13 on: September 16, 2013, 20:35:57 »
You could be right of course, but I haven't the problem when I'm doing the same in Windows Explorer nor in XYplorer, which I was using until now.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Error 4000
« Reply #14 on: September 16, 2013, 21:29:55 »
The strange thing is that MC does not have any code in it to block files being written to folder with special name. If files are being block it is out of the control of MC.  also everybody should then have that problem. Something external must be interfering with the writing. Any why it only affect MC I don't know. might be because multicommander.exe is not "digitally signed" and the thing that blocks therefore does not trust it and thats why it blocks it. I don't know, never seen that behavior before.. very strange.

ice-man

  • Active Member
  • ***
  • Posts: 56
  • The Little Extra
    • View Profile
Re: Error 4000
« Reply #15 on: September 17, 2013, 07:36:41 »
This problem sounds extremely weird.

That files created in a folder with a special name should be halted from being written sounds wrong. My guess is that something else is the problem.
Some vital information on how the problem is behaving must be missing. Because of what I read here, it does not make sense.

If I had the problem I would check if I could make it happen on many different location and drives or if it only was in one location.  Also If it happen if I created the folder manually (F7) and then copy different types of files into it from different places/drives, And if I could create the folder from MC and then write the file by saving text from notepad.exe. Check if some other program have any locks on that folder. (I would check using process explorer) and I would have run sysinternals process monitor to check what is happening. (But that is a bit of a advanced tool) And more.. changing one thing a the time. Because there must be some something special with this except the folder name. Or some other information that seams unimportant is missing.

But that is just me. :)



Intel i7-6700K - Running on latest Windows 10 64bit Insider Preview

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 512
  • Old Skull
    • View Profile
Re: Error 4000
« Reply #16 on: September 17, 2013, 10:28:46 »
Bodtje,
make a video of what you are doing, maybe it'll help. And try to close all other applications (except antivirus/firewall).

Bodtje

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Error 4000
« Reply #17 on: September 17, 2013, 10:36:55 »
Thanks everyone for your suggestions.

What still puzzles me is why this only occurs in MC (in the 32 bit version too) and not in Windows Explore, XYplorer nor xplorer².

I like MC but my little finger tells me to choose the stupid solution and switch to xplorer²...  :-\

78-45-33

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Error 4000
« Reply #18 on: September 21, 2013, 17:04:10 »
I have a similar problem, also giving error 4000

Problem occurs only when using M.C., not in Total commander or Win Explorer.
Copying any file(s) to a external HDD (USB) giving the error.
File can be a txt file or movie files, just anything, and the problem occurs.

Did already format it twice, without any result; when I read this post, I tried Total Commander... no problem.
System is a Medion P7300/Win7.

« Last Edit: September 30, 2013, 17:43:08 by 78-45-33 »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Error 4000
« Reply #19 on: September 21, 2013, 17:15:08 »
I have a similar problem, also giving error 4000

Problem occurs only when using M.C., not in Total commander or Win Explorer.
Copying any file(s) to a external HDD (USB) giving the error.
File can be a txt file or movie files, just anything, and the problem occurs.

Did already format it twice, without any result; when I read this post, I tried Total Commander... no problem.
System is a Medion P7300/Win7.

Screenshots:
The other user had it only on files in folders called VIDEO_TS so not exactly the same issue.
The question is what is different about your system and your setup and everybody else that has no problem.
So far nobody have been able to figure that out.

log files are better then screen shots because there are many many different reasons why this can happen.

78-45-33

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Error 4000
« Reply #20 on: September 21, 2013, 17:38:09 »
Hope this helps...

Code: [Select]
2013-09-21 16:59:28.927 File Operations error : 4000
2013-09-21 16:59:34.658 [5544] WriteThread is Running. It should be Paused or Suspended. (3) (Thread state 3)
2013-09-21 16:59:35.688 File Operations error : 165 File operation aborted. File might be incomplete
2013-09-21 17:35:03.443 File Operations error : 4000
2013-09-21 17:35:08.323 [2892] WaitForState : wait for 6 , current state is 6
2013-09-21 17:35:08.323 File Operations error : 165 File operation aborted. File might be incomplete
2013-09-21 17:35:34.763 File Operations error : 165 File operation aborted. File might be incomplete

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Error 4000
« Reply #21 on: September 21, 2013, 17:46:35 »
No, The log does not contains the extended debug information .
You can enable the filesystem log and set log level to debug level in MC  under  Core settings -> Logging (tab) that might give more information on what fails.

If you do not want to post it you can send it to me at http://multicommander.com/upload/
« Last Edit: September 21, 2013, 17:54:25 by Mathias (Author) »

78-45-33

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Error 4000
« Reply #22 on: September 21, 2013, 18:05:38 »
With logging level on debug(debug-beginning/end) I get the same result in log file:

Code: [Select]
2013-09-21 17:56:57.045 File operations log started.
2013-09-21 17:57:11.330 File Operations error : 4000
2013-09-21 17:57:15.840 [4416] WriteThread is Running. It should be Paused or Suspended. (3) (Thread state 3)
2013-09-21 17:57:17.110 File Operations error : 165 File operation aborted. File might be incomplete
2013-09-21 18:01:49.100 File operations log started.
2013-09-21 18:01:50.210 File operations log started.
2013-09-21 18:01:59.330 File Operations error : 4000
2013-09-21 18:02:01.090 [2608] WriteThread is Running. It should be Paused or Suspended. (3) (Thread state 3)
2013-09-21 18:02:02.040 File Operations error : 165 File operation aborted. File might be incomplete

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4283
    • View Profile
    • Multi Commander
Re: Error 4000
« Reply #23 on: September 21, 2013, 18:12:52 »
No.. if you enabled it correct a copy operation should look like

2013-09-21 18:12:30.951 Start FileOperation (Copy/Move/Delete) Settings
2013-09-21 18:12:30.951 '-- Chunk size  : 524288
2013-09-21 18:12:30.951 '-- Buffer size : 10485760
2013-09-21 18:12:30.951 '-- Read Flags  : 0x30
2013-09-21 18:12:30.951 '-- Write Flags : 0x30
2013-09-21 18:12:30.951 '-- Flags       : 0x2600204
2013-09-21 18:12:30.962 Allocating Buffers (Chunks = 20 , Chunks size = 524288 Bytes , Buffer size = 10485760 Bytes)
2013-09-21 18:12:30.962 Prepare Write - Create new file on target. : "R:\Temp\DD\TempFile.dat"
2013-09-21 18:12:30.963 Prepare Copy - Asyncrone mode enabled.
2013-09-21 18:12:30.963 ThreadWrite created
2013-09-21 18:12:30.980 [12528] Wait for WriteThread to finish and pause.
2013-09-21 18:12:30.980 [12528] WriteThread is now paused.
2013-09-21 18:12:30.980 Copied : "C:\Temp\TempFile.dat" => "R:\Temp\DD\TempFile.dat" - 9728 bytes in 16ms - Average Speed : 608000 bytes/sec (593,8 KB/sec)
2013-09-21 18:12:30.980 Add path to Refresh Queue : "R:\Temp\DD\"

That is for a successful copy. for one with error there would be other items too but the first part should be the same..

78-45-33

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Error 4000
« Reply #24 on: September 21, 2013, 18:25:19 »
Had to use debug (eval) to get  a debug report, it's sent to your upload map ( http://multicommander.com/upload/ )