<br><br><div class="gmail_quote">On Tue, Jul 13, 2010 at 12:59 PM, Rob Withers <span dir="ltr"><<a href="mailto:reefedjib@yahoo.com">reefedjib@yahoo.com</a>></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:'times new roman', 'new york', 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:'times new roman', 'new york', times, serif;font-size:10pt"><div>
It is this method, when the result of the dictionary lookup is nil for 'en', and it recursively calls localeID: with 'en'.</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>>#localeID: localeID<br>^self knownEnvironments at: localeID ifAbsent: [self localeID: (LocaleID<br>isoLanguage: 'en')]<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: 'times new roman', 'new york', times, serif; font-size: 16px; border-collapse: collapse; color: rgb(80, 0, 80); ">LanguageEnvironment class>>#localeID: localeID</span></div>
<span class="Apple-style-span" style="font-family: 'times new roman', 'new york', 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: 'times new roman', 'new york', 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: 'times new roman', 'new york', times, serif; font-size: 16px; border-collapse: collapse; color: rgb(80, 0, 80); "> ifAbsent: [self knownEnvironments at: (LocaleID isoLanguage: 'en')]</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-family:'times new roman', 'new york', 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:'times new roman', 'new york', 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 <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>><div class="im">
<br><b><span style="font-weight:bold">To:</span></b> The general-purpose Squeak developers list <<a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>><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's causing the growth. Chances are you'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"><<a rel="nofollow" href="mailto:reefedjib@yahoo.com" target="_blank">reefedjib@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">--------------------------------------------------<br>
From: "Rob Withers" <<a rel="nofollow" href="mailto:reefedjib@yahoo.com" target="_blank">reefedjib@yahoo.com</a>><br>
Sent: Tuesday, July 13, 2010 12:34 PM<div><br>
To: "The general-purpose Squeak developers list" <<a rel="nofollow" href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>><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: "Andreas Raab" <<a rel="nofollow" href="mailto:andreas.raab@gmx.de" target="_blank">andreas.raab@gmx.de</a>><br>
Sent: Tuesday, July 13, 2010 12:03 PM<br>
To: "The general-purpose Squeak developers list" <<a rel="nofollow" href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>><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 -> Debug Options -> 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>>#localeID: localeID<br>
^self knownEnvironments at: localeID ifAbsent: [self localeID: (LocaleID<br>
isoLanguage: 'en')]<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 <headless> and Windows).<br>
<br>
Not sure how to fix this.<br>
</blockquote>
<br>
Debugging 101: Add a "self halt' 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 'el' -> GreekEnvironment, 'ja-etoys' -> JapaneseEnvironment, 'ca' -> Latin1Environment and 'sq' -> 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>>#KnownEnvironments, which are LanguageEnvironment class>>#knownEnvironments and LanguageEnvironment class>>#resetKnownEnvironments.<br>
<br>
There is only one sender of LanguageEnvironment class>>#knownEnvironments, which is LanguageEnvironment class>>#localeID:<br>
There are two senders of LanguageEnvironment class>>#resetKnownEnvironments, which are NaturalLanguageTranslator>>#loadForLocaleIsoString:fromGzippedMimeLiteral: and NaturalLanguageTranslator>>#mergeTranslationFileNamed:.<br>
<br>
I have three images: echat1.image (a client), echat2.image (another client) and echat-server.image. I set 'self halt' 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>