Issue 3090: Context not included in ImageSegment when saving morph to file

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

Issue 3090: Context not included in ImageSegment when saving morph to file

Sheridan Mahoney
I've just re-entered the Pharo world after a long(ish) absence, and wanted to report a
new bug submission; here's  the breakdown:

Pharo image:  dev 
Pharo core version: Pharo-1.1.1-- Latest update: #11414
Virtual machine used: 4.0.3.2202 Unix VM
OS: Ubuntu Lucid Lynx 10.04
Class browser used if applicable: SystemBrowser default

Steps to reproduce:
1.  start pharo 
2.  open a Shout workspace
3.  select the just-opened workspace
4.  Ctrl-right button to get the meta-click window
5.  select 'save morph in file'
6.  hit 'ok' to proffered name for file
7.  a message box comes up that reads 'please wait while objects are
    counted'.
8.  shortly after that an error is generated: 
    'Error: this context was not included in the ImageSegment'


I'm planning on doing more research, but wanted to get the issue reported.

Cheers,
Sheridan

PS - so far I really like 1.1.1 !!!  Good work, gang! 


_______________________________________________
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: Issue 3090: Context not included in ImageSegment when saving morph to file

Stéphane Ducasse
Thanks!

and welcome back.

Stef

On Oct 11, 2010, at 7:16 AM, Sheridan Mahoney wrote:

> I've just re-entered the Pharo world after a long(ish) absence, and wanted to report a
> new bug submission; here's  the breakdown:
>
> Pharo image:  dev
> Pharo core version: Pharo-1.1.1-- Latest update: #11414
> Virtual machine used: 4.0.3.2202 Unix VM
> OS: Ubuntu Lucid Lynx 10.04
> Class browser used if applicable: SystemBrowser default
>
> Steps to reproduce:
> 1.  start pharo
> 2.  open a Shout workspace
> 3.  select the just-opened workspace
> 4.  Ctrl-right button to get the meta-click window
> 5.  select 'save morph in file'
> 6.  hit 'ok' to proffered name for file
> 7.  a message box comes up that reads 'please wait while objects are
>     counted'.
> 8.  shortly after that an error is generated:
>     'Error: this context was not included in the ImageSegment'
>
>
> I'm planning on doing more research, but wanted to get the issue reported.
>
> Cheers,
> Sheridan
>
> PS - so far I really like 1.1.1 !!!  Good work, gang!  
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
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: Issue 3090: Context not included in ImageSegment when saving morph to file

Adrian Lienhard
In reply to this post by Sheridan Mahoney
For convenience, this is the link to the issue:

http://code.google.com/p/pharo/issues/detail?id=3090

I suspect that this bug is related to the new block closures.

Adrian

On Oct 11, 2010, at 07:15 , Sheridan Mahoney wrote:

> I've just re-entered the Pharo world after a long(ish) absence, and wanted to report a
> new bug submission; here's  the breakdown:
>
> Pharo image:  dev
> Pharo core version: Pharo-1.1.1-- Latest update: #11414
> Virtual machine used: 4.0.3.2202 Unix VM
> OS: Ubuntu Lucid Lynx 10.04
> Class browser used if applicable: SystemBrowser default
>
>
> Steps to reproduce:
>
> 1.  start pharo
> 2.  open a Shout workspace
> 3.  select the just-opened workspace
> 4.  Ctrl-right button to get the meta-click window
> 5.  select 'save morph in file'
> 6.  hit 'ok' to proffered name for file
> 7.  a message box comes up that reads 'please wait while objects are
>     counted'.
> 8.  shortly after that an error is generated:
>     'Error: this context was not included in the ImageSegment'
>
>
>
> I'm planning on doing more research, but wanted to get the issue reported.
>
> Cheers,
> Sheridan
>
> PS - so far I really like 1.1.1 !!!  Good work, gang!  
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
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: Issue 3090: Context not included in ImageSegment when saving morph to file

Mariano Martinez Peck
Hi Sheridan. I tried to fix it last night, but didn't succeed. Few notes:

