[squeak-dev] Image damaged due to IO error while saving

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Sep 3 20:56:57 UTC 2021


Just lost the sixth image within a few days due to crazy Windows errors. Squeak does not bear the blame for this, but maybe we could just come up with some simple validation? When saving the image, validate it afterward, and warn the user/do not close the image if the stored .image file is corrupt.


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von tim Rowledge <tim at rowledge.org>
Gesendet: Sonntag, 2. Februar 2020 20:03:35
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Image damaged due to IO error while saving



> On 2020-02-02, at 6:03 AM, K K Subbu <kksubbu.ml at gmail.com> wrote:
>
> On 02/02/20 7:57 AM, tim Rowledge wrote:
>> The way we used to do this on RISC OS was (is, for the remaining
>> users!) to allocate a file of the required size and it would be
>> filled with 0. That way if you got a success return code you knew for
>> certain (barring fire, flood, bomb or bear attack) that the file
>> could be over-written with your real content. Do any other filing
>> systems actually really definitely allocate space when you ask for
>> it? No idea.
>
> Writing twice into the same file will increase wear and tear in SSDs unnecessarily.

True, but in defence of RISC OS it does predate even the fantasy of SSDs by perhaps a couple of decades :-)

Obviously the key point is actually, definitely, allocating the required space, as opposed to optimistically claiming to have some room and then getting all upset when your application tries to use it.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
"How many Carlos Wus does it take to change a lightbulb?”
"With an unlimited breeding licence, who needs lightbulbs?"




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210903/6fa97be7/attachment-0001.html>


More information about the Squeak-dev mailing list