[BUG] Autocompletition in OmniBrowser

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

[BUG] Autocompletition in OmniBrowser

Seckler, Eric
Hiho everyone,

first of all, I'm quite a newbie to Squeak - I beg your pardon for any mistakes on my account :-)
I think I have spotted a bug in OmniBrowser's autocompletition feature in the current Squeak trunk image.

In one of my classes, whenever I type any instance variable in a method and hit the space key followed by any other key (in order to type the message to be send to that instance variable), the attached error rises up.

It seems like SqueakInstvarInterfaceExtractor>>extractInterfacesFrom:addTo: is broken. It's called with the following method:
        RRBoard>>createFields
                fields := Matrix new: RRConstants boardSize tabulate: [ :y :x | self newFieldAt: x at: y ]
The method nativeSend:numArgs: in the same class finally crashes when it is called with this method and na=2:
        RRBoard>>newFieldAt: x at: y
                | field |
                field := RRField newForBoard: self.
                self addMorph: field.
                field
                        position: ((x - 1) * RRConstants fieldSize) @ ((y - 1) * RRConstants fieldSize);
                        borderOfClass: (self fieldBorderClassAt: x at: y).
                ^ field
The method SqueakTypeCollector>>handleAssignment:forTmp:in: is called with the same method and val=#temp->1 and index=0.
The array which is causing the exception contains only one element: a ExtractedTypeForTmp instance with the following instance variables:
        ivarClass: RRBoard
        ivarName: 1
        tag: nil
        nbOfCorrectTypes: nil
        nbOfIncorrectTypes: nil
        interface: an IdentitySet()
        assignments: an OrderedCollection()
        extractedTypes: nil
        links: a Set()
        compiledMethod: (RRBoard>>#createFields "a CompiledMethod(1220)")

I'm using a 4.2 trunk image prepared by the Software Architecture Group at our university.
If you need any more information or source code please contact me.

Thanks for your help
Eric

-----
Eric Seckler
Rembrandtstr. 8
14612 Falkensee
phone: +49-3322-236795
mobile: +49-151-22948869
email: [hidden email]
email2: [hidden email]


--------------------------------------------------------------------------------

19 November 2010 9:13:07.475 pm

VM: Win32 - Smalltalk
Image: Squeak4.2alpha [latest update: #7]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir P:\docs\Studium\HPI\Lehrveranstaltungen\S1011\Softwarearchitektur I\Squeak\SWA-2010.app\Contents\Resources
Trusted Dir P:\docs\Studium\HPI\Lehrveranstaltungen\S1011\Softwarearchitektur I\Squeak\SWA-2010.app\Contents\Resources\betasheet
Untrusted Dir C:\Users\betasheet\Documents\My Squeak

Array(Object)>>error:
        Receiver: {ExtractedType: Sends: {}
Assignments: {}
}
        Arguments and temporary variables:
                aString: 'subscript is out of bounds: 2'
        Receiver's instance variables:
{ExtractedType: Sends: {}
Assignments: {}
}

Array(Object)>>errorSubscriptBounds:
        Receiver: {ExtractedType: Sends: {}
Assignments: {}
}
        Arguments and temporary variables:
                index: 2
        Receiver's instance variables:
{ExtractedType: Sends: {}
Assignments: {}
}

Array(Object)>>at:
        Receiver: {ExtractedType: Sends: {}
Assignments: {}
}
        Arguments and temporary variables:
                index: 2
        Receiver's instance variables:
{ExtractedType: Sends: {}
Assignments: {}
}

SqueakTypeCollector(TypeCollector)>>handleAssignment:forTmp:in:
        Receiver: a SqueakTypeCollector
        Arguments and temporary variables:
                val: #temp->1
                index: 0
                aCompiledMethod: (RRBoard>>#newFieldAt:at: "a CompiledMethod(3951)")
        Receiver's instance variables:
                theClass: RRBoard
                instVars: #(#bounds #owner #submorphs #fullBounds #color #extension #borderWidt...etc...
                typingResults: {ExtractedType: Sends: {}
Assignments: {}
 . ExtractedType: Send...etc...
                currentExtractedMethod: (RRBoard>>#createFields "a CompiledMethod(1220)")
                localTypingResults: an IdentityDictionary((RRBoard>>#adjustSize "a CompiledMeth...etc...


--- The full stack ---
Array(Object)>>error:
Array(Object)>>errorSubscriptBounds:
Array(Object)>>at:
SqueakTypeCollector(TypeCollector)>>handleAssignment:forTmp:in:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[] in SqueakInstvarInterfaceExtractor(InstvarInterfaceExtractor)>>nativeSend:numArgs:
Array(SequenceableCollection)>>withIndexDo:
Array(SequenceableCollection)>>doWithIndex:
SqueakInstvarInterfaceExtractor(InstvarInterfaceExtractor)>>nativeSend:numArgs:
SqueakInstvarInterfaceExtractor>>send:numArgs:
SqueakInstvarInterfaceExtractor>>send:super:numArgs:
InstructionStream>>interpretNextInstructionFor:
SqueakInstvarInterfaceExtractor(InstvarInterfaceExtractor)>>extractInterfacesFrom:addTo:
[] in SqueakTypeCollector(TypeCollector)>>typeInstvarsOfClass:
MethodDictionary>>keysAndValuesDo:
RRBoard class(Behavior)>>selectorsAndMethodsDo:
SqueakTypeCollector(TypeCollector)>>typeInstvarsOfClass:
TypeCollector class>>typeInstvarsOfClass:
OContext(ECContext)>>typeInfosFor:
OContext(ECContext)>>guessWithRoelTyper:class:
OContext(ECContext)>>guessInstVarClass:
OContext(ECContext)>>guessTypeOf:
OContext(ECContext)>>computeReceiverClass
OContext(ECContext)>>compute
OContext(ECContext)>>setController:class:source:position:
OContext class(ECContext class)>>controller:class:source:position:
OController>>openMenuFor:
OController>>handleKeystrokeBefore:editor:
ECToolSet class>>codeCompletionAround:textMorph:keyStroke:
ToolSet class>>codeCompletionAround:textMorph:keyStroke:
OBTextMorphWithShout(TextMorph)>>keyStroke:
OBTextMorphWithShout(TextMorphForEditView)>>keyStroke:
OBTextMorphWithShout(TextMorph)>>handleKeystroke:
KeyboardEvent>>sentTo:
OBTextMorphWithShout(Morph)>>handleEvent:
OBTextMorphWithShout(Morph)>>handleFocusEvent:
[] in HandMorph>>sendFocusEvent:to:clear:
[] in PasteUpMorph>>becomeActiveDuring:
BlockClosure>>on:do:
PasteUpMorph>>becomeActiveDuring:
HandMorph>>sendFocusEvent:to:clear:
HandMorph>>sendEvent:focus:clear:
HandMorph>>sendKeyboardEvent:
HandMorph>>handleEvent:
HandMorph>>processEvents
[] in WorldState>>doOneCycleNowFor:
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in Project class>>spawnNewProcess
[] in BlockClosure>>newProcess