- I could reproduce it
- The problem seems in writing a MethodContext since ContextPart >> storeDataOn:  throws the error
- ImageSegment is NOT BEING USED AT ALL. I just implement #new in ImageSegment to put a halt there, and nothing. No IS instance in created
And...if you see the method ContextPart >> storeDataOn:   it does:

    self error: 'This Context was not included in the ImageSegment'.
        "or perhaps ImageSegments were not used at all"

notice the comment

- In Squeak 4.1 save morph to file seems to be working. You can try to see why and compare. What I think is that in Squeak 4.1 maybe you don't have MethodContext (I put a halt in COntextOart >> storeDataOn: and never passes) to serialize and then this is what it works. I say this because in my case the MethodContext was something related to Polymorph (that it is not included in Squeak). Maybe that's the difference or maybe we broke something why cleaning Pharo.

- I don't think it is related to Closures

Cheers

Mariano
   

On Mon, Oct 11, 2010 at 11:04 AM, Adrian Lienhard <[hidden email]> wrote:
For convenience, this is the link to the issue:

http://code.google.com/p/pharo/issues/detail?id=3090

I suspect that this bug is related to the new block closures.

Adrian

On Oct 11, 2010, at 07:15 , Sheridan Mahoney wrote:

> I've just re-entered the Pharo world after a long(ish) absence, and wanted to report a
> new bug submission; here's  the breakdown:
>
> Pharo image:  dev
> Pharo core version: Pharo-1.1.1-- Latest update: #11414
> Virtual machine used: 4.0.3.2202 Unix VM
> OS: Ubuntu Lucid Lynx 10.04
> Class browser used if applicable: SystemBrowser default
>
>
> Steps to reproduce:
>
> 1.  start pharo
> 2.  open a Shout workspace
> 3.  select the just-opened workspace
> 4.  Ctrl-right button to get the meta-click window
> 5.  select 'save morph in file'
> 6.  hit 'ok' to proffered name for file
> 7.  a message box comes up that reads 'please wait while objects are
>     counted'.
> 8.  shortly after that an error is generated:
>     'Error: this context was not included in the ImageSegment'
>
>
>
> I'm planning on doing more research, but wanted to get the issue reported.
>
> Cheers,
> Sheridan
>
> PS - so far I really like 1.1.1 !!!  Good work, gang!
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


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


_______________________________________________
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: Issue 3090: Context not included in ImageSegment when saving morph to file

Sheridan Mahoney
In reply to this post by Stéphane Ducasse
Hi all,
The method that generated the error in issue 3090 is below:


MethodContext(ContextPart)>>storeDataOn: aDataStream

    "Contexts are not allowed go to out in DataStreams.  They must be included inside an ImageSegment."

    aDataStream insideASegment ifTrue: [^ super storeDataOn: aDataStream].

    self error: 'This Context was not included in the ImageSegment'.
        "or perhaps ImageSegments were not used at all"
    ^ nil


I've been trying to make sense of the stack, and it appears that writing a morph
to a file is hooking at least one extra object, which cannot be written to a DataStream.

Does anyone know whether the proper behavior is to:
- have the context go out without being inside an ImageSegment, or
- fix the morph-writing so that it uses ImageSegments???

Or perhaps there's a better way to understand the stack.

Many thanks,
and Cheers,

Sheri/dan



_______________________________________________
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: Issue 3090: Context not included in ImageSegment when saving morph to file

Sheridan Mahoney

Hi all,
The method that generated the error in issue 3090 is below:


MethodContext(ContextPart)>>storeDataOn: aDataStream

     "Contexts are not allowed go to out in DataStreams.  They must be included inside an ImageSegment."
 
     aDataStream insideASegment ifTrue: [^ super storeDataOn: aDataStream].
 
     self error: 'This Context was not included in the ImageSegment'.
         "or perhaps ImageSegments were not used at all"
     ^ nil


I've been trying to make sense of the stack, and it appears that writing a morph
to a file is hooking an object which cannot be written to a DataStream.

Does anyone know whether the proper behavior is to:
- have the MethodContext go out without being inside an ImageSegment, or
- fix the morph-writing so that it uses ImageSegments???   Mariano would love
this, right?   :)

Or perhaps there's a better way to understand the stack.

Many thanks,
and Cheers,

Sheri/dan


*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*
Listening's Auspicious Fortune is a heart
Rejuvenated with Profound Instructions.

