[squeak-dev] Re: UI lockup in Squeak 4.1

Eliot Miranda eliot.miranda at gmail.com
Tue Jul 13 20:11:27 UTC 2010


On Tue, Jul 13, 2010 at 12:59 PM, Rob Withers <reefedjib at yahoo.com> wrote:

> Hi Eliot,
>
> I already found it.
>

Doh!


>  It is this method, when the result of the dictionary lookup is nil for
> 'en', and it recursively calls localeID: with 'en'.
>
> LanguageEnvironment class>>#localeID: localeID
> ^self knownEnvironments at: localeID ifAbsent: [self localeID: (LocaleID
> isoLanguage: 'en')]
>

which clearly needs to read something like
 LanguageEnvironment class>>#localeID: localeID
    ^self knownEnvironments
        at: localeID
        ifAbsent: [self knownEnvironments at: (LocaleID isoLanguage: 'en')]
>
>
> I start the image with an intact KnownEnvironments.   Something somehow
> nils out the entries after I have run for awhile.   ??????
>

So guard against resetKnownEnvironments?


> Thanks,
> Rob
>
> ------------------------------
> *From:* Eliot Miranda <eliot.miranda at gmail.com>
>
> *To:* The general-purpose Squeak developers list <
> squeak-dev at lists.squeakfoundation.org>
> *Sent:* Tue, July 13, 2010 3:53:11 PM
>
> *Subject:* Re: [squeak-dev] Re: UI lockup in Squeak 4.1
>
> Rob,
>
>    put a breakpoint in the code that grows the heap (uxGrowMemoryBy?), let
> the heap grow to, say, 250Mb and then do
> (gdb) call printCallStack()
> to find out what's causing the growth.  Chances are you'll find your
> infinite recursion.
>
> HTH
> Eliot
>
> On Tue, Jul 13, 2010 at 11:42 AM, Rob Withers <reefedjib at yahoo.com> wrote:
>
>> --------------------------------------------------
>> From: "Rob Withers" <reefedjib at yahoo.com>
>> Sent: Tuesday, July 13, 2010 12:34 PM
>>
>> To: "The general-purpose Squeak developers list" <
>> squeak-dev at lists.squeakfoundation.org>
>> Subject: Re: [squeak-dev] Re: UI lockup in Squeak 4.1
>>
>>
>>  --------------------------------------------------
>>> From: "Andreas Raab" <andreas.raab at gmx.de>
>>> Sent: Tuesday, July 13, 2010 12:03 PM
>>> To: "The general-purpose Squeak developers list" <
>>> squeak-dev at lists.squeakfoundation.org>
>>> Subject: [squeak-dev] Re: UI lockup in Squeak 4.1
>>>
>>>  On 7/13/2010 8:57 AM, Rob Withers wrote:
>>>>
>>>>  This time it was a Cog VM which spasmed, which I use for my client
>>>>> (Squeak 4.1 for server for use with linux vm - I have no ability to
>>>>> compile a linux Cog vm: would love if someone posted one that could be
>>>>> launched headless for my webhost).
>>>>>
>>>>> It started running at 100% and I did your F2 -> Debug Options -> Print
>>>>> all processes. It started dumping a LOT to the Debug Console, then it
>>>>> froze, still at 100%, but no increase in memory now and it went (Not
>>>>> Responding) and greyed out the window.
>>>>>
>>>>> Luckily, I was able to see enough of the stack that was causing
>>>>> problems. It is infinitely looping in this method:
>>>>>
>>>>> LanguageEnvironment class>>#localeID: localeID
>>>>> ^self knownEnvironments at: localeID ifAbsent: [self localeID:
>>>>> (LocaleID
>>>>> isoLanguage: 'en')]
>>>>>
>>>>> This has nothing to do with my code, except I must be calling something
>>>>> that enters this loop. It happens in both Cog (Windows) and Squeak4.1
>>>>> (Linux <headless> and Windows).
>>>>>
>>>>> Not sure how to fix this.
>>>>>
>>>>
>>>> Debugging 101: Add a "self halt' in LanguageEnvironment and take it from
>>>> there :-)
>>>>
>>>
>>> :-)  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.
>>>
>>> Not sure why.
>>>
>>>
>> 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:.
>>
>> It is not a #become situation, since we still have some Latin1Environment
>> entries, and more than the Latin1Environment entries are changed to nil.
>>
>> There is only 2 references to LanguageEnvironment
>> class>>#KnownEnvironments, which are LanguageEnvironment
>> class>>#knownEnvironments and LanguageEnvironment
>> class>>#resetKnownEnvironments.
>>
>> There is only one sender of LanguageEnvironment class>>#knownEnvironments,
>> which is LanguageEnvironment class>>#localeID:
>> There are two senders of LanguageEnvironment
>> class>>#resetKnownEnvironments, which are
>> NaturalLanguageTranslator>>#loadForLocaleIsoString:fromGzippedMimeLiteral:
>> and NaturalLanguageTranslator>>#mergeTranslationFileNamed:.
>>
>> 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.
>>
>>
>> I am totally stumped.
>>
>> Rob
>>
>>
>>>> Cheers,
>>>>  - Andreas
>>>>
>>>>
>>>
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100713/0ce9a8ee/attachment.htm


More information about the Squeak-dev mailing list