[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
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 <hilaire@ofset.org>:
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
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 <hilaire@ofset.org> To: Pharo Development <pharo-project@lists.gforge.inria.fr> 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
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 <gazzaguru2@btinternet.com>:
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 <hilaire@ofset.org> To: Pharo Development <pharo-project@lists.gforge.inria.fr> 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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
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 <hilaire@ofset.org>:
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 <gazzaguru2@btinternet.com>:
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 <hilaire@ofset.org> To: Pharo Development <pharo-project@lists.gforge.inria.fr> 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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
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/
2009/2/25 Matthew Fulmer <tapplek@gmail.com>:
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (3)
-
GARY CHAMBERS -
Hilaire Fernandes -
Matthew Fulmer