question about Issue 207: ImageSegment discoverActiveClasses strange error

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

question about Issue 207: ImageSegment discoverActiveClasses strange error

Sheridan Mahoney
Hello,

I am new to Pharo, and so have been perusing the bug database,
and reading the recent posts in this list in order to investigate how
to become involved in this community.  So far, I am very impressed!
and encouraged that such a technically expert and friendly, supportive
group is coelescing on this work effort!

I have found a report that seems quite interesting, and have done
some digging into the issue described here:
http://code.google.com/p/pharo/issues/detail?id=207
( ImageSegment discoverActiveClasses strange error )
and now I have a few questions I was hoping to get feedback on.

It seems that, after using this method, some follow-up is required in
order to reset the image back to a usable state.  And there are several
options as to how to do that:

1) ImageSegment discoverActiveClasses.
ImageSegment activeClasses size printString , ' classes were active out of ' , Smalltalk allClasses size printString.

- this type of statment order will reset things ok.
       
2) ImageSegment discoverActiveClasses.
ImageSegment  recoverFromMDFault.
ImageSegment activeClasses.

- it appears you still need the activeClasses method to reset the image (which wasn't
entirely clear from the method comments - further comments may be useful here),
otherwise there are classes with methodDictionaries that are set to nil.

3) ImageSegment discoverActiveClasses.
Smalltalk at: #MDFaultDict put: Dictionary new.
ImageSegment  recoverFromMDFaultWithTrace.
Smalltalk at: #MDFaultDict.

- this sequence of statments will give the user a report of active classes along with a description of how they came to be used.
Similar to above o/w.

4)ImageSegment discoverActiveClasses.
ImageSegment swapOutInactiveClasses.

- there are at least 2 problems with this sequence -
a)  initial result is a DNU - ThreadSafeTranscript(Object)>>doesNotUnderstand: #print   
b) when you comment out the Transcript print statements to avoid the DNUs you get:
ByteString(Object)>errorImproperStore

I will be looking further into this issue, but was just wondering, firstly, is this a useful
area to be spending time, and secondly, would it be appropriate to start a new bug, or update the old one? 
Many thanks for your comments,

Sheridan Mahoney
 
_______________________________________________
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: question about Issue 207: ImageSegment discoverActiveClasses strange error

Stéphane Ducasse

On Sep 5, 2009, at 3:10 AM, [hidden email] wrote:

> Hello,
>
> I am new to Pharo, and so have been perusing the bug database,
> and reading the recent posts in this list in order to investigate how
> to become involved in this community.  So far, I am very impressed!
> and encouraged that such a technically expert and friendly, supportive
> group is coelescing on this work effort!

Thanks and welcome.
We are all learning :)

> I have found a report that seems quite interesting, and have done
> some digging into the issue described here:
> http://code.google.com/p/pharo/issues/detail?id=207
> ( ImageSegment discoverActiveClasses strange error )
> and now I have a few questions I was hoping to get feedback on.


We would love to have a couple of tests for imagesegment!!!!
Adrian did you publish the ones you did?

>
> It seems that, after using this method, some follow-up is required in
> order to reset the image back to a usable state.  And there are  
> several
> options as to how to do that:
>
> 1) ImageSegment discoverActiveClasses.
> ImageSegment activeClasses size printString , ' classes were active  
> out of ' , Smalltalk allClasses size printString.
>
> - this type of statment order will reset things ok.
>
> 2) ImageSegment discoverActiveClasses.
> ImageSegment  recoverFromMDFault.

this one is dangerous (from memory it hijacks the categories slot of a  
class to copy the methoddict and flush the
method dict) then at runtime it copies back the methoddict from  
categories to the method dict.
But last time I played with that it crashed


> ImageSegment activeClasses.
>
> - it appears you still need the activeClasses method to reset the  
> image (which wasn't
> entirely clear from the method comments - further comments may be  
> useful here),
> otherwise there are classes with methodDictionaries that are set to  
> nil.

Yes this code needs a really strong cleaning.

>
> 3) ImageSegment discoverActiveClasses.
> Smalltalk at: #MDFaultDict put: Dictionary new.
> ImageSegment  recoverFromMDFaultWithTrace.
> Smalltalk at: #MDFaultDict.
>
> - this sequence of statments will give the user a report of active  
> classes along with a description of how they came to be used.
> Similar to above o/w.
>
> 4)ImageSegment discoverActiveClasses.
> ImageSegment swapOutInactiveClasses.
>
> - there are at least 2 problems with this sequence -
> a)  initial result is a DNU -  
> ThreadSafeTranscript(Object)>>doesNotUnderstand: #print

