<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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">eliot.miranda@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><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 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</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; position: static; z-index: auto; "><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>
</blockquote></div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; font-family: 'Lucida Grande'; font-size: 12px; "><br class="Apple-interchange-newline"></span>
</div>
<br></body></html>