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 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;">--------------------------------------------------<br>
From: "Rob Withers" <<a href="mailto:reefedjib@yahoo.com" target="_blank">reefedjib@yahoo.com</a>><br>
Sent: Tuesday, July 13, 2010 12:34 PM<div class="im"><br>
To: "The general-purpose Squeak developers list" <<a 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 class="h5"><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 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 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>