Reflection's Auspicious Fortune is the collapse
Of delusion's false cavern.

      Kabje Kalu Rinpoche

"With a pure motivation that does not wane and
with great courage that does not despair, may
each of us endeavour to make our lives meaningful "

      H.H. the 17th Karmapa
      Orgyen Trinley Dorje




On Oct 11, 2010, at 7:16 AM, Sheridan Mahoney wrote:

> I've just re-entered the Pharo world after a long(ish) absence, and wanted to report a
> new bug submission; here's  the breakdown:
>
> Pharo image:  dev
> Pharo core version: Pharo-1.1.1-- Latest update: #11414
> Virtual machine used: 4.0.3.2202 Unix VM
> OS: Ubuntu Lucid Lynx 10.04
> Class browser used if applicable: SystemBrowser default
>
> Steps to reproduce:
> 1.  start pharo
> 2.  open a Shout workspace
> 3.  select the just-opened workspace
> 4.  Ctrl-right button to get the meta-click window
> 5.  select 'save morph in file'
> 6.  hit 'ok' to proffered name for file
> 7.  a message box comes up that reads 'please wait while objects are
>     counted'.
> 8.  shortly after that an error is generated:
>     'Error: this context was not included in the ImageSegment'
>
>
> I'm planning on doing more research, but wanted to get the issue reported.
>
> Cheers,
> Sheridan
>
> PS - so far I really like 1.1.1 !!!  Good work, gang!  
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



_______________________________________________
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: Issue 3090: Context not included in ImageSegment when saving morph to file

Adrian Lienhard
Ok, this is not related to closures. Polymorph uses blocks, e.g., for the addUpAction of a  MultistateButtonMorph (in this case the block is created in UIThemeWatery>>#createCloseBoxFor:). And blocks are not serializable with reference streams. Therefore, you cannot write out a window that has buttons. The original buttons in Morphic used action selectors instead of blocks. It shouldn't be hard to refactor Polymorph buttons to take the receiver, selector, and possible arguments instead of a block but I wonder whether its worth the trouble?

Cheers,
Adrian


On Oct 15, 2010, at 02:22 , Sheridan Mahoney wrote:

>
> Hi all,
> The method that generated the error in issue 3090 is below:
>
>
> MethodContext(ContextPart)>>storeDataOn: aDataStream
>
>     "Contexts are not allowed go to out in DataStreams.  They must be included inside an ImageSegment."
>
>     aDataStream insideASegment ifTrue: [^ super storeDataOn: aDataStream].
>
>     self error: 'This Context was not included in the ImageSegment'.
>         "or perhaps ImageSegments were not used at all"
>     ^ nil
>
>
> I've been trying to make sense of the stack, and it appears that writing a morph
> to a file is hooking an object which cannot be written to a DataStream.
>
> Does anyone know whether the proper behavior is to:
> - have the MethodContext go out without being inside an ImageSegment, or
> - fix the morph-writing so that it uses ImageSegments???   Mariano would love
> this, right?   :)
>
> Or perhaps there's a better way to understand the stack.
>
> Many thanks,
> and Cheers,
>
> Sheri/dan
>
>
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*
> Listening's Auspicious Fortune is a heart
> Rejuvenated with Profound Instructions.
>
> Reflection's Auspicious Fortune is the collapse
> Of delusion's false cavern.
>
>      Kabje Kalu Rinpoche
>
> "With a pure motivation that does not wane and
> with great courage that does not despair, may
> each of us endeavour to make our lives meaningful "
>
>      H.H. the 17th Karmapa
>      Orgyen Trinley Dorje
>
>
>
>
> On Oct 11, 2010, at 7:16 AM, Sheridan Mahoney wrote:
>
>> I've just re-entered the Pharo world after a long(ish) absence, and wanted to report a
>> new bug submission; here's  the breakdown:
>>
>> Pharo image:  dev
>> Pharo core version: Pharo-1.1.1-- Latest update: #11414
>> Virtual machine used: 4.0.3.2202 Unix VM
>> OS: Ubuntu Lucid Lynx 10.04
>> Class browser used if applicable: SystemBrowser default
>>
>> Steps to reproduce:
>> 1.  start pharo
>> 2.  open a Shout workspace
>> 3.  select the just-opened workspace
>> 4.  Ctrl-right button to get the meta-click window
>> 5.  select 'save morph in file'
>> 6.  hit 'ok' to proffered name for file
>> 7.  a message box comes up that reads 'please wait while objects are
>>    counted'.
>> 8.  shortly after that an error is generated:
>>    'Error: this context was not included in the ImageSegment'
>>
>>
>> I'm planning on doing more research, but wanted to get the issue reported.
>>
>> Cheers,
>> Sheridan
>>
>> PS - so far I really like 1.1.1 !!!  Good work, gang!  
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
> _______________________________________________
> 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: Issue 3090: Context not included in ImageSegment when saving morph to file

