Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Key not found: objectClassName" from SquotTrackedObjectMetadata when invoking "Add or remove packages" #340

Open
LinqLover opened this issue Aug 19, 2021 · 4 comments

Comments

@LinqLover
Copy link
Contributor

LinqLover commented Aug 19, 2021

Steps to reproduce:

For some reason, SquotWorkingCopy>>unloadedArtifacts contains an empty artifact (a SquotUnrecordedFilesArtifact('')). I can remove it manually, but it returns back every time I check out the latest master of the project.

How can I fix this? Tbh I do not really understand what's going on here. 😅

19 August 2021 10:56:33.115998 am

VM: Win32 - Smalltalk
Image: Squeak6.0alpha [latest update: #20546]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir C:\Users\Christoph\OneDrive\Dokumente\Squeak
Trusted Dir C:\Users\Christoph\OneDrive\Dokumente\Squeak\Christoph
Untrusted Dir C:\Users\Christoph\OneDrive\Dokumente\My Squeak

SquotTrackedObjectMetadata(Collection)>>errorKeyNotFound:
Receiver: a SquotTrackedObjectMetadata()
Arguments and temporary variables:
key: #objectClassName
Receiver's instance variables:
tally: 0
array: #(nil nil nil nil nil)

[] in SquotTrackedObjectMetadata(Dictionary)>>at:
Receiver: a SquotTrackedObjectMetadata()
Arguments and temporary variables:
key: #objectClassName
Receiver's instance variables:
tally: 0
array: #(nil nil nil nil nil)

SquotTrackedObjectMetadata(Dictionary)>>at:ifAbsent:
Receiver: a SquotTrackedObjectMetadata()
Arguments and temporary variables:
key: #objectClassName
aBlock: [closure] in SquotTrackedObjectMetadata(Dictionary)>>at:
Receiver's instance variables:
tally: 0
array: #(nil nil nil nil nil)

SquotTrackedObjectMetadata(Dictionary)>>at:
Receiver: a SquotTrackedObjectMetadata()
Arguments and temporary variables:
key: #objectClassName
Receiver's instance variables:
tally: 0
array: #(nil nil nil nil nil)

SquotTrackedObjectMetadata>>objectClassName
Receiver: a SquotTrackedObjectMetadata()
Arguments and temporary variables:

Receiver's instance variables: 
	tally: 	0
	array: 	#(nil nil nil nil nil)

[] in [] in SquitPackageChooser>>packagesIn:
Receiver: a SquitPackageChooser
Arguments and temporary variables:
aWorkingCopy: Sandblocks
packageNames: a WriteStream
each: unloaded a SquotUnrecordedFilesArtifact('')
Receiver's instance variables:
dependents: nil
selectionTracked: nil
trackedPackages: nil
untrackedPackages: nil
selectionUntracked: nil
stopTrackList: nil
startTrackList: nil
acceptChanges: false

[] in Dictionary>>select:
Receiver: a Dictionary(''->unloaded a SquotUnrecordedFilesArtifact('') 'packages/BaselineOfSandblock...etc...
Arguments and temporary variables:
aBlock: [closure] in [] in SquitPackageChooser>>packagesIn:
newCollection: a Dictionary('packages/BaselineOfSandblocks'->loaded 'packages/B...etc...
each: ''->unloaded a SquotUnrecordedFilesArtifact('')
Receiver's instance variables:
tally: 23
array: {'packages/Sandblocks-TreeSitter'->loaded 'packages/Sandblocks-TreeSitte...etc...

Dictionary>>associationsDo:
Receiver: a Dictionary(''->unloaded a SquotUnrecordedFilesArtifact('') 'packages/BaselineOfSandblock...etc...
Arguments and temporary variables:
aBlock: [closure] in Dictionary>>select:
element: ''->unloaded a SquotUnrecordedFilesArtifact('')
index: 22
indexLimiT: 31
Receiver's instance variables:
tally: 23
array: {'packages/Sandblocks-TreeSitter'->loaded 'packages/Sandblocks-TreeSitte...etc...

Dictionary>>select:
Receiver: a Dictionary(''->unloaded a SquotUnrecordedFilesArtifact('') 'packages/BaselineOfSandblock...etc...
Arguments and temporary variables:
aBlock: [closure] in [] in SquitPackageChooser>>packagesIn:
newCollection: a Dictionary('packages/BaselineOfSandblocks'->loaded 'packages/B...etc...
Receiver's instance variables:
tally: 23
array: {'packages/Sandblocks-TreeSitter'->loaded 'packages/Sandblocks-TreeSitte...etc...

Dictionary(Collection)>>select:thenDo:
Receiver: a Dictionary(''->unloaded a SquotUnrecordedFilesArtifact('') 'packages/BaselineOfSandblock...etc...
Arguments and temporary variables:
selectBlock: [closure] in [] in SquitPackageChooser>>packagesIn:
doBlock: [closure] in [] in SquitPackageChooser>>packagesIn:
Receiver's instance variables:
tally: 23
array: {'packages/Sandblocks-TreeSitter'->loaded 'packages/Sandblocks-TreeSitte...etc...

[] in SquitPackageChooser>>packagesIn:
Receiver: a SquitPackageChooser
Arguments and temporary variables:
aWorkingCopy: Sandblocks
packageNames: a WriteStream
Receiver's instance variables:
dependents: nil
selectionTracked: nil
trackedPackages: nil
untrackedPackages: nil
selectionUntracked: nil
stopTrackList: nil
startTrackList: nil
acceptChanges: false

OrderedCollection class(SequenceableCollection class)>>new:streamContents:
Receiver: OrderedCollection
Arguments and temporary variables:
newSize: 100
blockWithArg: [closure] in SquitPackageChooser>>packagesIn:
stream: a WriteStream
originalContents: nil
Receiver's instance variables:
superclass: SequenceableCollection
methodDict: a MethodDictionary(#add:->(OrderedCollection>>#add: "a CompiledMethod...etc...
format: 65539
instanceVariables: #('array' 'firstIndex' 'lastIndex')
organization: ('accessing' at: at:ifAbsentPut: at:put: capacity first indexOf:startingAt:...etc...
subclasses: {SortedCollection . GraphicSymbol . UrlArgumentList . TraitComposition...etc...
name: #OrderedCollection
classPool: nil
sharedPools: nil
environment: nil
category: #'Collections-Sequenceable'

OrderedCollection class(SequenceableCollection class)>>streamContents:
Receiver: OrderedCollection
Arguments and temporary variables:
blockWithArg: [closure] in SquitPackageChooser>>packagesIn:
Receiver's instance variables:
superclass: SequenceableCollection
methodDict: a MethodDictionary(#add:->(OrderedCollection>>#add: "a CompiledMethod...etc...
format: 65539
instanceVariables: #('array' 'firstIndex' 'lastIndex')
organization: ('accessing' at: at:ifAbsentPut: at:put: capacity first indexOf:startingAt:...etc...
subclasses: {SortedCollection . GraphicSymbol . UrlArgumentList . TraitComposition...etc...
name: #OrderedCollection
classPool: nil
sharedPools: nil
environment: nil
category: #'Collections-Sequenceable'

SquitPackageChooser>>packagesIn:
Receiver: a SquitPackageChooser
Arguments and temporary variables:
aWorkingCopy: Sandblocks
Receiver's instance variables:
dependents: nil
selectionTracked: nil
trackedPackages: nil
untrackedPackages: nil
selectionUntracked: nil
stopTrackList: nil
startTrackList: nil
acceptChanges: false

SquitPackageChooser>>chooseFor:
Receiver: a SquitPackageChooser
Arguments and temporary variables:
aWorkingCopy: Sandblocks
originalPackages: nil
addedPackages: nil
removedPackages: nil
subPath: nil
Receiver's instance variables:
dependents: nil
selectionTracked: nil
trackedPackages: nil
untrackedPackages: nil
selectionUntracked: nil
stopTrackList: nil
startTrackList: nil
acceptChanges: false

SquitPackageChooser class>>chooseFor:
Receiver: SquitPackageChooser
Arguments and temporary variables:
aWorkingCopy: Sandblocks
Receiver's instance variables:
superclass: Model
methodDict: a MethodDictionary(#accept->(SquitPackageChooser>>#accept "a CompiledMethod...etc...
format: 65544
instanceVariables: #('selectionTracked' 'trackedPackages' 'untrackedPackages' '...etc...
organization: ('actions' accept trackSelected untrackSelected)
('toolbuilder' buildButtons:...etc...
subclasses: nil
name: #SquitPackageChooser
classPool: nil
sharedPools: nil
environment: Smalltalk
category: #'Squit-UI'

[] in SquitBrowser>>actionAddOrRemoveTrackedPackages
Receiver: a SquitBrowser
Arguments and temporary variables:

Receiver's instance variables: 
	dependents: 	a DependentsArray(a PluggableSystemWindow<Git Browser: Sandblocks (...etc...
	projectIndex: 	2
	commitSelection: 	commit 162edb6 "ts: wip introduce explicit repeat slot"
	objectIndex: 	nil
	objectCache: 	{Unrecorded files . packages/BaselineOfSandblocks . packages/Sandb...etc...
	commitForCache: 	commit 162edb6 "ts: wip introduce explicit repeat slot"
	timeOfLastListUpdate: 	3806816187046
	searchTerm: 	''
	offeredToAddFirstProject: 	true
	repositoryExists: 	true
	cachedCommitList: 	an OrderedCollection(commit 162edb6 "ts: wip introduce explic...etc...
	commitListBuildProcess: 	a Process(SquitBrowser commit list loader) in [] in FullBlockClosure...etc...
	selectedHistorian: 	a SquitHistorian('refs/heads/master')
	indexOfActiveHistorianInBranchList: 	8
	branchList: 	an OrderedCollection('experiment-box-layout' 'feat/mouse-suggestion...etc...
	commitToDiffAgainst: 	nil

[] in GitCurrentUnitOfWork class(DynamicVariable class)>>value:during:
Receiver: GitCurrentUnitOfWork
Arguments and temporary variables:
anObject: a Dictionary(a GitRepository C:\Users\Christoph\OneDrive\Dokumente\Sq...etc...
aBlock: [closure] in SquitBrowser>>actionAddOrRemoveTrackedPackages
p: a Process(95751) in MorphicDebugger class>>openOn:context:label:contents:fullView:...etc...
oldValue: nil
outerScopeWasDynamic: false
Receiver's instance variables:
superclass: DynamicVariable
methodDict: a MethodDictionary()
format: 0
instanceVariables: nil
organization: ('as yet unclassified')

	subclasses: 	nil
	name: 	#GitCurrentUnitOfWork
	classPool: 	nil
	sharedPools: 	nil
	environment: 	Smalltalk
	category: 	#'FileSystem-Git-Plumbing-Core'
	hash: 	99344143

FullBlockClosure(BlockClosure)>>ensure:
Receiver: [closure] in GitCurrentUnitOfWork class(DynamicVariable class)>>value:during:
Arguments and temporary variables:
aBlock: [closure] in GitCurrentUnitOfWork class(DynamicVariable class)>>value:during:...etc...
complete: nil
returnValue: nil
Receiver's instance variables:
outerContext: GitCurrentUnitOfWork class(DynamicVariable class)>>value:during:
startpcOrMethod: ([] in DynamicVariable class>>#value:during: "a CompiledBlock(...etc...
numArgs: 0
receiver: GitCurrentUnitOfWork

--- The full stack ---
SquotTrackedObjectMetadata(Collection)>>errorKeyNotFound:
[] in SquotTrackedObjectMetadata(Dictionary)>>at:
SquotTrackedObjectMetadata(Dictionary)>>at:ifAbsent:
SquotTrackedObjectMetadata(Dictionary)>>at:
SquotTrackedObjectMetadata>>objectClassName
[] in [] in SquitPackageChooser>>packagesIn:
[] in Dictionary>>select:
Dictionary>>associationsDo:
Dictionary>>select:
Dictionary(Collection)>>select:thenDo:
[] in SquitPackageChooser>>packagesIn:
OrderedCollection class(SequenceableCollection class)>>new:streamContents:
OrderedCollection class(SequenceableCollection class)>>streamContents:
SquitPackageChooser>>packagesIn:
SquitPackageChooser>>chooseFor:
SquitPackageChooser class>>chooseFor:
[] in SquitBrowser>>actionAddOrRemoveTrackedPackages
[] in GitCurrentUnitOfWork class(DynamicVariable class)>>value:during:
FullBlockClosure(BlockClosure)>>ensure:


GitCurrentUnitOfWork class(DynamicVariable class)>>value:during:
GitCurrentUnitOfWork class>>value:for:during:
GitUnitOfWork>>activateDuring:
SquitUnitOfWork>>activateDuring:
[] in SquitBrowser>>withUnitOfWork:
FullBlockClosure(BlockClosure)>>ensure:
SquitBrowser>>withUnitOfWork:
SquitBrowser>>actionAddOrRemoveTrackedPackages
SquitBrowser(Object)>>perform:orSendTo:
[] in MenuItemMorph>>invokeWithEvent:
FullBlockClosure(BlockClosure)>>ensure:
CursorWithMask(Cursor)>>showWhile:
MenuItemMorph>>invokeWithEvent:
MenuItemMorph>>mouseUp:
MenuItemMorph>>handleMouseUp:
MouseButtonEvent>>sentTo:
MenuItemMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchEvent:withHandler:withMorph:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuItemMorph(Morph)>>processEvent:using:
MenuItemMorph(Morph)>>processEvent:
[] in MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf:
Array(SequenceableCollection)>>do:
MenuMorph(Morph)>>submorphsDo:
MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf:
MorphicEventDispatcher>>dispatchEvent:withHandler:withMorph:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>doProcessingForFocusEvent:with:
MorphicEventDispatcher>>dispatchFocusEventFully:with:
MenuMorph>>processFocusEvent:using:
MenuMorph(Morph)>>processFocusEvent:
[] in [] in [] in HandMorph>>sendFocusEvent:to:clear:
[] in ActiveEventVariable class(DynamicVariable class)>>value:during:
FullBlockClosure(BlockClosure)>>ensure:
ActiveEventVariable class(DynamicVariable class)>>value:during:
[] in ActiveEventVariable class>>value:during:
FullBlockClosure(BlockClosure)>>ensure:
ActiveEventVariable class>>value:during:
MouseButtonEvent(MorphicEvent)>>becomeActiveDuring:
-- and more not shown --

@j4yk
Copy link
Collaborator

j4yk commented Aug 20, 2021

That the unrecorded files are among the unloadedArtifacts is as expected, because they are not somehow loaded into the image. A Key not found error is not expected, of course.

My image has this method definition, which does not match your stack trace:

objectClassName
	^ self at: #objectClassName ifAbsent: []

(SquotTrackedObjectMetadata - jr 4/19/2021 19:49)

This is on the develop branch. Why is there #at: in your stacktrace instead of #at:ifAbsent:?

@LinqLover
Copy link
Contributor Author

Why is there #at: in your stacktrace instead of #at:ifAbsent:?

Good question. I have tested out the same workflow both with the latest release and the latest dev commit. The stacktrace has been recorded in the release version, but there was definitively also an error on the dev branch ... Will send you another stacktrace as soon as I hit the bug again :)

@LinqLover
Copy link
Contributor Author

(Yeah, maybe you could need a Needs-Repo label in this issue tracker, just for me ... :D)

@j4yk
Copy link
Collaborator

j4yk commented Aug 22, 2021

As a first step, please check whether the method I posted is the same in your images. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants