|
Tested on Pharo7.0.0rc1, build: 1403, commit: 0b130b0
When installing metalinks on message sends two kinds of errors may arise, KeyNotFound and buffer underflow. Why does this happen?
Below you find a script that instruments all sends in NeoJSON, fails for some, see output.\
Code:
link := MetaLink new metaObject: [ :s :r :a :v | ]; selector: #value:value:value:value:; control: #after; arguments: #(selector receiver arguments value). #'Neo-JSON-Core' asPackage methods do: [ :m | (m ast allChildren select: #isMessage) do: [ :n | n link: link ]. [ (m methodClass >> m selector) compileAndInstallCompiledMethod. Transcript show: 'Worked ' , m printString; cr ] on: Error do: [ :e | Transcript show: 'Failed ' , e printString , ' ' , m printString; cr. m recompile ] ]
Output:
Worked Object>>#neoJsonOn: Worked Number>>#neoJsonOn: Worked Dictionary>>#neoJsonOn: Worked UndefinedObject>>#neoJsonOn: Worked String>>#neoJsonOn: Worked Boolean>>#neoJsonOn: Worked Integer>>#neoJsonOn: Worked OrderedDictionary>>#neoJsonOn: Worked Collection>>#neoJsonOn: Worked SmallDictionary>>#neoJsonOn: Worked NeoJSONReader class>>#fromString:as: Worked NeoJSONReader class>>#fromString: Worked NeoJSONReader class>>#on: Worked NeoJSONWriter class>>#toString: Worked NeoJSONWriter class>>#on: Worked NeoJSONWriter class>>#toStringPretty: Worked NeoJSONObject class>>#fromString: Worked NeoJSONStreamingWriter class>>#on: Failed Error: stack underflow in bytecode generator NeoJSONObjectMapping>>#propertyNamed:ifAbsent: Failed Error: stack underflow in bytecode generator NeoJSONObjectMapping>>#mapInstVar: Worked NeoJSONObjectMapping>>#mapInstVars: Failed Error: stack underflow in bytecode generator NeoJSONObjectMapping>>#mapAccessor: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONObjectMapping>>#allowNil Failed KeyNotFound: key #RFArg1RFReification not found in Dictionary NeoJSONObjectMapping>>#readFrom: Worked NeoJSONObjectMapping>>#writeObject:on: Worked NeoJSONObjectMapping>>#mapAccessors: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONObjectMapping>>#identifier Worked NeoJSONObjectMapping>>#initialize Worked NeoJSONObjectMapping>>#mapAllInstVars Worked NeoJSONObjectMapping>>#mapInstVars Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONObjectMapping>>#subjectClass: Failed KeyNotFound: key #RFArg1RFReification not found in Dictionary NeoJSONObjectMapping>>#mapProperty:getter:setter: Failed Error: stack underflow in bytecode generator NeoJSONObjectMapping>>#mapInstVar:to: Failed Error: stack underflow in bytecode generator NeoJSONObjectMapping>>#mapAccessor:mutator:to: Failed Error: stack underflow in bytecode generator NeoJSONObjectMapping>>#mapAccessor:to: Worked NeoJSONMappingNotFound>>#standardMessageText Worked NeoJSONWriter>>#close Failed KeyNotFound: key #RFArg1RFReification not found in Dictionary NeoJSONWriter>>#writeStreamingDo: Worked NeoJSONWriter>>#initialize Worked NeoJSONWriter>>#newlineIndent Worked NeoJSONWriter>>#doesCodePointNeedEscaping: Worked NeoJSONWriter>>#writeList: Worked NeoJSONWriter>>#mapElementSeparator Worked NeoJSONWriter>>#newline Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONWriter>>#prettyPrint: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONWriter>>#newLine: Worked NeoJSONWriter>>#writeFloat: Worked NeoJSONWriter>>#encodeChar: Worked NeoJSONWriter>>#writeMap: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONWriter>>#writeNil Worked NeoJSONWriter>>#prettyPrintSpace Failed Error: stack underflow in bytecode generator NeoJSONWriter>>#escapeUnicode4: Worked NeoJSONWriter>>#encodeKey:value: Worked NeoJSONWriter>>#writeListStreamingDo: Worked NeoJSONWriter>>#escapeUnicode: Worked NeoJSONWriter>>#writeNull Worked NeoJSONWriter>>#escapeChar: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONWriter>>#asciiOnly: Worked NeoJSONWriter>>#listElementSeparator Worked NeoJSONWriter>>#writeMapStreamingDo: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONWriter>>#writeNil: Worked NeoJSONWriter>>#writeString: Worked NeoJSONWriter>>#writeInteger: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONWriter>>#on: Worked NeoJSONWriter>>#nextPut: Worked NeoJSONWriter>>#indentedDo: Worked NeoJSONWriter>>#writeBoolean: Failed Error: stack underflow in bytecode generator NeoJSONWriter>>#writeObject: Failed Error: stack underflow in bytecode generator NeoJSONWriter>>#encodeKey:value:as: Failed Error: stack underflow in bytecode generator NeoJSONWriter>>#nextPut:as: Worked NeoJSONCustomMapping>>#decoder: Worked NeoJSONCustomMapping>>#readFrom: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONCustomMapping>>#writer: Failed KeyNotFound: key #RFArg1RFReification not found in Dictionary NeoJSONCustomMapping>>#mapWithValueSchema: Failed Error: stack underflow in bytecode generator NeoJSONCustomMapping>>#writeObject:on: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONCustomMapping>>#schemaName: Failed KeyNotFound: key #RFArg1RFReification not found in Dictionary NeoJSONCustomMapping>>#listOfElementSchema: Worked NeoJSONCustomMapping>>#encoder: Failed KeyNotFound: key #RFArg1RFReification not found in Dictionary NeoJSONCustomMapping>>#listOfType:andElementSchema: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONCustomMapping>>#reader: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONCustomMapping>>#identifier Worked NeoJSONCustomMapping>>#listOfType: Failed KeyNotFound: key #RFArg1RFReification not found in Dictionary NeoJSONObject>>#atPath:put: Worked NeoJSONObject>>#value Worked NeoJSONObject>>#printOn: Failed Error: stack underflow in bytecode generator NeoJSONObject>>#at: Worked NeoJSONObject>>#doesNotUnderstand: Worked NeoJSONObject>>#atPath: Worked NeoJSONObject>>#name Worked NeoJSONMapper>>#mapAllInstVarsFor: Failed Error: stack underflow in bytecode generator NeoJSONMapper>>#customMappingFor: Worked NeoJSONMapper>>#for:customDo: Failed Error: stack underflow in bytecode generator NeoJSONMapper>>#mappingFor:ifAbsent: Worked NeoJSONMapper>>#mappings Failed Error: stack underflow in bytecode generator NeoJSONMapper>>#resolveMappingFor: Worked NeoJSONMapper>>#for:do: Failed Error: stack underflow in bytecode generator NeoJSONMapper>>#objectMappingFor: Worked NeoJSONMapper>>#mapInstVarsFor: Failed Error: stack underflow in bytecode generator NeoJSONMapper>>#mappingFor: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONStreamingWriter>>#on: Failed Error: stack underflow in bytecode generator NeoJSONStreamingWriter>>#writeKey:value:as: Worked NeoJSONStreamingWriter>>#wasUsed Worked NeoJSONStreamingWriter>>#initialize Worked NeoJSONStreamingWriter>>#writeNil Worked NeoJSONStreamingWriter>>#writeElement: Failed Error: stack underflow in bytecode generator NeoJSONStreamingWriter>>#writeElement:as: Failed Error: stack underflow in bytecode generator NeoJSONStreamingWriter>>#writeKey:value: Worked NeoJSONReader>>#error: Worked NeoJSONReader>>#parseNumberFraction Worked NeoJSONReader>>#parseValue Worked NeoJSONReader>>#nextListAs: Failed KeyNotFound: key #RFArg1RFReification not found in Dictionary NeoJSONReader>>#parseConstantDo: Worked NeoJSONReader>>#consumeWhitespace Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONReader>>#mapClass: Worked NeoJSONReader>>#parseListElementsDo: Worked NeoJSONReader>>#stringStreamContents: Failed Error: stack underflow in bytecode generator NeoJSONReader>>#parseCharacterHexDigit Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONReader>>#listClass: Worked NeoJSONReader>>#failIfNotAtEnd Worked NeoJSONReader>>#parseMapKeysDo: Worked NeoJSONReader>>#parseNumber Worked NeoJSONReader>>#unescapeChar: Worked NeoJSONReader>>#parseListDo: Worked NeoJSONReader>>#parseCharacter Worked NeoJSONReader>>#parseMapDo: Worked NeoJSONReader>>#listClass Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONReader>>#propertyNamesAsSymbols: Worked NeoJSONReader>>#initialize Worked NeoJSONReader>>#parseList Worked NeoJSONReader>>#mapClass Worked NeoJSONReader>>#parseNumberInteger Worked NeoJSONReader>>#matchChar: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONReader>>#on: Worked NeoJSONReader>>#atEnd Worked NeoJSONReader>>#parseNumberExponent Worked NeoJSONReader>>#nextAs: Worked NeoJSONReader>>#expectChar: Worked NeoJSONReader>>#match:do: Worked NeoJSONReader>>#parsePropertyName Failed KeyNotFound: key #RFArg1RFReification not found in Dictionary NeoJSONReader>>#parseString Worked NeoJSONReader>>#next Worked NeoJSONReader>>#parseMapKeysAndValuesDo: Worked NeoJSONReader>>#parseMap Worked NeoJSONReader>>#parseCharacterHex4Value Worked NeoJSONReader>>#close Worked NeoJSONReader>>#parseCharacterHex Worked NeoJSONReader>>#parseTrailingSurrogateHexEscape Worked NeoJSONMapping>>#readFrom: Worked NeoJSONMapping>>#writeObject:on: Worked NeoJSONMapping>>#identifier Worked NeoJSONMapping>>#printOn: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONPropertyMapping>>#setter: Failed MessageNotUnderstood: CompiledMethod>>compileAndInstallCompiledMethod NeoJSONPropertyMapping>>#valueSchema: Worked NeoJSONPropertyMapping>>#printOn: Failed Error: stack underflow in bytecode generator NeoJSONPropertyMapping>>#writeObject:on: Failed MessageNotUnderstood: ...
|
|
|
Priority: 3 – Must Fix
|
|
Status: Work Needed
|
|
Assigned to: Everyone
|
|
Milestone: Later
|
Go to Case
|
|