Opened 13 years ago
Closed 12 years ago
#9554 closed defect (fixed)
WriteFile fails to write to shared folder file if number of bytes is bigger than 64KB.
Reported by: | Dmitriy | Owned by: | |
---|---|---|---|
Component: | shared folders | Version: | VirtualBox 4.1.2 |
Keywords: | WriteFile invalid parameter | Cc: | |
Guest type: | Windows | Host type: | Windows |
Description (last modified by )
When I try to write big-sized data (2MB-32MB) to a file on a shared folder (using WriteFile function), I get "invalid parameter" error. I get the error if number of bytes to write is bigger than 64KB. I get the error on Windows XP, Windows Server 2008 and Windows 7.
I get the error also on VirtualBox 4.0.12, but maximum number of bytes is 8MB.
Change History (4)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
VBox.log shows nothing relating to the error.
I reproduced this error today with VirtualBox 4.1.18 and Guest Additions 4.1.18, while using Visual Studio to compile a C++ project with a large .obj file. Error message was:
fatal error LNK1106: invalid file or disk full: cannot seek to 0x1AC6CC2
While the error message says "cannot seek", Process Monitor confirms the same source of the bug: WriteFile with a large Length failing with INVALID PARAMETER:
2:41:46.6353762 PM link.exe 372 WriteFile
vboxsrv\Documents\.....lib INVALID PARAMETER Offset: 4,194,304, Length: 20,271,104, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O, Priority: Normal
comment:3 by , 13 years ago
Python script to repro:
from win32file import CreateFile, WriteFile, GENERIC_READ, GENERIC_WRITE, CREATE_ALWAYS filename = r'\\VBOXSVR\Documents\9554' size = 1024 * 1024 * 16 + 1 f = CreateFile(filename, GENERIC_READ | GENERIC_WRITE, 0, None, CREATE_ALWAYS, 0, None) WriteFile(f, ' ' * size)
Traceback (most recent call last): File "C:\Users\ksmyth\Desktop\9554.py", line 8, in <module> WriteFile(f, ' ' * size) pywintypes.error: (87, 'WriteFile', 'The parameter is incorrect.')
comment:4 by , 12 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in VBox 4.2.8.
You should attach VBox.log file of a VM, where the error happens.
What the version of guest additions is used? Do you use any antivirus software in the guest?