Hi Eliot. If I compile a StackVM, and I just press the left arrow in a code pane of a OB windows, in a pharo image, I get an asser that fails:<br>(oop &amp; 1) 19202<br><br>Sorry I bother with these asserts, but I am trying to solve the crashes I have and I think starting for the asserts is a good idea.<br>



<br>The assert that fails is in primitiveClosureValue()  the part:<br><br>blockClosure = longAt(GIV(stackPointer) + (GIV(argumentCount) * BytesPerWord));<br>    /* begin quickFetchInteger:ofObject: */<br>    oop = longAt((blockClosure + BaseHeaderSize) + (ClosureNumArgsIndex &lt;&lt; ShiftForWord));<br>



    assert((oop &amp; 1));<br>    numArgs = (oop &gt;&gt; 1);<br>    if (!(GIV(argumentCount) == numArgs)) {<br>        /* begin primitiveFail */<br>        if (GIV(primFailCode) == 0) {<br>            GIV(primFailCode) = 1;<br>



        }<br>        return;<br>    } <br><br><br>numArgs results to be a large number (using #printNum:   was 718613205), and if I try to do a #printOop:  I got a &quot; 0x55aa55aa0x55aa55aa is not on the heap&quot; <br>



<br>Now, of course, the &quot;if (!(GIV(argumentCount) == numArgs)) &quot; fails.<br><br>What it is funny is that I did a #printOop: of blockClosure instVar, and this is what I get:  0x1f59b578: a(n) Association<br><br>Association? WTF ?   so...I guess something weird is happening. I continue debugging it..and I noticed that:<br>


<br>- Several classes were called in addition to Association,like Character. These seems to be compact classes and implement #value and #value:   ;)<br>- Both, #bytecodePrimValue and #bytecodePrimValueWithArg  were not calling #primitiveClosureValue. So, &quot;isBlock&quot; was false...<br>


<br>I tried modifying #bytecodePrimValueWithArg and #bytecodePrimValue  this line:<br><br>isBlock := objectMemory is: rcvr instanceOf: <span style="background-color: rgb(255, 255, 51);">ClassBlockClosure</span> compactClassIndex: ClassBlockClosureCompactIndex.<br>


<br>to this one:<br><br>isBlock := objectMemory is: rcvr instanceOf: <span style="background-color: rgb(255, 255, 51);">(self splObj: ClassBlockClosure)</span> compactClassIndex: ClassBlockClosureCompactIndex.<br><br>
WIth this change, at least, the assert doesn&#39;t fail anymore. I made progress (maybe). But still, for normal closures, &quot;isBlock&quot; seems to be false. So.....all block values are being managed as a normal send ????<br>


<br>Now, I don&#39;t understand why ClassBlockClosureCompactIndex  is 0. I think this may be the problem. Why it is not 12? (in Pharo  Smalltalk compactClassesArray at: 12 -&gt;&gt;&gt; BlockClosure.)<br>I notice that ObjectMemory &gt;&gt; initializeCompactClassIndices  does:<br>


<br>    ClassBlockClosureCompactIndex := 0 &quot;12&quot;. &quot;Prospective.  Currently TranslatedMethod class&quot;<br><br><br>Notice that this ZERO changes the sematic of #is: oop instanceOf: classOop compactClassIndex: compactClassIndex<br>


called from the #bytecodePrimValue and bytecodePrimValueWithArg<br><br>Finally, I changed the mentioned line to this:<br><br>isBlock := objectMemory is: rcvr instanceOf:<span style="background-color: rgb(255, 255, 102);"> (self splObj: ClassBlockClosure) compactClassIndex: 12.</span><br>

   <br>and finally, with block closures, it is calling the primitive, and for Association it doesn&#39;t fail the assert.  ahh and the image doesn&#39;t crash ;)<br><br>I don&#39;t know if this is a bug, if my solution was ok, nor it impact. Please let me know.<br>

<br>Cheers<br><br>Mariano<br><br><br><br><br>