Problem - WriteFile/ReadFile functions hangs up with buffers more then
~1K (~1000 bytes) when working with HDD. Platform is Geode. When I
encounter this problem, other WinCE programs, like Media Player also
completely hangs up the system when reading audio files - HDD LED
stays lightening continiously... system is dead.
With CF-HDD all goes fine. But ordinal 40Gb HDD sometime work
normal, sometime hangs up. For example:

char* buffer = new char[1000];

WriteFile(f, buffer, 700, &Written, 0); - ALL GOES FINE

WriteFile(f, buffer, 1000, &Written, 0); - Hang up in this call

I thought, it can be stack problems, but i use dynamic memeory (new or
VirtualAlloc - the same result)
Please help - ANY ideas?!? I checked 3 HDD's and 3 different Geode
PC's, many OS configurations - helps not. But is seems,
that small disks under FAT16 always fork fine, but FAT32 SOMETIMES
works too! Unpredictable error.
Anyone faced this or near this problem?
:-(

Thanks......!

Re: System hangs on HDD read/writes by Steve

Steve
Sat May 01 14:48:49 CDT 2004

Have you run with a debug build? What is the debug output leading up to the
"HANG"?

--
Steve Maillet (eMVP)
EmbeddedFusion
smaillet_AT_EmbeddedFusion_DOT_com



Re: System hangs on HDD read/writes by anonymous

anonymous
Mon May 03 06:21:03 CDT 2004

Thats the problem - no any debug otput between WriteFile function call and hang. But I have checked all function calls from WriteFile (in debug mode) and discovored, then some Assembler command IN or OUT (dont remember exactly) leads to this bug. Nested function calls was veeeery deep (at about 20-30 maybe) through FileSystem, Hard disk driver level... and so on deeper deeper. As I remember (i have checked this some months ago) last function, that was called was some DMA Wait function... There was some call to WaitDMA (something like that) function, which called asm{} block with IN/OUT commands. First Assembler IN/OUT command hanged the system. No any Assertion, connection to device lost... HDD LED indicator is lightetning. :(