MessageNotUnderstood: UndefinedObject>>includes:

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

MessageNotUnderstood: UndefinedObject>>includes:

Hilaire Fernandes-4
I have this kind of error which appear randomly when I am
instantiating and displaying in real world a Morph.
Next from the morph is deduced Form field to use as the basis of a PNG
image for Seaside canvas.
It is easy to fix (or a least prevent the error) but it is system
land... so I am curious to read if other meet this problem.

See debuglog
--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

SqueakDebug.log (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: MessageNotUnderstood: UndefinedObject>>includes:

Hilaire Fernandes-4
I have to add that fixing those kind of issue look like fixing a ball
with many holes as when one is fixed another hole appears somewhere
else. Bad feeling of crapyness...

2009/2/25 Hilaire Fernandes <[hidden email]>:

> I have this kind of error which appear randomly when I am
> instantiating and displaying in real world a Morph.
> Next from the morph is deduced Form field to use as the basis of a PNG
> image for Seaside canvas.
> It is easy to fix (or a least prevent the error) but it is system
> land... so I am curious to read if other meet this problem.
>
> See debuglog
> --
> http://blog.ofset.org/hilaire
>



--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: MessageNotUnderstood: UndefinedObject>>includes:

Gary Chambers-4
In reply to this post by Hilaire Fernandes-4
There are a number of entries in Mantis for Squeak about this.
My feeling is that more than one preocess is running the world loop such that one starts doing the loop, another starts before the first is finished and ends (setting to nil) then the first encounters this.
The world loop is not thread safe.



From: Hilaire Fernandes <[hidden email]>
To: Pharo Development <[hidden email]>
Sent: Wednesday, 25 February, 2009 12:04:24 PM
Subject: [Pharo-project] MessageNotUnderstood: UndefinedObject>>includes:

I have this kind of error which appear randomly when I am
instantiating and displaying in real world a Morph.
Next from the morph is deduced Form field to use as the basis of a PNG
image for Seaside canvas.
It is easy to fix (or a least prevent the error) but it is system
land... so I am curious to read if other meet this problem.

See debuglog
--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: MessageNotUnderstood: UndefinedObject>>includes:

Hilaire Fernandes-4
Okay, thanks for the tip. Indeed this cascade of events occurs within
Seaside, which, if I understand correctly, run in its own thread.
The only things I am doing from this thread is to display a Morph. How
could I do that so the bang does not show up?

Hilaire


2009/2/25 GARY CHAMBERS <[hidden email]>:

> There are a number of entries in Mantis for Squeak about this.
> My feeling is that more than one preocess is running the world loop such
> that one starts doing the loop, another starts before the first is finished
> and ends (setting to nil) then the first encounters this.
> The world loop is not thread safe.
>
>
> ________________________________
> From: Hilaire Fernandes <[hidden email]>
> To: Pharo Development <[hidden email]>
> Sent: Wednesday, 25 February, 2009 12:04:24 PM
> Subject: [Pharo-project] MessageNotUnderstood: UndefinedObject>>includes:
>
> I have this kind of error which appear randomly when I am
> instantiating and displaying in real world a Morph.
> Next from the morph is deduced Form field to use as the basis of a PNG
> image for Seaside canvas.
> It is easy to fix (or a least prevent the error) but it is system
> land... so I am curious to read if other meet this problem.
>
> See debuglog
> --
> http://blog.ofset.org/hilaire
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: MessageNotUnderstood: UndefinedObject>>includes:

Hilaire Fernandes-4
To be more accurate the badness seems to occur when I am invoking
"World doOneCycle" from the Seaside canvas.

World doOneCycle is necessary in some situation to get Moprh in their
expected shape, because of the buggy Morph layout engine.
So, in a Seaside component, It results in uggly code like:

exercisePng
        | view |
        "Layout is buggy XXX"
        ^ exercisePng  ifNil: [view := step exerciseView.
                view openInWorld.
                view extent: 699@600.
                World doOneCycle.
                view extent: view extent + (1 @ 0).
                view delete.
                exercisePng  := self pngImage: view imageForm]

Don't know if there are better code to handle that.


2009/2/25 Hilaire Fernandes <[hidden email]>:

> Okay, thanks for the tip. Indeed this cascade of events occurs within
> Seaside, which, if I understand correctly, run in its own thread.
> The only things I am doing from this thread is to display a Morph. How
> could I do that so the bang does not show up?
>
> Hilaire
>
>
> 2009/2/25 GARY CHAMBERS <[hidden email]>:
>> There are a number of entries in Mantis for Squeak about this.
>> My feeling is that more than one preocess is running the world loop such
>> that one starts doing the loop, another starts before the first is finished
>> and ends (setting to nil) then the first encounters this.
>> The world loop is not thread safe.
>>
>>
>> ________________________________
>> From: Hilaire Fernandes <[hidden email]>
>> To: Pharo Development <[hidden email]>
>> Sent: Wednesday, 25 February, 2009 12:04:24 PM
>> Subject: [Pharo-project] MessageNotUnderstood: UndefinedObject>>includes:
>>
>> I have this kind of error which appear randomly when I am
>> instantiating and displaying in real world a Morph.
>> Next from the morph is deduced Form field to use as the basis of a PNG
>> image for Seaside canvas.
>> It is easy to fix (or a least prevent the error) but it is system
>> land... so I am curious to read if other meet this problem.
>>
>> See debuglog
>> --
>> http://blog.ofset.org/hilaire
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> http://blog.ofset.org/hilaire
>



--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: MessageNotUnderstood: UndefinedObject>>includes:

Tapple Gao
On Wed, Feb 25, 2009 at 02:55:54PM +0100, Hilaire Fernandes wrote:
> To be more accurate the badness seems to occur when I am invoking
> "World doOneCycle" from the Seaside canvas.
>
> World doOneCycle is necessary in some situation to get Moprh in their
> expected shape, because of the buggy Morph layout engine.
> So, in a Seaside component, It results in uggly code like:

Don't mess with morphic from threads other than the UI thread.
Don't add morphs. Don't run World doOneCycle.

The proper way to do this is to inject events into the UI
thread:

WorldState addDeferedUIMessage:
[MyMorph new openInWorld]

--
Matthew Fulmer -- http://mtfulmer.wordpress.com/

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: MessageNotUnderstood: UndefinedObject>>includes:

Hilaire Fernandes-4
2009/2/25 Matthew Fulmer <[hidden email]>:

> Don't mess with morphic from threads other than the UI thread.
> Don't add morphs. Don't run World doOneCycle.

Ah, the black art of Morph...
Thanks for the tip bellow, it helps a lot.

>
> The proper way to do this is to inject events into the UI
> thread:
>
> WorldState addDeferedUIMessage:
> [MyMorph new openInWorld]
>
> --
> Matthew Fulmer -- http://mtfulmer.wordpress.com/
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
http://blog.ofset.org/hilaire

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project