<br><br><div class="gmail_quote">On Tue, Jul 13, 2010 at 12:59 PM, Rob Withers <span dir="ltr">&lt;<a href="mailto:reefedjib@yahoo.com">reefedjib@yahoo.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><div style="font-family:&#39;times new roman&#39;, &#39;new york&#39;, times, serif;font-size:10pt"><div>Hi Eliot,</div><div><br></div><div>I already found it. </div></div></div></blockquote><div><br></div><div>Doh!</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:&#39;times new roman&#39;, &#39;new york&#39;, times, serif;font-size:10pt"><div>
 It is this method, when the result of the dictionary lookup is nil for &#39;en&#39;, and it recursively calls localeID: with &#39;en&#39;.</div><div class="im"><div><font size="4"><span style="font-size:16px"><font size="3"><span style="font-size:13px"><br>
</span></font></span></font></div><div><span style="font-size:16px">LanguageEnvironment class&gt;&gt;#localeID: localeID<br>^self knownEnvironments at: localeID ifAbsent: [self localeID: (LocaleID<br>isoLanguage: &#39;en&#39;)]<br>
</span></div></div></div></div></blockquote><div><br></div><div>which clearly needs to read something like</div><div> <span class="Apple-style-span" style="font-family: &#39;times new roman&#39;, &#39;new york&#39;, times, serif; font-size: 16px; border-collapse: collapse; color: rgb(80, 0, 80); ">LanguageEnvironment class&gt;&gt;#localeID: localeID</span></div>
<span class="Apple-style-span" style="font-family: &#39;times new roman&#39;, &#39;new york&#39;, times, serif; font-size: 16px; border-collapse: collapse; color: rgb(80, 0, 80); ">    ^self knownEnvironments</span></div>
<div class="gmail_quote"><span class="Apple-style-span" style="font-family: &#39;times new roman&#39;, &#39;new york&#39;, times, serif; font-size: 16px; border-collapse: collapse; color: rgb(80, 0, 80); ">        at: localeID</span></div>
<div class="gmail_quote"><span class="Apple-style-span" style="font-family: &#39;times new roman&#39;, &#39;new york&#39;, times, serif; font-size: 16px; border-collapse: collapse; color: rgb(80, 0, 80); ">        ifAbsent: [self knownEnvironments at: (LocaleID isoLanguage: &#39;en&#39;)]</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-family:&#39;times new roman&#39;, &#39;new york&#39;, times, serif;font-size:10pt"><div class="im"><div><span style="font-size:16px"></span></div><div style="font-family:times new roman, new york, times, serif;font-size:10pt">
<br></div></div><div style="font-family:times new roman, new york, times, serif;font-size:10pt">I start the image with an intact KnownEnvironments.   Something somehow nils out the entries after I have run for awhile.   ??????</div>
</div></div></blockquote><div><br></div><div>So guard against resetKnownEnvironments?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:&#39;times new roman&#39;, &#39;new york&#39;, times, serif;font-size:10pt">
<div style="font-family:times new roman, new york, times, serif;font-size:10pt"><br></div><div style="font-family:times new roman, new york, times, serif;font-size:10pt">Thanks,<br>Rob</div><div style="font-family:times new roman, new york, times, serif;font-size:10pt">
<br><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight:bold">From:</span></b> Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;<div class="im">
<br><b><span style="font-weight:bold">To:</span></b> The general-purpose Squeak developers list &lt;<a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>&gt;<br></div>
<b><span style="font-weight:bold">Sent:</span></b> Tue, July 13, 2010 3:53:11 PM<div><div></div><div class="h5"><br><b><span style="font-weight:bold">Subject:</span></b> Re:
 [squeak-dev] Re: UI lockup in Squeak 4.1<br></div></div></font><div><div></div><div class="h5"><br>Rob,<div><br></div><div>   put a breakpoint in the code that grows the heap (uxGrowMemoryBy?), let the heap grow to, say, 250Mb and then do </div>
<div>(gdb) call printCallStack()<br>to find out what&#39;s causing the growth.  Chances are you&#39;ll find your infinite recursion.</div>
<div><br></div><div>HTH</div><div>Eliot</div><div><br><div class="gmail_quote">On Tue, Jul 13, 2010 at 11:42 AM, Rob Withers <span dir="ltr">&lt;<a rel="nofollow" href="mailto:reefedjib@yahoo.com" target="_blank">reefedjib@yahoo.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>
From: &quot;Rob Withers&quot; &lt;<a rel="nofollow" href="mailto:reefedjib@yahoo.com" target="_blank">reefedjib@yahoo.com</a>&gt;<br>
Sent: Tuesday, July 13, 2010 12:34 PM<div><br>
To: &quot;The general-purpose Squeak developers list&quot; &lt;<a rel="nofollow" href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>&gt;<br></div>
Subject: Re: [squeak-dev] Re: UI lockup in Squeak 4.1<div><div></div><div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--------------------------------------------------<br>
From: &quot;Andreas Raab&quot; &lt;<a rel="nofollow" href="mailto:andreas.raab@gmx.de" target="_blank">andreas.raab@gmx.de</a>&gt;<br>
Sent: Tuesday, July 13, 2010 12:03 PM<br>
To: &quot;The general-purpose Squeak developers list&quot; &lt;<a rel="nofollow" href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>&gt;<br>
Subject: [squeak-dev] Re: UI lockup in Squeak 4.1<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 7/13/2010 8:57 AM, Rob Withers wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This time it was a Cog VM which spasmed, which I use for my client<br>
(Squeak 4.1 for server for use with linux vm - I have no ability to<br>
compile a linux Cog vm: would love if someone posted one that could be<br>
launched headless for my webhost).<br>
<br>
It started running at 100% and I did your F2 -&gt; Debug Options -&gt; Print<br>
all processes. It started dumping a LOT to the Debug Console, then it<br>
froze, still at 100%, but no increase in memory now and it went (Not<br>
Responding) and greyed out the window.<br>
<br>
Luckily, I was able to see enough of the stack that was causing<br>
problems. It is infinitely looping in this method:<br>
<br>
LanguageEnvironment class&gt;&gt;#localeID: localeID<br>
^self knownEnvironments at: localeID ifAbsent: [self localeID: (LocaleID<br>
isoLanguage: &#39;en&#39;)]<br>
<br>
This has nothing to do with my code, except I must be calling something<br>
that enters this loop. It happens in both Cog (Windows) and Squeak4.1<br>
(Linux &lt;headless&gt; and Windows).<br>
<br>
Not sure how to fix this.<br>
</blockquote>
<br>
Debugging 101: Add a &quot;self halt&#39; in LanguageEnvironment and take it from there :-)<br>
</blockquote>
<br>
:-)  Ok, Things worked for awhile, then it started looping.  I found that most of the registered environments, in KnownEnvironments, are now nil. This includes all Environments except for &#39;el&#39; -&gt; GreekEnvironment, &#39;ja-etoys&#39; -&gt; JapaneseEnvironment, &#39;ca&#39; -&gt; Latin1Environment and &#39;sq&#39; -&gt; Latin1Environment.<br>


<br>
Not sure why.<br>
<br>
</blockquote>
<br></div></div>
I start the server and client with all known environments.  At some later point in time, some of the environments change to nil and I start looping through the absent block of the dictionary lookup for localID:.<br>
<br>
It is not a #become situation, since we still have some Latin1Environment entries, and more than the Latin1Environment entries are changed to nil.<br>
<br>
There is only 2 references to LanguageEnvironment class&gt;&gt;#KnownEnvironments, which are LanguageEnvironment class&gt;&gt;#knownEnvironments and LanguageEnvironment class&gt;&gt;#resetKnownEnvironments.<br>
<br>
There is only one sender of LanguageEnvironment class&gt;&gt;#knownEnvironments, which is LanguageEnvironment class&gt;&gt;#localeID:<br>
There are two senders of LanguageEnvironment class&gt;&gt;#resetKnownEnvironments, which are NaturalLanguageTranslator&gt;&gt;#loadForLocaleIsoString:fromGzippedMimeLiteral: and NaturalLanguageTranslator&gt;&gt;#mergeTranslationFileNamed:.<br>


<br>
I have three images: echat1.image (a client), echat2.image (another client) and echat-server.image.  I set &#39;self halt&#39; in the absent block of #localeID: and in #resetKnownEnvironments in all images.   I run the server and the 2 clients, connect the clients to the server and each other and then sit there.   #KnownEnvironments have the correct environments.  At some later time I try to copy text and #localID: self halt in the absent block gets called.  #KnownEnvironments in that image now have nils. #resetKnownEnvironments never gets called.<br>


<br>
<br>
I am totally stumped.<br>
<br>
Rob<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
  - Andreas<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote></div><br></div>
</div></div></div></div><div></div>


</div></div><br><br>
<br></blockquote></div><br>