infinite loop in LanguageEditor

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

infinite loop in LanguageEditor

Pascal Grossé
Hi all,

I'm trying to help with the french translation of squeak. While using the
LanguageEditor, I found a potential infinite loop which can be triggered as
follows:

- use the SqueakPlugin-dev image available at
http://www.squeakland.org/installers/SqueakPluginImage-dev.zip, fully
updated.
- load Multilingual-Editor-tak.7.mcz from
http://www.squeaksource.com/LanguageEditor/
- set your locale as something non english (I'm obviously doing french
here).

Now, I've got 2 issue:

1. Since the status bar message of LanguageEditor is still untranslated (at
least in french), the (un)translated phrases lists are reinitialized each
time the status bar is updated (ie. every 2 seconds). This is caused by
NaturalLanguageTranslator>>translate: which re-registers the phrase each
time, thus sending a NaturalLanguageTranslator>>changed:#untranslated which
in turn triggers the reinitialization of LanguageEditor's UI.
Because of that, it is impossible to select a phrase for translation for
more than 2 seconds, unless we translate the status bar phrase at lightning
speed.

2. Even more nasty: if using a filter in the untranslated phrases panel, an
infinite loop between NaturalLanguageTranslator>>translate: and
LanguageEditor>>untranslated is triggered, because the former method tries
to find the filter string in all unstranslated phrases *and their
translations* (which do not exist, of course).

I think I nailed the bug, which is quite easy to correct. I joined a
changeset. I'm quite new to squeak (and even smalltalk), so pardon me if
I'm not following established methods for reporting bugs. I don't known if
it is possible for me to send a new version of LanguageEditor on
squeaksource via Monticello, as I've not tried. And I don't know how to use
Monticello for my NaturalLanguageTranslator corrections, because it is in
another package (category ?).

Pascal


