<div dir="ltr">Thank you, the new VM did fix it.<div>-cbc</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 28, 2014 at 8:17 PM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Thu, Aug 28, 2014 at 03:17:24PM -0700, Chris Cunningham wrote:<br>
&gt; Hi.<br>
&gt; What is the status of this bug?  Have you tried this fix?<br>
<br>
</div>Good question. There were a number of interdependent issues, but the short<br>
answer is that you probably have an up to date trunk image, and a not so<br>
up to date VM.<br>
<br>
There was a legitimate fix to an obscure bug, and that fix that was introduced<br>
into trunk (Collections-eem.567). This fix ended up requiring VM changes to<br>
accomodate the fix. If you are using a VM that was not built recently, then<br>
it may not have the required support.<br>
<br>
The VM support was added in the July 2014 time frame to VMMaker.oscog-eem.826<br>
(for Cog) and VMMaker-dtl.348 (for interpreter VM). If your image is updated<br>
with Collections-eem.567 or later, then you will need a recently compiled VM<br>
in order to avoid the bug.<br>
<br>
Dave<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
&gt;<br>
&gt; I have recently been running into a related symptom - I can&#39;t write out big<br>
&gt; PNG files (it tries to write beyond the buffer as well).  I suspect it is<br>
&gt; the same issue.<br>
&gt;<br>
&gt; Here is a sample script that will produce the same error.  Not all PNG<br>
&gt; generated file have it - but a number that I&#39;m trying to produce manage to<br>
&gt; run into this bug.<br>
&gt;<br>
&gt; | canvas stream dx |<br>
&gt; canvas := FormCanvas extent: ((31 * 40)@(101 * 40)) depth: 32.<br>
&gt; canvas<br>
&gt; fillRectangle: ((0@0) corner: canvas extent) color: Color white;<br>
&gt; frameRectangle: ((0@0) corner: canvas extent) color: Color black.<br>
&gt; dx := 38.<br>
&gt; 1 to: 100 do: [:y|<br>
&gt; 1 to: 30 do: [:x|<br>
&gt; canvas fillRectangle: (((x * dx) @ (y * dx)) corner: (((x * dx) + 2) @ ((y<br>
&gt; * dx) + 2))) color: Color green.<br>
&gt; ].<br>
&gt; ].<br>
&gt; stream := ByteArray new writeStream.<br>
&gt; PNGReadWriter putForm: canvas form onStream: stream.<br>
&gt;<br>
&gt; Thanks.<br>
&gt; -cbc<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Jul 18, 2014 at 12:46 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Fri, Jul 18, 2014 at 12:38 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;<br>
&gt; &gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt; Stupid me.  It&#39;s got to be the DeflateStream, and its subclasses<br>
&gt; &gt;&gt; ZipWriteStream, GZipWriteStream and ZLibWriteStream.  So my change screws<br>
&gt; &gt;&gt; all uses of these in plugins.  So what to do about fixing this?  I would<br>
&gt; &gt;&gt; like to have a go at fixing the plugins.  But cheaper might be to fix<br>
&gt; &gt;&gt; WriteStream with some property hack, storing the initialPosition somewhere<br>
&gt; &gt;&gt; else (a class side weak dictionary of stream -&gt; initialPosition ?? (yuck)).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; On Fri, Jul 18, 2014 at 12:31 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;<br>
&gt; &gt;&gt; wrote:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; On Thu, Jul 17, 2014 at 4:02 PM, David T. Lewis &lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt;<br>
&gt; &gt;&gt;&gt; wrote:<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; On Fri, Jul 18, 2014 at 12:24:29AM +0200, Nicolas Cellier wrote:<br>
&gt; &gt;&gt;&gt;&gt; &gt; 2014-07-13 16:22 GMT+02:00 David T. Lewis &lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt;:<br>
&gt; &gt;&gt;&gt;&gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; On Sun, Jul 13, 2014 at 09:55:41AM -0400, David T. Lewis wrote:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; On Sun, Jul 06, 2014 at 12:47:25PM -0400, David T. Lewis wrote:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; On Sun, Jul 06, 2014 at 12:23:11PM -0400, David T. Lewis wrote:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; On Sun, Jul 06, 2014 at 10:34:15AM +0200, Nicolas Cellier<br>
&gt; &gt;&gt;&gt;&gt; wrote:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; 2014-07-04 0:47 GMT+02:00 Nicolas Cellier &lt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; <a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt;:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; 2014-07-04 0:09 GMT+02:00 Eliot Miranda &lt;<br>
&gt; &gt;&gt;&gt;&gt; <a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a><br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; On Thu, Jul 3, 2014 at 12:33 PM, Nicolas Cellier &lt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; <a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; The bug is repeatable, i simply have to execute this<br>
&gt; &gt;&gt;&gt;&gt; snippet<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; with my<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; test file:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; (FileStream fileNamed: &#39;snapshot.bin&#39;) binary<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; contentsOfEntireFile<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; asString zipped.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; The file is too big for an attachment here - 7.3 Mbytes<br>
&gt; &gt;&gt;&gt;&gt; - or<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; 1.7 Mbytes<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; gzipped by external tool.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt; If someone can suggest an upload site, or want it by<br>
&gt; &gt;&gt;&gt;&gt; mail,<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; just ask.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; You&#39;re welcome to put it on <a href="http://ftp.mirandanamda.org" target="_blank">ftp.mirandanamda.org</a>,<br>
&gt; &gt;&gt;&gt;&gt; cogftpuser,<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; pw cogging<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; with 0&#39;s &amp; 1&#39;s.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; done, pollution of your site engaged...<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; Thanks Eliot!<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; I inquired a bit more about this bug.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; An important clue is that it does not happen in Pharo3.0!<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; But Pharo3.0 did not fundamentally change compression<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; (except some FileSystem related changes, separation of CRC<br>
&gt; &gt;&gt;&gt;&gt; stuff<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; in another<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; package, some other cosmetic changes like replacing some<br>
&gt; &gt;&gt;&gt;&gt; self<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; assert: ...<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; by [...] assert and a potential bug in<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; DeflateStream&gt;&gt;nextPutAll:startingAt: introduced by<br>
&gt; &gt;&gt;&gt;&gt; CamilleTeruel).<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; Squeak behavior is presumably not due to a Compression<br>
&gt; &gt;&gt;&gt;&gt; change.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; Neither is it a VM problem, the bugs still shows up when<br>
&gt; &gt;&gt;&gt;&gt; running<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; the Squeak<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; image with Pharo VM.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; Yes, it is definite a problem in the Squeak trunk image.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; So the difference lies somewhere else: in our beloved<br>
&gt; &gt;&gt;&gt;&gt; Stream.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; I remembered a recent change of Eliot related to handling of<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; Stream created<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; with on:from:to: (Collections-eem.567).<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; Reverting those changes just make the snippet pass!<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; Ah ah! At the time, i found the change of Eliot quite<br>
&gt; &gt;&gt;&gt;&gt; minimal and<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; nice.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; But I wish I had time to analyze this small innocent change<br>
&gt; &gt;&gt;&gt;&gt; deeper.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; Indeed, I remembered I previously broke my teeth on this<br>
&gt; &gt;&gt;&gt;&gt; one 2<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; years or so<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; ago, and preferred to adopt another strategy: avoid using<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; on:from:to: and<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; ReadWriteStream as much as possible.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; Why? because when analyzing the usage of inst.var. in Stream<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; hierarchy, it<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; gave me headaches, some subclass are just ignoring<br>
&gt; &gt;&gt;&gt;&gt; superclass<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; variables, or<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; worse are bending the semantics of superclass variables.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; I came to the conclusion that I could not decently master a<br>
&gt; &gt;&gt;&gt;&gt; change<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; of<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; &gt; on:from:to:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; I can not confirm this. I have an image in which I can<br>
&gt; &gt;&gt;&gt;&gt; reliably<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; reproduce the<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; failure in writing the MCZ to a file. I tried reverting the<br>
&gt; &gt;&gt;&gt;&gt; methods<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; that were<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; introduced in Collections-eem.567 and I am still getting the<br>
&gt; &gt;&gt;&gt;&gt; same<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; failure.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; &gt; Dave<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; Oops, I spoke too soon. Indeed the problem appears as of<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; Collections-eem.567,<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; and does not appear in Collections-nice.566.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; So I am confirming Nicolas&#39; observations ... now to find the<br>
&gt; &gt;&gt;&gt;&gt; bug :)<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt; Dave<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; This seems to be a rather tricky bug, and I don&#39;t think any of us<br>
&gt; &gt;&gt;&gt;&gt; knows<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; the<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; cause right now. In case anyone else wants to have a look at it,<br>
&gt; &gt;&gt;&gt;&gt; here is<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; a<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; recipe for reproducing the bug in a clean 4.5 image:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - Start with a clean Squeak 4.5 image in and empty working<br>
&gt; &gt;&gt;&gt;&gt; directory.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;       <a href="ftp://ftp.squeak.org/4.5/Squeak4.5-13680.zip" target="_blank">ftp://ftp.squeak.org/4.5/Squeak4.5-13680.zip</a><br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - Open the image, do not update it.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - Open an MC browser and add the <a href="http://source.squeak.org/trunk" target="_blank">http://source.squeak.org/trunk</a><br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; repository for the Help-Squeak-Project package and Collections<br>
&gt; &gt;&gt;&gt;&gt; package.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - Load Help-Squeak-Project-kfr.18 from trunk.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - Load Collections-eem.567 from trunk.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - Open a browser on class SqueakToolsDebuggerHelp, and delete the<br>
&gt; &gt;&gt;&gt;&gt; class<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; side method #showDebuggerMenuForm.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - Remove the <a href="http://source.squeak.org/trunk" target="_blank">http://source.squeak.org/trunk</a> repository form the<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; Help-Squeak-Project package in the MC browser.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - Highlight your package-cache repository and try to save<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; Help-Squeak-project to the package-cache repository.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - Enter author initials &#39;dtl&#39;.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - For the package comment, enter &#39;Remove unreferenced method&#39;.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - Package save will fail part way through saving the MCZ.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt; - To reproduce the failure in this image, do the following in a<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; workspace:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;       mcv := MCVersion allInstances detect: [:e | e name = &#39;a<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; MCVersion(Help-Squeak-Project-dtl.19)&#39;].<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;       [f := FileStream fileNamed: &#39;junk.mcz&#39;.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;       mcv fileOutOn: f]<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;               ensure: [f close].<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; In addition to the above recipe, here are some other observations:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; - Reverting from Collections-eem.567 to Collections-nice.566 makes<br>
&gt; &gt;&gt;&gt;&gt; the<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   problem go away, but ONLY if the DeflatePlugin is active.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; - The failure appears while executing the fallback code for<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; #primitiveDeflateBlock<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   in ZipWriteStream&gt;&gt;deflateBlock:chainLength:goodMatch:<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; - If this primitive is deactivate by commenting out the<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   &lt;primitive: &#39;primitiveDeflateBlock&#39; module: &#39;ZipPlugin&#39;&gt; in<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   ZipWriteStream&gt;&gt;deflateBlock:chainLength:goodMatch: then the<br>
&gt; &gt;&gt;&gt;&gt; problem will<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   occur regardless of which version of Collections is loaded.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; - When Collections-eem.567 is loaded, the primitive will fail on<br>
&gt; &gt;&gt;&gt;&gt; the 22nd<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   call to #deflateBlock:chainLength:goodMatch: and a debugger<br>
&gt; &gt;&gt;&gt;&gt; appears<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; during<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   execution of the fallback code.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; - When Collections-nice.566 is loaded, the primitive does not fail<br>
&gt; &gt;&gt;&gt;&gt; on the<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; 22nd<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   call to #deflateBlock:chainLength:goodMatch:, the fallback code<br>
&gt; &gt;&gt;&gt;&gt; is never<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; run,<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   and no error appears.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; - When Collections-nice.566 is loaded and the primitive is disabled<br>
&gt; &gt;&gt;&gt;&gt; to<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; force<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   use of the fallback code, the error appears on on the 22nd call to<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   #deflateBlock:chainLength:goodMatch: in exactlly the same place<br>
&gt; &gt;&gt;&gt;&gt; as when<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   Collections-eem.567 is loaded.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; - If I inspect the ZipWriteStream at the failure point (when the<br>
&gt; &gt;&gt;&gt;&gt; debugger<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; pops<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   up after the problem), I see no obvious difference in the state<br>
&gt; &gt;&gt;&gt;&gt; of the<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; stream<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   between the Collections-eem.567 case versus the<br>
&gt; &gt;&gt;&gt;&gt; Collections-nice.566 with<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;   primitive disabled case.<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt; Dave<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt; &gt; Very good mining work!<br>
&gt; &gt;&gt;&gt;&gt; &gt; When I hear  Stream, I think fluid...<br>
&gt; &gt;&gt;&gt;&gt; &gt; But these snags make it so viscous, it&#39;s like our Stream is going to<br>
&gt; &gt;&gt;&gt;&gt; freeze<br>
&gt; &gt;&gt;&gt;&gt; &gt; soon.<br>
&gt; &gt;&gt;&gt;&gt; &gt; Or is it more than frozen? The vein you&#39;re after sounds as hard as<br>
&gt; &gt;&gt;&gt;&gt; diamond,<br>
&gt; &gt;&gt;&gt;&gt; &gt; we gonna need a sharp peak pickaxe.<br>
&gt; &gt;&gt;&gt;&gt; &gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; I keep hoping that your stream fixes will somehow make this problem go<br>
&gt; &gt;&gt;&gt;&gt; away, but<br>
&gt; &gt;&gt;&gt;&gt; maybe we are not so lucky.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Whenever I get more time to play with this, I think I will try to catch<br>
&gt; &gt;&gt;&gt;&gt; it with<br>
&gt; &gt;&gt;&gt;&gt; gdb in the primitive. There is something strange happening that seems<br>
&gt; &gt;&gt;&gt;&gt; to first<br>
&gt; &gt;&gt;&gt;&gt; be detectable in the primitive failure, but only if Eliot&#39;s image fix<br>
&gt; &gt;&gt;&gt;&gt; is present.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; This kind of problem is a nice way to spend the morning with a good cup<br>
&gt; &gt;&gt;&gt;&gt; of coffee,<br>
&gt; &gt;&gt;&gt;&gt; as some people do with the NY Times crossword puzzle ;)<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;    <a href="http://en.wikipedia.org/wiki/The_New_York_Times_crossword_puzzle" target="_blank">http://en.wikipedia.org/wiki/The_New_York_Times_crossword_puzzle</a><br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Another &quot;morning coffee&quot; project is to figure out which version of the<br>
&gt; &gt;&gt;&gt;&gt; LargeIntegersPlugin<br>
&gt; &gt;&gt;&gt;&gt; should be used, which of course was the original topic that started<br>
&gt; &gt;&gt;&gt;&gt; this thread.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; So given that the change adds an instance variable to WriteStream could<br>
&gt; &gt;&gt;&gt; that affect some plugin that somehow accesses a stream?  What plugin could<br>
&gt; &gt;&gt;&gt; that be?  I don&#39;t see any obvious inst vars in the DeflatePlugin or<br>
&gt; &gt;&gt;&gt; InflatePlugin.  To remind ourselves, the three changes are<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; add inst var to WriteStream:<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; PositionableStream subclass: #WriteStream<br>
&gt; &gt;&gt;&gt; instanceVariableNames: &#39;writeLimit initialPositionOrNil&#39;<br>
&gt; &gt;&gt;&gt;  classVariableNames: &#39;&#39;<br>
&gt; &gt;&gt;&gt; poolDictionaries: &#39;&#39;<br>
&gt; &gt;&gt;&gt; category: &#39;Collections-Streams&#39;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; use it in two places:<br>
&gt; &gt;&gt;&gt; contents<br>
&gt; &gt;&gt;&gt; &quot;Answer with a copy of my collection from the start to the current<br>
&gt; &gt;&gt;&gt; position.&quot;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; readLimit := readLimit max: position.<br>
&gt; &gt;&gt;&gt; ^collection copyFrom: (initialPositionOrNil ifNil: [1]) to: position<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; on: aCollection from: firstIndex to: lastIndex<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; | len |<br>
&gt; &gt;&gt;&gt; collection := aCollection.<br>
&gt; &gt;&gt;&gt;  readLimit :=<br>
&gt; &gt;&gt;&gt; writeLimit := lastIndex &gt; (len := collection size)<br>
&gt; &gt;&gt;&gt; ifTrue: [len]<br>
&gt; &gt;&gt;&gt;  ifFalse: [lastIndex].<br>
&gt; &gt;&gt;&gt; position := firstIndex &lt;= 1<br>
&gt; &gt;&gt;&gt; ifTrue: [0]<br>
&gt; &gt;&gt;&gt;  ifFalse: [firstIndex - 1].<br>
&gt; &gt;&gt;&gt; initialPositionOrNil := position + 1<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; What I&#39;ve just found is that if I revert all three changes to<br>
&gt; &gt;&gt;&gt; WriteStream the bug goes away, but if I only revert the two method changes<br>
&gt; &gt;&gt;&gt; the bug remains.  So I think the problem is merely the adding of the inst<br>
&gt; &gt;&gt;&gt; var.  This could break some plugin which was expecting inst vars in<br>
&gt; &gt;&gt;&gt; subclasses of WriteStream to be at particular offsets determined by<br>
&gt; &gt;&gt;&gt; WriteStream instSize = 4 now being 5.  The question is which plugin(s)?<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt; Doh!<br>
&gt; &gt;<br>
&gt; &gt; DeflatePlugin&gt;&gt;loadDeflateStreamFrom: rcvr<br>
&gt; &gt; | oop |<br>
&gt; &gt;  &lt;inline: false&gt;<br>
&gt; &gt; ((interpreterProxy isPointers: rcvr)<br>
&gt; &gt;  and: [(interpreterProxy slotSizeOf: rcvr) &gt;= 15]) ifFalse:<br>
&gt; &gt;  [^false].<br>
&gt; &gt; oop := interpreterProxy fetchPointer: 0 ofObject: rcvr.<br>
&gt; &gt; (interpreterProxy isBytes: oop) ifFalse:<br>
&gt; &gt;  [^false].<br>
&gt; &gt; zipCollection := interpreterProxy firstIndexableField: oop.<br>
&gt; &gt; zipCollectionSize := interpreterProxy byteSizeOf: oop.<br>
&gt; &gt;<br>
&gt; &gt; zipPosition := interpreterProxy fetchInteger: 1 ofObject: rcvr.<br>
&gt; &gt; zipReadLimit := interpreterProxy fetchInteger: 2 ofObject: rcvr.<br>
&gt; &gt;  &quot;zipWriteLimit := interpreterProxy fetchInteger: 3 ofObject: rcvr.&quot;<br>
&gt; &gt;<br>
&gt; &gt; oop := interpreterProxy fetchPointer: 4 ofObject: rcvr.<br>
&gt; &gt;  ((interpreterProxy isWords: oop)<br>
&gt; &gt;  and: [(interpreterProxy slotSizeOf: oop) = DeflateHashTableSize]) ifFalse:<br>
&gt; &gt;  [^false].<br>
&gt; &gt; zipHashHead := interpreterProxy firstIndexableField: oop.<br>
&gt; &gt; oop := interpreterProxy fetchPointer: 5 ofObject: rcvr.<br>
&gt; &gt;  ((interpreterProxy isWords: oop)<br>
&gt; &gt;  and: [(interpreterProxy slotSizeOf: oop) = DeflateWindowSize]) ifFalse:<br>
&gt; &gt;  [^false].<br>
&gt; &gt; zipHashTail := interpreterProxy firstIndexableField: oop.<br>
&gt; &gt; zipHashValue := interpreterProxy fetchInteger: 6 ofObject: rcvr.<br>
&gt; &gt;  zipBlockPos := interpreterProxy fetchInteger: 7 ofObject: rcvr.<br>
&gt; &gt; &quot;zipBlockStart := interpreterProxy fetchInteger: 8 ofObject: rcvr.&quot;<br>
&gt; &gt;  oop := interpreterProxy fetchPointer: 9 ofObject: rcvr.<br>
&gt; &gt; (interpreterProxy isBytes: oop) ifFalse:<br>
&gt; &gt; [^false].<br>
&gt; &gt;  zipLiteralSize := interpreterProxy slotSizeOf: oop.<br>
&gt; &gt; zipLiterals := interpreterProxy firstIndexableField: oop.<br>
&gt; &gt;<br>
&gt; &gt; oop := interpreterProxy fetchPointer: 10 ofObject: rcvr.<br>
&gt; &gt; ((interpreterProxy isWords: oop)<br>
&gt; &gt;  and: [(interpreterProxy slotSizeOf: oop) &gt;= zipLiteralSize]) ifFalse:<br>
&gt; &gt; [^false].<br>
&gt; &gt; zipDistances := interpreterProxy firstIndexableField: oop.<br>
&gt; &gt;<br>
&gt; &gt; oop := interpreterProxy fetchPointer: 11 ofObject: rcvr.<br>
&gt; &gt; ((interpreterProxy isWords: oop)<br>
&gt; &gt;  and: [(interpreterProxy slotSizeOf: oop) = DeflateMaxLiteralCodes])<br>
&gt; &gt; ifFalse:<br>
&gt; &gt; [^false].<br>
&gt; &gt; zipLiteralFreq := interpreterProxy firstIndexableField: oop.<br>
&gt; &gt;<br>
&gt; &gt; oop := interpreterProxy fetchPointer: 12 ofObject: rcvr.<br>
&gt; &gt; ((interpreterProxy isWords: oop)<br>
&gt; &gt;  and: [(interpreterProxy slotSizeOf: oop) = DeflateMaxDistanceCodes])<br>
&gt; &gt; ifFalse:<br>
&gt; &gt; [^false].<br>
&gt; &gt; zipDistanceFreq := interpreterProxy firstIndexableField: oop.<br>
&gt; &gt;<br>
&gt; &gt; zipLiteralCount := interpreterProxy fetchInteger: 13 ofObject: rcvr.<br>
&gt; &gt; zipMatchCount := interpreterProxy fetchInteger: 14 ofObject: rcvr.<br>
&gt; &gt;<br>
&gt; &gt; ^interpreterProxy failed not<br>
&gt; &gt;<br>
&gt; &gt; I propose to add a variable that holds the inst size of the superclass of<br>
&gt; &gt; InflateStream, and to use this to correct the offsets.  Objections?<br>
&gt; &gt; --<br>
&gt; &gt; best,<br>
&gt; &gt; Eliot<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
<br>
&gt;<br>
<br>
<br>
</div></div></blockquote></div><br></div>