[BUG]? Walkback upgrading PackageLoader's map

Frank Shearar frank.shearar at rnid.org.uk
Fri Jun 11 12:54:19 UTC 2004


In my virgin 3.7b-5948 image I open a PackageLoader, and "upgrade map from
net". A walkback pops up. A MNU gets raised in SMSqueakMap>>reload, where
"self directory oldFileNamed: fname" returns nil.

This may have happened because I have my production and virgin images in the
same directory. I had both open, went to the production one, upgraded the
map there (successfully), went to the virgin image, tried to upgrade the map
and boom. I _think_ both had PackageLoaders open before I upgraded the
production one.

In which case the virgin image's PackageLoader thought the old map was
map<n>.sgz, as did the production image's PackageLoader. Production-image-PL
then upgraded the map, deleting the old map<n>.sgz and adding a
map<n+1>.sgz. Then when Virgin-image-PL tried to upgrade it tried to delete
map<n>.sgz which no longer existed.

Perhaps SMSqueakMap>>reload could ignore the fact that the expected map file
wasn't there, and tried to use the latest map file instead as a basis for
comparison against SqueakMap's latest map file?

reload
	"Reload the map from the latest checkpoint on disk.
	The opposite of #purge."

	| fname stream map mapfile contents |
	fname _ self lastCheckpointFilename.
	fname ifNil: [self error: 'No checkpoint available!'].

	mapfile _ self directory oldFileNamed: fname.
	mapfile ifNil: [self findLatestMapFile].
	contents _ mapFile ascii upToEnd unzipped.
	stream _ (RWBinaryOrTextStream with: contents) reset.
	stream ifNil: [self error: 'Couldn''t open stream on checkpoint file!'].
	[map _ (stream fileInObjectAndCode) install arrayOfRoots first] ensure:
[stream close].
	self copyFrom: map

for a suitably defined findLatestMapFile (maybe using String>>match?)

The stack:

11 June 2004 12:35:18 pm

VM: Win32 - a SmalltalkImage
Image: Squeak3.7beta [latest update: #5948]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir C:\Program Files\Squeak-3.2.2
Trusted Dir C:\Program Files\Squeak-3.2.2\FrankS
Untrusted Dir C:\My Squeak\FrankS

EventSensor>>processEvent:
	Receiver: an EventSensor
	Arguments and temporary variables:
		evt: 	#(2 273612685 46 0 8 0 0 0)
		type: 	2
		a: 	nil
	Receiver's instance variables:
		mouseButtons: 	0
		mousePosition: 	961 at 579
		keyboardBuffer: 	a SharedQueue
		interruptKey: 	2094
		interruptSemaphore: 	a Semaphore(a Process in
EventSensor(InputSensor)>>userInte...etc...
		eventQueue: 	a SharedQueue
		inputSemaphore: 	a Semaphore()
		lastEventPoll: 	274228388
		hasInputSemaphore: 	false

EventSensor>>fetchMoreEvents
	Receiver: an EventSensor
	Arguments and temporary variables:
		eventBuffer: 	#(2 273612685 46 0 8 0 0 0)
		type: 	2
	Receiver's instance variables:
		mouseButtons: 	0
		mousePosition: 	961 at 579
		keyboardBuffer: 	a SharedQueue
		interruptKey: 	2094
		interruptSemaphore: 	a Semaphore(a Process in
EventSensor(InputSensor)>>userInte...etc...
		eventQueue: 	a SharedQueue
		inputSemaphore: 	a Semaphore()
		lastEventPoll: 	274228388
		hasInputSemaphore: 	false

EventSensor>>nextEventFromQueue
	Receiver: an EventSensor
	Arguments and temporary variables:

	Receiver's instance variables:
		mouseButtons: 	0
		mousePosition: 	961 at 579
		keyboardBuffer: 	a SharedQueue
		interruptKey: 	2094
		interruptSemaphore: 	a Semaphore(a Process in
EventSensor(InputSensor)>>userInte...etc...
		eventQueue: 	a SharedQueue
		inputSemaphore: 	a Semaphore()
		lastEventPoll: 	274228388
		hasInputSemaphore: 	false

EventSensor>>nextEvent
	Receiver: an EventSensor
	Arguments and temporary variables:

	Receiver's instance variables:
		mouseButtons: 	0
		mousePosition: 	961 at 579
		keyboardBuffer: 	a SharedQueue
		interruptKey: 	2094
		interruptSemaphore: 	a Semaphore(a Process in
EventSensor(InputSensor)>>userInte...etc...
		eventQueue: 	a SharedQueue
		inputSemaphore: 	a Semaphore()
		lastEventPoll: 	274228388
		hasInputSemaphore: 	false


--- The full stack ---
EventSensor>>processEvent:
EventSensor>>fetchMoreEvents
EventSensor>>nextEventFromQueue
EventSensor>>nextEvent
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HandMorph>>processEvents
[] in WorldState>>doOneCycleNowFor: {[:h |  ActiveHand := h.  h
processEvents.  capturingGesture := capturingGest...]}
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
WorldState>>doOneSubCycleFor:
PasteUpMorph>>doOneSubCycle
MVCMenuMorph>>invokeAt:in:allowKeyboard:
[] in PopUpMenu>>startUpWithCaption:at:allowKeyboard: {[(MVCMenuMorph from:
self title: captionOrNil)   invokeAt: location   in: Ac...]}
BlockContext>>ensure:
CursorWithMask(Cursor)>>showWhile:
PopUpMenu>>startUpWithCaption:at:allowKeyboard:
PopUpMenu>>startUpWithCaption:at:
PopUpMenu>>startUpWithCaption:
PopUpMenu class>>inform:
SMLoader(Object)>>inform:
[] in SMLoader>>loadUpdates {[:ex | self inform: ('Error occurred when
updating map:\' , ex messageText) ...]}
BlockContext>>valueWithPossibleArgs:
[] in MethodContext(ContextPart)>>handleSignal: {[(self tempAt: 2)
valueWithPossibleArgs: {exception}]}
BlockContext>>ensure:
MethodContext(ContextPart)>>handleSignal:
MessageNotUnderstood(Exception)>>signal
UndefinedObject(Object)>>doesNotUnderstand: #ascii
SMSqueakMap>>reload
SMSqueakMap>>synchWithDisk
SMSqueakMap>>loadUpdatesFull:
SMSqueakMap>>loadFull
SMSqueakMap>>loadUpdates
[] in SMLoader>>loadUpdates {[squeakMap loadUpdates.  self noteChanged]}
BlockContext>>ensure:
CursorWithMask(Cursor)>>showWhile:
[] in SMLoader>>loadUpdates {[Cursor wait   showWhile: [squeakMap
loadUpdates.    self noteChanged]]}
BlockContext>>on:do:
SMLoader>>loadUpdates
SMLoader>>perform:orSendTo:
[] in MenuItemMorph>>invokeWithEvent: {[(selArgCount := selector numArgs) =
0   ifTrue: [target perform: selector] ...]}
BlockContext>>ensure:
CursorWithMask(Cursor)>>showWhile:
MenuItemMorph>>invokeWithEvent:
MenuItemMorph>>mouseUp:
MenuItemMorph>>handleMouseUp:
MouseButtonEvent>>sentTo:
MenuItemMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
...etc...





More information about the Squeak-dev mailing list