[Pharo-users] Renaming a Class triggers debugger

Nicolai Hess nicolaihess at web.de
Wed Oct 14 16:23:13 EDT 2015


2015-10-14 21:12 GMT+02:00 Lyn Headley <laheadle at gmail.com>:

> Hi Ben,
>
> Thanks for looking into this. I've gone through your steps on my
> machine (the image filename is Pharo-40622.image so I assume that is a
> build number) and I get the same error you do. As you say, the errors
> are not identical but hopefully this will lead to a fix for both. For
> continuing my work, I am going to install a fresh image, and hopefully
> I can still rename classes as long as there are no MessageBrowsers
> open. I'd be interested in hearing other workarounds.
>

Yes, I think this is just another error.

I can now reproduce the first one too.

1. Open fresh 4.0 image (I have 40619)
2. World > System Browser
3. Package pane > Add package > "AAPackage"
4. Class pane > Add class > "AAClass"
5. Check "class-side" (!)
6. Protocol pane > no messages
7. Code pane, add and accept this method
test1
  self aaclasstestselector
8. select "aaclasstestselector" and choose "senders of it" from the code
search context menu
    A MessageBrowser with one entry opens
9. Again in the SystemBrowser add another method on the class side
10. choose Class pane menu "Rename"
11. rename class AAClass to AAClass2
12. add a new method







>
> Lyn
>
> On Wed, Oct 14, 2015 at 7:01 AM, Ben Coman <btc at openinworld.com> wrote:
>
>> That sounds like a reasonable choice.  Anyhow, with build 50384 I can
>> reproduce a similar error as follows...
>>
>> 1. Open fresh image.
>> 2. World > Tools > Recent Messages
>> 3. World > System Browser
>> 4. Package pane > Add package > "AAPackage"
>> 5. Class pane > Add class > "AAClass"
>> 6. Protocol pane > no messages
>> 7. Code pane > replace template with "test1" and save
>> 8. Class pane > right-click "AAClass" > Rename > "AAClass2" > Ok
>> 9. Code pane > replace "test1" with "test2" and save
>>
>> which produces...
>>
>> UndefinedObject(Object)>>doesNotUnderstand: #timeStamp
>> RGMethodDefinition>>stamp
>> [ self class parseTimestampFrom: self stamp default: DateAndTime epoch
>> ] in RGMethodDefinition>>timeStamp
>> [ self at: key put: aBlock value ] in
>> IdentityDictionary(Dictionary)>>at:ifAbsentPut:
>> IdentityDictionary(Dictionary)>>at:ifAbsent:
>> IdentityDictionary(Dictionary)>>at:ifAbsentPut:
>> RGMethodDefinition(RGDefinition)>>annotationNamed:ifAbsentPut:
>> RGMethodDefinition>>timeStamp
>> [ :a :b | a timeStamp > b timeStamp ] in RecentMessageList>>open
>> Array(SequenceableCollection)>>mergeFirst:middle:last:into:by:
>> Array(SequenceableCollection)>>mergeSortFrom:to:src:dst:by:
>> OrderedCollection>>sort:
>> OrderedCollection(SequenceableCollection)>>sorted:
>> MultiColumnListModel(ListModel)>>items:
>> MessageBrowser>>messages:
>> ...
>> WorldMorph>>doOneCycle
>>
>> So thanks Lyn, you found a bug.  Did you get this same error, or just
>> similar?  Anyhow, it may be the same root cause.
>>
>> However I didn't create an issue in the tracker yet, since I wasn't
>> sure what the title should be... anyone?
>>
>> cheers -ben
>>
>> On Wed, Oct 14, 2015 at 10:27 AM, Lyn Headley <laheadle at gmail.com> wrote:
>> > Because Pharo 4 is the latest release. Do I really have to defend this
>> > choice?
>> >
>> > On Tue, Oct 13, 2015 at 2:32 PM, Alexandre Bergel <
>> alexandre.bergel at me.com>
>> > wrote:
>> >>
>> >> I have no idea. But why don’t you move to Pharo 5?
>> >>
>> >> Cheers,
>> >> Alexandre
>> >>
>> >>
>> >> > On Oct 13, 2015, at 4:36 PM, Lyn Headley <laheadle at gmail.com> wrote:
>> >> >
>> >> > Hello,
>> >> >
>> >> > I'm running pharo 4 and I'm having a problem. I recently renamed a
>> >> > class using the rename: menu item in the standard system browser (I
>> >> > believe it's called Nautilus) and now I am getting uncaught
>> exceptions
>> >> > whenever I add or remove a method (three debugger windows pop
>> >> > up). Here is the stack trace; any advice?
>> >> >
>> >> > Thank you.
>> >> >
>> >> > Lyn
>> >> >
>> >> > Author: LynHeadley
>> >> > Date: 2015-10-13T08:51:16.837987-07:00
>> >> >
>> >> > UndefinedObject(Object)>>doesNotUnderstand: #theMetaClass
>> >> > RGMetaclassDefinition>>realClass
>> >> > RGMethodDefinition(RGElementDefinition)>>realParent
>> >> > RGMethodDefinition(RGElementDefinition)>>realClass
>> >> > RGMethodDefinition>>methodClass
>> >> > ByteSymbol(Symbol)>>value:
>> >> > OrderedCollection>>collect:
>> >> > MessageBrowser>>buildHierarchyForMessages:
>> >> > MessageBrowser>>cacheHierarchyForClasses:
>> >> > MessageBrowser>>messages:
>> >> > [
>> >> > (item methodClass notNil and: [ item methodClass isObsolete not ])
>> >> >       ifTrue: [
>> >> >               | sel text boolean |
>> >> >               boolean := textModel hasUnacceptedEdits.
>> >> >               boolean
>> >> >                       ifTrue: [ text := textModel pendingText ].
>> >> >               sel := listModel selectedItem.
>> >> >               self
>> >> >                       messages:
>> >> >                               (listModel listItems
>> >> >                                       add: item asFullRingDefinition;
>> >> >                                       yourself).
>> >> >               listModel setSelectedItem: sel.
>> >> >               boolean
>> >> >                       ifTrue: [ textModel pendingText: text ] ] ] in
>> >> > MessageBrowser>>methodAdded:
>> >> > WorldState>>runStepMethodsIn:
>> >> > WorldMorph>>runStepMethods
>> >> > WorldState>>doOneCycleNowFor:
>> >> > WorldState>>doOneCycleFor:
>> >> > WorldMorph>>doOneCycle
>> >> > [
>> >> > [
>> >> > World doOneCycle.
>> >> > Processor yield.
>> >> > false ] whileFalse: [  ] ] in MorphicUIManager>>spawnNewProcess
>> >> > [
>> >> > self value.
>> >> > Processor terminateActive ] in BlockClosure>>newProcess
>> >> >
>> >>
>> >> --
>> >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> >> Alexandre Bergel  http://www.bergel.eu
>> >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>> >>
>> >>
>> >>
>> >>
>> >
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151014/7bff761b/attachment.html>


More information about the Pharo-users mailing list