excellent we should fix that (my mistake)


> b) when you comment out the Transcript print statements to avoid the  
> DNUs you get:
> ByteString(Object)>errorImproperStore
>
> I will be looking further into this issue, but was just wondering,  
> firstly, is this a useful
> area to be spending time, and secondly, would it be appropriate to  
> start a new bug, or update the old one?
> Many thanks for your comments,


What would be really cool is to make a call for ImageSegment tests so  
that we can start to build something
more robust and yes image segment are a cool features and we should  
take care of them.

>
> Sheridan Mahoney
>   _______________________________________________
> 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: question about Issue 207: ImageSegment discoverActiveClasses strange error

Adrian Lienhard
On Sep 5, 2009, at 10:46 , Stéphane Ducasse wrote:

> On Sep 5, 2009, at 3:10 AM, [hidden email] wrote:

[...]

>
>> I have found a report that seems quite interesting, and have done
>> some digging into the issue described here:
>> http://code.google.com/p/pharo/issues/detail?id=207
>> ( ImageSegment discoverActiveClasses strange error )
>> and now I have a few questions I was hoping to get feedback on.
>
>
> We would love to have a couple of tests for imagesegment!!!!
> Adrian did you publish the ones you did?

I committed my image segment tests to the inbox (Tests-AdrianLienhard.
19). There are some initial tests in ImageSegmentTest (one fails,  
which documents a problem of loading symbols). I also implemented  
support code that allows one to analyze a segment binary (i.e., to  
iterate over the instances in the segment without instantiating the  
objects). This should simplify writing more tests.

Cheers,
Adrian

[...]


___________________
http://www.adrian-lienhard.ch/


_______________________________________________
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: question about Issue 207: ImageSegment discoverActiveClasses strange error

Stéphane Ducasse
Sheridan
if you want you can commit in the pharoTaskForces project.
Like that your work is not mixed with the incoming flow of the inbox
that I try to keep as clean as possible.

>
>
>> On Sep 5, 2009, at 3:10 AM, [hidden email] wrote:
>
> [...]
>
>>
>>> I have found a report that seems quite interesting, and have done
>>> some digging into the issue described here:
>>> http://code.google.com/p/pharo/issues/detail?id=207
>>> ( ImageSegment discoverActiveClasses strange error )
>>> and now I have a few questions I was hoping to get feedback on.
>>
>>
>> We would love to have a couple of tests for imagesegment!!!!
>> Adrian did you publish the ones you did?
>
> I committed my image segment tests to the inbox (Tests-AdrianLienhard.
> 19). There are some initial tests in ImageSegmentTest (one fails,
> which documents a problem of loading symbols). I also implemented
> support code that allows one to analyze a segment binary (i.e., to
> iterate over the instances in the segment without instantiating the
> objects). This should simplify writing more tests.
>
> Cheers,
> Adrian
>
> [...]
>
>
> ___________________
> http://www.adrian-lienhard.ch/
>
>
> _______________________________________________
> 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: question about Issue 207: ImageSegment discoverActiveClasses strange error

Sheridan Mahoney
In reply to this post by Sheridan Mahoney




On Sep 5, 2009, at 10:46 , St?phane Ducasse wrote:

> On Sep 5, 2009, at 3:10 AM, [hidden email] wrote:

[...]

>
>> I have found a report that seems quite interesting, and have done
>> some digging into the issue described here:
>> http://code.google.com/p/pharo/issues/detail?id=207
>> ( ImageSegment discoverActiveClasses strange error )
>> and now I have a few questions I was hoping to get feedback on.
>
>
> We would love to have a couple of tests for imagesegment!!!!
> Adrian did you publish the ones you did?

I committed my image segment tests to the inbox (Tests-AdrianLienhard.
19). There are some initial tests in ImageSegmentTest (one fails,  
which documents a problem of loading symbols). I also implemented  
support code that allows one to analyze a segment binary (i.e., to  
iterate over the instances in the segment without instantiating the  
objects). This should simplify writing more tests.

Cheers,
Adrian

[...]


___________________
http://www.adrian-lienhard.ch/




Great!  Thanks!  I'll start exploring adding more tests for this area.
Sheridan



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