Hi Igor,<br><br><div class="gmail_quote">On Mon, Aug 6, 2012 at 6:50 AM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hi, all<br>
there was an outstanding issue with running a 200MB Moose image on windows,<br>
the VM was simply crashed.<br>
<br>
I took a look and found that the problem is in:<br>
<br>
#eeInstantiateSmallClass:sizeInBytes:<br>
<br>
crashing (i guess) </blockquote><div><br></div><div>How does it crash?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">at first few allocation once image loaded, because<br>

see the stack trace:<br>
<br>
Smalltalk stack dump:<br>
  0x1900dc I SmalltalkImage&gt;clearExternalObjects 63367860: a(n) SmalltalkImage<br>
  0x190108 I SmalltalkImage&gt;snapshot:andQuit: 63367860: a(n) SmalltalkImage<br>
0x1007b820 s [] in WorldState class&gt;saveSession<br>
0x1007b87c s BlockClosure&gt;ensure:<br>
<br>
<br>
so, i changed the last line in that method:<br>
<br>
-       ^self eeAllocate: sizeInBytes headerSize: hdrSize h1: header1 h2:<br>
header2 h3: 0<br>
<br>
+       ^  self allocate: sizeInBytes headerSize: hdrSize h1: header1 h2:<br>
header2 h3: 0 doFill: false format: 0<br>
<br>
and it is no longer crashes, and i were able to open and interact with<br>
that image..<br>
The VM works fine except from strange behavior with mouse cursor<br>
(which is always hidden unless you move &amp; click the mouse), regardless<br>
of image you opened..<br>
So, it sounds like the dirty fix is is really dirty and incomplete (if<br>
it can be considered a fix at all).<br>
<br>
Then i recompiled again, and i don&#39;t know what is changed (should be<br>
nothing), but while VM are no longer crashes, it doesn&#39;t opens a main<br>
window ..<br>
it simply stalls somewhere with 0% CPU load..<br>
looks like problem with undelivered events/signals etc.. or some<br>
threads are unable to initialize properly.. .<br>
<br>
Back to<br>
#eeInstantiateSmallClass:sizeInBytes:<br>
as i understand it is an optimized version of<br>
#instantiateSmallClass:sizeInBytes:<br>
so, replacing it back with that method should be ok?<br>
Except that ee-one guarantees to not trigger GC but looking at senders<br>
of this message it looks like it is not necessary to guarantee that..<br>
<br>
But i worry that the real fix should be in completely different place,<br>
because i guess we observe only a consequence of another flaw: since<br>
that method allocates new object(s) it assumes that there&#39;s enough<br>
free space on heap..<br>
and since there&#39;s none.. this means that some of the logic is flawed<br>
in another place.<br>
<br>
<br>
Eliot, if you can take a look, i can send you that image in private<br>
mail, because it looks like it will be hard to reproduce.<br>
Image opens and works fine on mac.. but on windows we&#39;re getting these<br>
strange issues.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Best regards,<br>
Igor Stasenko.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>