makerbot / G3Firmware

The firmware for generation 3 and later RepRap electronics.
89 stars 75 forks source link

sd card corruption and files deleted #50

Open ssd2 opened 14 years ago

ssd2 commented 14 years ago

If I name parts ending in sequential numbers (e.g., part1.s3g part2.s3g ) then part2 is sometimes deleted and part1 may also be corrupted. The corrupted part sometimes will print part way and then just stop, with the extruder going and the machine not responding to serial commands until I reset. A subsequent chkdsk on the card releases abandoned blocks, so whatever happened didn't update the freemap correctly either.

Sometimes part2 will dissapear even when I haven't tried to print part1 yet.

Why is the firmware writing to the card at all? I would think the only time it should be writing is if a part is uploaded via serial to the card.

revarbat commented 13 years ago

It appears the firmware is opening all files in the equivalent of a read/write mode, and flushes changes to disk on file close. For reading a file, this should normally only end up wiping out the timestamps, but things seem to get corrupted sometimes.

kintel commented 13 years ago

This has been fixed. Testing with a MicroSD card should be done before closing.