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 class="Apple-tab-span" style="white-space:pre">        </span>((segment at: 1) bitAnd: 16rFFFF) = 6502 ifTrue:</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>[(UIManager default confirm: 'Image Segment is version 6502; expecting either 6504 or 6505. OK to force it to 6504?') ifFalse:</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>[^self error: 'bad version'].</div><div><span class="Apple-tab-span" style="white-space:pre">                </span> segment at: 1 put: ((segment at: 1) bitAnd: 16rffff0000) + 6504].</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </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, 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>
<div><br></div><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>
<div><br></div><div>HTH,</div><div>Eliot</div><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:0 0 0 .8ex;border-left:1px #ccc 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 class="HOEnZb"><font color="#888888"><br>
- Bert -<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div>