<div dir="ltr"><div><div><div><div>Hi<br><br></div><div>I don&#39;t know if this was reported. Apparently there is a problem when migrating a large number of instances, I have aprox. 270,000 instances from which I simply pulled up an ivar in their class to a higher superclass, and a PrimitiveFailed raised.<br></div></div><br></div>It can be reproduced by installing Territorial in Pharo 5.0 with Spur VM 5.0 from 4 May 2016 in Windows 8.1 (this is the standard image installed using wget command line in msys).<br><br>Gofer it<br>    smalltalkhubUser: &#39;hernan&#39; project: &#39;Territorial&#39;;<br>    configuration;<br>    loadDevelopment.<br>TCityOrganization addOpenGeoCode<br><br>Then manually install Territorial-<wbr>HernanMoralesDurand.163 from Monticello. Backwards (installing .163, populating, then .166) also reproduces the issue.<br><br>Is there a fix for this?<br><br></div><div>--- The full stack ---<br>Array(Object)&gt;&gt;<wbr>primitiveFailed:<br>Array(Object)&gt;&gt;primitiveFailed<br>Array&gt;&gt;<wbr>elementsForwardIdentityTo:<br>TerritorialCity class(ClassDescription)&gt;&gt;<wbr>updateInstances:from:isMeta:<br>TerritorialCity class(ClassDescription)&gt;&gt;<wbr>updateInstancesFrom:<br>PharoClassInstaller&gt;&gt;<wbr>updateClass:to:<br>[ 1 to: old size do: [ :index | self updateClass: (old at: index) to: (new at: index) ].<br>old elementsForwardIdentityTo: new.<br>&quot; Garbage collect away the zombie instances left behind in garbage memory in #updateInstancesFrom: &quot;<br>&quot; If we don&#39;t clean up this garbage, a second update would revive them with a wrong layout! &quot;<br>&quot; (newClass rather than oldClass, since they are now both newClass) &quot;<br>Smalltalk garbageCollect ] in PharoClassInstaller&gt;&gt;<wbr>migrateClasses:to:using:<br>BlockClosure&gt;&gt;ensure:<br>BlockClosure&gt;&gt;<wbr>valueUnpreemptively<br>PharoClassInstaller&gt;&gt;<wbr>migrateClasses:to:using:<br>SlotClassBuilder&gt;&gt;<wbr>migrateClasses:<br>SlotClassBuilder&gt;&gt;apply:<br>SlotClassBuilder&gt;&gt;build<br>PharoClassInstaller class(AbstractClassInstaller class)&gt;&gt;make:<br>[ PharoClassInstaller<br>    make: [ :builder | <br>        builder<br>            superclass: superClass;<br>            name: name;<br>            layoutClass: (ObjectLayout layoutForType: type);<br>            slots: self instanceVariables;<br>            sharedVariables: self classVariables;<br>            sharedPools: self sharedPoolsString;<br>            classSlots: self classInstanceVariables;<br>            traitComposition: self traitCompositionCompiled;<br>            classTraitComposition: self classTraitCompositionCompiled;<br>            comment: comment stamp: commentStamp;<br>            category: category;<br>            environment: superClass environment ] ] in MCClassDefinition&gt;&gt;createClass<br>BlockClosure&gt;&gt;on:do:<br>MCClassDefinition&gt;&gt;createClass<br>MCClassDefinition&gt;&gt;load<br>MCClassDefinition(<wbr>MCDefinition)&gt;&gt;<wbr>addMethodAdditionTo:<br>[ :each | each addMethodAdditionTo: methodAdditions ] in MCPackageLoader&gt;&gt;<wbr>basicLoadDefinitions<br>[ :each | <br>| newLabel |<br>&quot;Special handling for first and last element&quot;<br>(count = 0<br>    or: [ count + 1 = size<br>            or: [ (Time millisecondsSince: lastUpdate) &gt;= msecs ] ])<br>    ifTrue: [ bar current: count.<br>        oldLabel = (newLabel := (labelBlock cull: each) ifNil: [ oldLabel ])<br>            ifFalse: [ bar label: newLabel.<br>                oldLabel := newLabel ].<br>        lastUpdate := Time millisecondClockValue ].<br>aBlock value: each.<br>count := count + 1 ] in [ :bar | <br>labelBlock := aStringOrBlock isString<br>    ifTrue: [ bar label: aStringOrBlock.<br>        [ :dummyItem | aStringOrBlock ] ]<br>    ifFalse: [ aStringOrBlock ].<br>self<br>    do: [ :each | <br>        | newLabel |<br>        &quot;Special handling for first and last element&quot;<br>        (count = 0<br>            or: [ count + 1 = size<br>                    or: [ (Time millisecondsSince: lastUpdate) &gt;= msecs ] ])<br>            ifTrue: [ bar current: count.<br>                oldLabel<br>                    = (newLabel := (labelBlock cull: each) ifNil: [ oldLabel ])<br>                    ifFalse: [ bar label: newLabel.<br>                        oldLabel := newLabel ].<br>                lastUpdate := Time millisecondClockValue ].<br>        aBlock value: each.<br>        count := count + 1 ] ] in OrderedCollection(Collection)&gt;<wbr>&gt;do:displayingProgress:every:<br>OrderedCollection&gt;&gt;do:<br>[ :bar | <br>labelBlock := aStringOrBlock isString<br>    ifTrue: [ bar label: aStringOrBlock.<br>        [ :dummyItem | aStringOrBlock ] ]<br>    ifFalse: [ aStringOrBlock ].<br>self<br>    do: [ :each | <br>        | newLabel |<br>        &quot;Special handling for first and last element&quot;<br>        (count = 0<br>            or: [ count + 1 = size<br>                    or: [ (Time millisecondsSince: lastUpdate) &gt;= msecs ] ])<br>            ifTrue: [ bar current: count.<br>                oldLabel<br>                    = (newLabel := (labelBlock cull: each) ifNil: [ oldLabel ])<br>                    ifFalse: [ bar label: newLabel.<br>                        oldLabel := newLabel ].<br>                lastUpdate := Time millisecondClockValue ].<br>        aBlock value: each.<br>        count := count + 1 ] ] in OrderedCollection(Collection)&gt;<wbr>&gt;do:displayingProgress:every:<br>BlockClosure&gt;&gt;cull:<br>[ ^ block cull: self ] in [ self prepareForRunning.<br>CurrentJob value: self during: [ ^ block cull: self ] ] in Job&gt;&gt;run<br>[ p psValueAt: index put: anObject.<br>aBlock value ] in CurrentJob(DynamicVariable)&gt;&gt;<wbr>value:during:<br>BlockClosure&gt;&gt;ensure:<br>CurrentJob(DynamicVariable)&gt;&gt;<wbr>value:during:<br>CurrentJob class(DynamicVariable class)&gt;&gt;value:during:<br>[ self prepareForRunning.<br>CurrentJob value: self during: [ ^ block cull: self ] ] in Job&gt;&gt;run<br>BlockClosure&gt;&gt;ensure:<br>Job&gt;&gt;run<br>MorphicUIManager(UIManager)&gt;&gt;<wbr>displayProgress:from:to:<wbr>during:<br>ByteString(String)&gt;&gt;<wbr>displayProgressFrom:to:during:<br>OrderedCollection(Collection)&gt;<wbr>&gt;do:displayingProgress:every:<br>OrderedCollection(Collection)&gt;<wbr>&gt;do:displayingProgress:<br>MCPackageLoader&gt;&gt;<wbr>basicLoadDefinitions<br>[ self basicLoadDefinitions ] in [ self handleLoadErrorsDuring: [ self basicLoadDefinitions ] ] in MCPackageLoader&gt;&gt;basicLoad<br>BlockClosure&gt;&gt;on:do:<br> - - - - - - - - - - - - - - -  <br>            - - - - - - - - - - - - - - - - - -<br>[ aBlock<br>    on: InMidstOfFileinNotification<br>    do: [ :notification | notification resume: true ] ] in MCPackageLoader&gt;&gt;<wbr>handleLoadErrorsDuring:<br>BlockClosure&gt;&gt;on:do:<br>MCPackageLoader&gt;&gt;<wbr>handleLoadErrorsDuring:<br>[ self handleLoadErrorsDuring: [ self basicLoadDefinitions ] ] in MCPackageLoader&gt;&gt;basicLoad<br>BlockClosure&gt;&gt;ensure:<br>MCPackageLoader&gt;&gt;basicLoad<br>[ self basicLoad ] in MCPackageLoader&gt;&gt;<wbr>loadWithNameLike:<br>BlockClosure&gt;&gt;ensure:<br>MCPackageLoader&gt;&gt;<wbr>useChangeSetNamed:during:<br>MCPackageLoader&gt;&gt;<wbr>useNewChangeSetNamedLike:<wbr>during:<br>MCPackageLoader&gt;&gt;<wbr>loadWithNameLike:<br>MCThreeWayMerger(MCMerger)&gt;&gt;<wbr>loadWithNameLike:<br>MCVersionMerger&gt;&gt;<wbr>mergeWithNameLike:<br>MCVersionMerger class&gt;&gt;mergeVersion:<br>MCVersion&gt;&gt;merge<br>MCFileRepositoryInspector(<wbr>MCVersionInspector)&gt;&gt;merge<br>MCFileRepositoryInspector&gt;&gt;<wbr>merge<br>MCFileRepositoryInspector(<wbr>MCTool)&gt;&gt;performButtonAction:<wbr>enabled:<br>PluggableButtonMorph&gt;&gt;<wbr>performAction:<br>[ :m | <br>(m containsPoint: evt cursorPoint)<br>    ifTrue: [ m enabled<br>            ifTrue: [ m performAction: evt ] ] ] in PluggableButtonMorph&gt;&gt;mouseUp:<br>Array(SequenceableCollection)&gt;<wbr>&gt;do:<br>PluggableButtonMorph&gt;&gt;mouseUp:<br>PluggableButtonMorph(Morph)&gt;&gt;<wbr>handleMouseUp:<br>MouseButtonEvent&gt;&gt;sentTo:<br>PluggableButtonMorph(Morph)&gt;&gt;<wbr>handleEvent:<br>PluggableButtonMorph(Morph)&gt;&gt;<wbr>handleFocusEvent:<br>[ ActiveHand := self.<br>ActiveEvent := anEvent.<br>result := focusHolder<br>    handleFocusEvent: (anEvent transformedBy: (focusHolder transformedFrom: self)) ] in HandMorph&gt;&gt;sendFocusEvent:to:<wbr>clear:<br>BlockClosure&gt;&gt;on:do:<br>WorldMorph(PasteUpMorph)&gt;&gt;<wbr>becomeActiveDuring:<br>HandMorph&gt;&gt;sendFocusEvent:to:<wbr>clear:<br>HandMorph&gt;&gt;sendEvent:focus:<wbr>clear:<br>HandMorph&gt;&gt;sendMouseEvent:<br>HandMorph&gt;&gt;handleEvent:<br>HandMorph&gt;&gt;processEvents<br>[ :h | <br>ActiveHand := h.<br>h processEvents.<br>ActiveHand := nil ] in WorldState&gt;&gt;doOneCycleNowFor:<br>Array(SequenceableCollection)&gt;<wbr>&gt;do:<br>WorldState&gt;&gt;handsDo:<br>WorldState&gt;&gt;doOneCycleNowFor:<br>WorldState&gt;&gt;doOneCycleFor:<br>WorldMorph&gt;&gt;doOneCycle<br>[ [ World doOneCycle.<br>Processor yield.<br>false ] whileFalse: [  ] ] in MorphicUIManager&gt;&gt;<wbr>spawnNewProcess<br>[ self value.<br>Processor terminateActive ] in BlockClosure&gt;&gt;newProcess<br>------------------------------<wbr>------------------------------<wbr>-------------------<br><br></div><div><br><br></div>Hernán<br><br></div>