LanguageEditor infinite loops.1.cs (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: infinite loop in LanguageEditor

Pascal Grossé
Pascal Grossé wrote:
> I think I nailed the bug, which is quite easy to correct. I joined a
> changeset. I'm quite new to squeak (and even smalltalk), so pardon me if
> I'm not following established methods for reporting bugs. I don't known if
> it is possible for me to send a new version of LanguageEditor on
> squeaksource via Monticello, as I've not tried. And I don't know how to
> use Monticello for my NaturalLanguageTranslator corrections, because it is
> in another package (category ?).

Sorry to respond to my own post, but Nicolas Cellier attracted my attention
to http://bugs.impara.de/view.php?id=3251. It looks like the problem I
reported. Since Nicolas explained to me how to use Mantis, I updated the
bug report with my observations and changeset.

Pascal



Reply | Threaded
Open this post in threaded view
|

Re: infinite loop in LanguageEditor

Yoshiki Ohshima
In reply to this post by Pascal Grossé
  Pascal,

> 1. Since the status bar message of LanguageEditor is still untranslated (at
> least in french), the (un)translated phrases lists are reinitialized each
> time the status bar is updated (ie. every 2 seconds). This is caused by
> NaturalLanguageTranslator>>translate: which re-registers the phrase each
> time, thus sending a NaturalLanguageTranslator>>changed:#untranslated which
> in turn triggers the reinitialization of LanguageEditor's UI.
> Because of that, it is impossible to select a phrase for translation for
> more than 2 seconds, unless we translate the status bar phrase at lightning
> speed.
>
> 2. Even more nasty: if using a filter in the untranslated phrases panel, an
> infinite loop between NaturalLanguageTranslator>>translate: and
> LanguageEditor>>untranslated is triggered, because the former method tries
> to find the filter string in all unstranslated phrases *and their
> translations* (which do not exist, of course).

  Takashi is the best person to comment on these, but it looks these
are real bugs.  Nice catch.

> I think I nailed the bug, which is quite easy to correct. I joined a
> changeset. I'm quite new to squeak (and even smalltalk), so pardon me if
> I'm not following established methods for reporting bugs. I don't known if
> it is possible for me to send a new version of LanguageEditor on
> squeaksource via Monticello, as I've not tried. And I don't know how to use
> Monticello for my NaturalLanguageTranslator corrections, because it is in
> another package (category ?).

  http://bugs.impara.de is the central repository to report bugs,
especially for the issues related to Squeakland, it is usually a good
idea to discuss it on the mailing lists.
(http://squeakland.org/mailman/listinfo/squeakland or squeak-dev.)

  For this matter, the change should go to both images.  For
Squeakland, we'll make sure it gets into the update stream.

-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: infinite loop in LanguageEditor

Takashi Yamamiya
Pascal, Yoshiki,

>   Pascal,
>
>> 1. Since the status bar message of LanguageEditor is still untranslated (at
>> least in french), the (un)translated phrases lists are reinitialized each
>> time the status bar is updated (ie. every 2 seconds). This is caused by
>> NaturalLanguageTranslator>>translate: which re-registers the phrase each
>> time, thus sending a NaturalLanguageTranslator>>changed:#untranslated which
>> in turn triggers the reinitialization of LanguageEditor's UI.
>> Because of that, it is impossible to select a phrase for translation for
>> more than 2 seconds, unless we translate the status bar phrase at lightning
>> speed.

Latest version of LanguageEditor in SqueakSource is tested in
Squeak3.8 and backport patch, but not for Squeakland. See;
http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-March/101143.html
http://languagegame.org:8080/ggame/17

I guess this problem is caused for it.
I'm not comfortable such miss compatibility, and I'll merge it soon.

>> 2. Even more nasty: if using a filter in the untranslated phrases panel, an
>> infinite loop between NaturalLanguageTranslator>>translate: and
>> LanguageEditor>>untranslated is triggered, because the former method tries
>> to find the filter string in all unstranslated phrases *and their
>> translations* (which do not exist, of course).

Thank you, I didn't know that.

>   Takashi is the best person to comment on these, but it looks these
> are real bugs.  Nice catch.

Cheers,
- Takashi


Reply | Threaded
Open this post in threaded view
|

Re: infinite loop in LanguageEditor

stéphane ducasse-2
Hi

Will the fixed of Pascal and  http://bugs.impara.de/view.php?id=3251 be
integrated on the SqueakSource version of the language editor?

Stef

> Pascal, Yoshiki,
>
>>   Pascal,
>>> 1. Since the status bar message of LanguageEditor is still  
>>> untranslated (at
>>> least in french), the (un)translated phrases lists are  
>>> reinitialized each
>>> time the status bar is updated (ie. every 2 seconds). This is  
>>> caused by
>>> NaturalLanguageTranslator>>translate: which re-registers the  
>>> phrase each
>>> time, thus sending a  
>>> NaturalLanguageTranslator>>changed:#untranslated which
>>> in turn triggers the reinitialization of LanguageEditor's UI.
>>> Because of that, it is impossible to select a phrase for  
>>> translation for
>>> more than 2 seconds, unless we translate the status bar phrase at  
>>> lightning
>>> speed.
>
> Latest version of LanguageEditor in SqueakSource is tested in
> Squeak3.8 and backport patch, but not for Squeakland. See;
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-March/ 
> 101143.html
> http://languagegame.org:8080/ggame/17
>
> I guess this problem is caused for it.
> I'm not comfortable such miss compatibility, and I'll merge it soon.
>
>>> 2. Even more nasty: if using a filter in the untranslated phrases  
>>> panel, an
>>> infinite loop between NaturalLanguageTranslator>>translate: and
>>> LanguageEditor>>untranslated is triggered, because the former  
>>> method tries
>>> to find the filter string in all unstranslated phrases *and their
>>> translations* (which do not exist, of course).
>
> Thank you, I didn't know that.
>
>>   Takashi is the best person to comment on these, but it looks these
>> are real bugs.  Nice catch.
>
> Cheers,
> - Takashi
>
>