Eliot Miranda-2


On Thu, Oct 28, 2010 at 11:27 PM, Adrian Lienhard <[hidden email]> wrote:
Ok, this is not related to closures. Polymorph uses blocks, e.g., for the addUpAction of a  MultistateButtonMorph (in this case the block is created in UIThemeWatery>>#createCloseBoxFor:). And blocks are not serializable with reference streams. Therefore, you cannot write out a window that has buttons. The original buttons in Morphic used action selectors instead of blocks. It shouldn't be hard to refactor Polymorph buttons to take the receiver, selector, and possible arguments instead of a block but I wonder whether its worth the trouble?

But in principle there's no reason why BlockCLosures and their associated home contexts and methods can't be stored on a DataStream.  Is anyone brave enough to try and eliminate the restriction?

best
Eliot


Cheers,
Adrian


On Oct 15, 2010, at 02:22 , Sheridan Mahoney wrote:

>
> Hi all,
> The method that generated the error in issue 3090 is below:
>
>
> MethodContext(ContextPart)>>storeDataOn: aDataStream
>
>     "Contexts are not allowed go to out in DataStreams.  They must be included inside an ImageSegment."
>
>     aDataStream insideASegment ifTrue: [^ super storeDataOn: aDataStream].
>
>     self error: 'This Context was not included in the ImageSegment'.
>         "or perhaps ImageSegments were not used at all"
>     ^ nil
>
>
> I've been trying to make sense of the stack, and it appears that writing a morph
> to a file is hooking an object which cannot be written to a DataStream.
>
> Does anyone know whether the proper behavior is to:
> - have the MethodContext go out without being inside an ImageSegment, or
> - fix the morph-writing so that it uses ImageSegments???   Mariano would love
> this, right?   :)
>
> Or perhaps there's a better way to understand the stack.
>
> Many thanks,
> and Cheers,
>
> Sheri/dan
>
>
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*
> Listening's Auspicious Fortune is a heart
> Rejuvenated with Profound Instructions.
>
> Reflection's Auspicious Fortune is the collapse
> Of delusion's false cavern.
>
>      Kabje Kalu Rinpoche
>
> "With a pure motivation that does not wane and
> with great courage that does not despair, may
> each of us endeavour to make our lives meaningful "
>
>      H.H. the 17th Karmapa
>      Orgyen Trinley Dorje
>
>
>
>
> On Oct 11, 2010, at 7:16 AM, Sheridan Mahoney wrote:
>
>> I've just re-entered the Pharo world after a long(ish) absence, and wanted to report a
>> new bug submission; here's  the breakdown:
>>
>> Pharo image:  dev
>> Pharo core version: Pharo-1.1.1-- Latest update: #11414
>> Virtual machine used: 4.0.3.2202 Unix VM
>> OS: Ubuntu Lucid Lynx 10.04
>> Class browser used if applicable: SystemBrowser default
>>
>> Steps to reproduce:
>> 1.  start pharo
>> 2.  open a Shout workspace
>> 3.  select the just-opened workspace
>> 4.  Ctrl-right button to get the meta-click window
>> 5.  select 'save morph in file'
>> 6.  hit 'ok' to proffered name for file
>> 7.  a message box comes up that reads 'please wait while objects are
>>    counted'.
>> 8.  shortly after that an error is generated:
>>    'Error: this context was not included in the ImageSegment'
>>
>>
>> I'm planning on doing more research, but wanted to get the issue reported.
>>
>> Cheers,
>> Sheridan
>>
>> PS - so far I really like 1.1.1 !!!  Good work, gang!
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project