In 3.7alpha-5623 (vanilla image)
when using the Package Pane Browser to add a new class definition or especially when modifying one, the change gets made, but then a subscript out of bounds error is thrown.
31 December 2003 4:25:22 pm
VM: Win32 - a SmalltalkImage Image: Squeak3.7alpha [latest update: #5623]
Array(Object)>>error: Receiver: #('Preload' 'UI') Arguments and temporary variables: aString: 'subscript is out of bounds: 162' Receiver's instance variables: #('Preload' 'UI')
Array(Object)>>errorSubscriptBounds: Receiver: #('Preload' 'UI') Arguments and temporary variables: index: 162 Receiver's instance variables: #('Preload' 'UI')
Array(Object)>>at: Receiver: #('Preload' 'UI') Arguments and temporary variables: index: 162 Receiver's instance variables: #('Preload' 'UI')
PackagePaneBrowser>>selectedSystemCategoryName Receiver: a PackagePaneBrowser Arguments and temporary variables:
Receiver's instance variables: dependents: #(a SystemWindow(2192) a PluggableListMorph(1792) a PluggableListMo...etc... contents: nil currentCompiledMethod: nil contentsSymbol: #source systemOrganizer: ('Kernel-Objects' Boolean DependentsArray False MessageSend Mo...etc... classOrganizer: nil metaClassOrganizer: nil systemCategoryListIndex: 162 classListIndex: 0 messageCategoryListIndex: 0 messageListIndex: 0 editSelection: #newClass metaClassIndicated: false package: 'SUnit' packageListIndex: 25 packageList: nil
--- The full stack --- Array(Object)>>error: Array(Object)>>errorSubscriptBounds: Array(Object)>>at: PackagePaneBrowser>>selectedSystemCategoryName - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PackagePaneBrowser>>classList PluggableListMorph>>getList PluggableListMorph>>verifyContents [] in PackagePaneBrowser(Object)>>updateListsAndCodeIn: {[:aPane | aPane verifyContents]} Array(SequenceableCollection)>>do: PackagePaneBrowser(Object)>>updateListsAndCodeIn: PackagePaneBrowser(CodeHolder)>>updateListsAndCodeIn: PackagePaneBrowser(CodeHolder)>>stepIn: PackagePaneBrowser(Object)>>stepAt:in: SystemWindow>>stepAt: StepMessage(MorphicAlarm)>>value: WorldState>>runLocalStepMethodsIn: WorldState>>runStepMethodsIn: PasteUpMorph>>runStepMethods WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: PasteUpMorph>>doOneCycle [] in Project class>>spawnNewProcess {[[World doOneCycle. Processor yield. false] whileFalse. nil]} [] in BlockContext>>newProcess {[self value. Processor terminateActive]}
Ok, I've done some digging to try to figure out what is happening....
When changing a Class definition, Browser>>setClass:selector: sets the ivar systemCategoryListIndex (via an accessor method). This is set from systemCatIndex, and it reflects the system category that is selected, i.e., the index of the item in SystemOrganization>>categories. However, PackagePaneBrowser (PPB) is using the value os systemCategoryListIndex to select items in the second pane of the browser, which is what appears after the first dash in a category name.
For example, The 'Tools-Browser' category is index 33 (in my image), from: SystemOrganization categories indexOf: #'Tools-Browser'.
There are 10 categories that start with Tools-, Browser is number 2. What would then happen if edited the class definition for Browser is that the change would be made, systemCategoryListIndex would be set to 33 and the Browser is then unusable, because it is trying to select index 33 in a list of 10 items.
From what I can tell, the PPB is using the ivars package, packageListIndex, and packageList to keep track of the prefix of the System category, but on an accept of a Class edit, none of those related messages are ever sent.
Can anyone else verify this is happening in 3.7?
I have no idea how to fix this though... :-)
Brian
On Dec 31, 2003, at 4:27 PM, Brian Brown wrote:
In 3.7alpha-5623 (vanilla image)
when using the Package Pane Browser to add a new class definition or especially when modifying one, the change gets made, but then a subscript out of bounds error is thrown.
31 December 2003 4:25:22 pm
VM: Win32 - a SmalltalkImage Image: Squeak3.7alpha [latest update: #5623]
Array(Object)>>error: Receiver: #('Preload' 'UI') Arguments and temporary variables: aString: 'subscript is out of bounds: 162' Receiver's instance variables: #('Preload' 'UI')
Array(Object)>>errorSubscriptBounds: Receiver: #('Preload' 'UI') Arguments and temporary variables: index: 162 Receiver's instance variables: #('Preload' 'UI')
Array(Object)>>at: Receiver: #('Preload' 'UI') Arguments and temporary variables: index: 162 Receiver's instance variables: #('Preload' 'UI')
PackagePaneBrowser>>selectedSystemCategoryName Receiver: a PackagePaneBrowser Arguments and temporary variables:
Receiver's instance variables: dependents: #(a SystemWindow(2192) a PluggableListMorph(1792) a PluggableListMo...etc... contents: nil currentCompiledMethod: nil contentsSymbol: #source systemOrganizer: ('Kernel-Objects' Boolean DependentsArray False MessageSend Mo...etc... classOrganizer: nil metaClassOrganizer: nil systemCategoryListIndex: 162 classListIndex: 0 messageCategoryListIndex: 0 messageListIndex: 0 editSelection: #newClass metaClassIndicated: false package: 'SUnit' packageListIndex: 25 packageList: nil
--- The full stack --- Array(Object)>>error: Array(Object)>>errorSubscriptBounds: Array(Object)>>at: PackagePaneBrowser>>selectedSystemCategoryName
PackagePaneBrowser>>classList PluggableListMorph>>getList PluggableListMorph>>verifyContents [] in PackagePaneBrowser(Object)>>updateListsAndCodeIn: {[:aPane | aPane verifyContents]} Array(SequenceableCollection)>>do: PackagePaneBrowser(Object)>>updateListsAndCodeIn: PackagePaneBrowser(CodeHolder)>>updateListsAndCodeIn: PackagePaneBrowser(CodeHolder)>>stepIn: PackagePaneBrowser(Object)>>stepAt:in: SystemWindow>>stepAt: StepMessage(MorphicAlarm)>>value: WorldState>>runLocalStepMethodsIn: WorldState>>runStepMethodsIn: PasteUpMorph>>runStepMethods WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: PasteUpMorph>>doOneCycle [] in Project class>>spawnNewProcess {[[World doOneCycle. Processor yield. false] whileFalse. nil]} [] in BlockContext>>newProcess {[self value. Processor terminateActive]}
squeak-dev@lists.squeakfoundation.org