<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>I just had a look at the broken image file. It is three hundred megabytes of zeros, indeed.</p>
<p><br>
</p>
<p>> <span style="font-size:12pt">I don't know what the failure mode was on Windows (file system full? </span><span style="font-size:12pt">something else?).</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">I don't know, too. I can only tell you that my system was so buggy that I could not even start a new cmd window or even restart the system without using the physical reset button. ¯\_(ツ)_/¯</span></p>
<p><span style="font-size:12pt">As I said, this is nothing to blame our VM for, but yes, if we could detect an error code, this would be helpful, of course.</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">Best,</span></p>
<p><span style="font-size:12pt">Christoph</span></p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von David T. Lewis <lewis@mail.msen.com><br>
<b>Gesendet:</b> Samstag, 4. September 2021 00:48:37<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Image damaged due to IO error while saving</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Fri, Sep 03, 2021 at 06:24:32PM -0400, David T. Lewis wrote:<br>
<br>
<br>
> <br>
> On Fri, Sep 03, 2021 at 10:04:18PM +0000, Thiede, Christoph wrote:<br>
> > Truncate? It has still a very usual file size ... But when I try to open it, the VM asks me for another image file, so apparently, it cannot read it. No idea what's going on here ...<br>
> > <br>
> > <br>
> > Best,<br>
> > <br>
> > Christoph<br>
> > <br>
> > ________________________________<br>
> > Von: Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von David T. Lewis <lewis@mail.msen.com><br>
> > Gesendet: Samstag, 4. September 2021 00:01:54<br>
> > An: The general-purpose Squeak developers list<br>
> > Betreff: Re: [squeak-dev] Image damaged due to IO error while saving<br>
> > <br>
> > On Fri, Sep 03, 2021 at 09:02:07PM +0000, Thiede, Christoph wrote:<br>
> > > Or is there maybe, just maybe some kind of automatic image repair tool? One that does not require in-depth knowledge of the file format internals of .image files? :-)<br>
> > ><br>
> > <br>
> > No, if you truncate the image file, it's junk.<br>
> > <br>
> > Dave<br>
> > <br>
> <br>
> I don't know what the failure mode was on Windows (file system full?<br>
> something else?). Regardless of the underlying failure, if you write<br>
> the image file and the write does not successfully complete, then<br>
> you almost certainly have a junk file that cannot be fixed.<br>
> <br>
> But to your other question, could we check for the failure and not<br>
> exit the image, that's definitely worth looking into.<br>
> <br>
> Take a look at SmalltalkImage>>snapshotEmbeddedPrimitive and<br>
> SmalltalkImage>>snapshotPrimitive. If the method comments are<br>
> right, then a nil result would indicate a write faiure. I don't<br>
> know if the actual primitives in the VM behave this way (if not<br>
> they could be fixed). But if that is how the primitives behave,<br>
> then it should be possible to add a check for nil to prevent<br>
> exiting the image after a failed write.<br>
> <br>
> I do not see any such check in SmalltalkImage>>snapshot:andQuit:withExitCode:embedded:<br>
> so it would be worth looking at this to see if a nil check could<br>
> be added to protect against the kind of failure you saw.<br>
> <br>
<br>
Actually, I need to retract this. There actually *is* a nil check,<br>
and it works as advertised for the case of a Unix VM trying to<br>
save the image to a write protected file. So I think we would<br>
need to understand the actual write failure that happened on Windows,<br>
and see if the Windows VM is handling it in an appropriate way.<br>
<br>
Dave<br>
<br>
<br>
</div>
</span></font>
</body>
</html>