Hi Bert,<div><br></div><div> (when you're back from Scotland, birthplace of my grandmother)</div><div><br></div><div>I've been looking at the failing ImageSegmentTest (actually vm-crashing ImageSegmentTest) and I've made it work in the simulator. I now want to check whether the reading or the writing is at fault. If in the real VM I can load the segment written by the simulator I'll know its VM writing that's at fault. But I can't see how to crate an image segment to load a specific image segment file. Do you have a snippet handy?<br>
<br><div class="gmail_quote">On Wed, Apr 17, 2013 at 9:58 AM, Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><div style="word-wrap:break-word"><div><div>Hi Eliot,</div><div><br></div><div>thanks for looking into this.</div><div><br></div><div>On 15.04.2013, at 18:02, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>> wrote:</div>
<br><blockquote type="cite">Hi Bert,<div><br></div><div> the version-compatibility check is failing. In NewObjectMemory>>loadImageSegmentFrom:outPointers: there's the check</div><div> (self readableFormat: (data bitAnd: 16rFFFF "low 2 bytes")) ifFalse:</div>
<div>and this is failing. The version info in the segment is 6502, which is pre-Cog, BlockContext. Cog expects either 6504 (closures, but big-endian order floats) or 6505 (closures, platform-order floats). So one might hope that just munging the project file so that the version is 6504 will work, alas no.</div>
<div><br></div><div>Adding e.g.</div><div><br></div><div><div><span style="white-space:pre-wrap">        </span>((segment at: 1) bitAnd: 16rFFFF) = 6502 ifTrue:</div><div><span style="white-space:pre-wrap">                </span>[(UIManager default confirm: 'Image Segment is version 6502; expecting either 6504 or 6505. OK to force it to 6504?') ifFalse:</div>
<div><span style="white-space:pre-wrap">                        </span>[^self error: 'bad version'].</div><div><span style="white-space:pre-wrap">                </span> segment at: 1 put: ((segment at: 1) bitAnd: 16rffff0000) + 6504].</div>
<div><span style="white-space:pre-wrap">        </span>arrayOfRoots := self loadSegmentFrom: segment outPointers: outPointers.</div></div><div><br></div><div>to comeUpFullyOnReload: fails because some objects ned up having a null class</div>
</blockquote><div><br></div><div>Really? How could that be? If it's just the BlockContexts and MethodContexts, the primitive could just replace them with nil.</div><div><br></div><blockquote type="cite"><div>and this will just crash the image. Alas, a) the image code doesn't return primitiveFailed if the load primitive does fail, and b) the failure code in the VM doesn't fail properly. If invalid objects are created during an attempted load the failure code doesn't nuke them.</div>
</blockquote><div><br></div><div><div>Could this be done on the image side, or will it crash before?</div></div><br><blockquote type="cite">
<div>So there's more work to do here, a) to figure out how to convert a project file so that it's compatible with cog images, and b) to make the image segment loading primitive more robust when it fails.</div>
</blockquote><div><br></div>I really don't want to have to convert project files, but load them as they are.<br><div><br></div><div><span style="font-size:12px">- Bert -</span></div><div><span style="font-size:12px"><br>
</span></div><br><blockquote type="cite"><div><br></div><div><div class="gmail_quote">On Thu, Apr 11, 2013 at 3:52 PM, Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
That's primitive 99. With an updated Squeak trunk image I can load this project fine in the interpreter:<br>
<br>
<a href="http://etoys.squeak.org/svn/trunk/Etoys/Home.007.pr" target="_blank">http://etoys.squeak.org/svn/trunk/Etoys/Home.007.pr</a><br>
<br>
On Cog the primitive fails. Any idea what might be wrong?<br>
<span><font color="#888888"><br>
- Bert -<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div>
</blockquote></div><div><span style="border-collapse:separate;border-spacing:0px;font-family:'Lucida Grande';font-size:12px"><br></span>
</div>
<br></div><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div>