[Glass] [Jade]: Failure when Inpection an instance of IdentitySet

James Foster via Glass glass at lists.gemtalksystems.com
Sun Nov 23 19:32:49 PST 2014


I believe that this problem was fixed with a recent change to include dynamic instance variables in the inspector. If you can reproduce it on a recent build let me know the Jade version and the GemStone/S version.

James

> On Oct 4, 2014, at 9:57 AM, BrunoBB via Glass <glass at lists.gemtalksystems.com> wrote:
> 
> Hi,
> 
> I did hit this bug but asOrderedCollection is a workaround i never mind...
> 
> Is a Bug in JadeServer64bit3x>>inspect: method in Dolphin code.
> 
> In my image i did a very ugly workaround... (you have to close Dolphin image
> and open it again in order to work)
> 
> 	anObject class format > 0 ifTrue: [
> 		1 to: (anObject _basicSize min: 100) do: [:i | 
> 			i printOn: stream.
> 			stream tab.
> 			self print: (self oopOf: ([anObject _basicAt: i] on: Error do:[:err |
> anObject asOrderedCollection _basicAt: i])) on: stream. "BRUNO UGLY FIX"
> 			stream lf.
> 		].
> 
> The complete #inspect: method  is:
> inspect: anObject
> 
> 	| stream list dynamic string size |
> 	(stream := WriteStream on: String new)
> 		nextPutAll: anObject class name; tab;
> 		yourself.
> 	(self oopOf: anObject) printOn: stream.
> 	stream lf.
> 	(anObject isKindOf: Dictionary superclass) ifTrue: [^self
> inspectDictionary: anObject on: stream].
> 	list := anObject class allInstVarNames.
> 	dynamic := anObject dynamicInstanceVariables.
> 	size := list size + dynamic size.
> 	anObject class format > 0 ifTrue: [
> 		size := size + (anObject _basicSize min: 100).
> 	].
> 	size printOn: stream.
> 	stream lf.
> 	1 to: list size do: [:i | 
> 		stream nextPutAll: (list at: i); tab.
> 		self print: (self oopOf: (anObject instVarAt: i)) on: stream.
> 		stream lf.
> 	].
> 	1 to: dynamic size do: [:i | 
> 		stream nextPutAll: (dynamic at: i); tab.
> 		self print: (self oopOf: (anObject dynamicInstVarAt: (dynamic at: i))) on:
> stream.
> 		stream lf.
> 	].
> 	anObject class format > 0 ifTrue: [
> 		1 to: (anObject _basicSize min: 100) do: [:i | 
> 			i printOn: stream.
> 			stream tab.
> 			self print: (self oopOf: ([anObject _basicAt: i] on: Error do:[:err |
> anObject asOrderedCollection _basicAt: i])) on: stream. "BRUNO FIX"
> 			stream lf.
> 		].
> 	].
> 	(string := anObject printString) size > 5000 ifTrue: [string := (string
> copyFrom: 1 to: 5000) , '...'].
> 	string class == String ifFalse: [
> 		string := String withAll: (string collect: [:each | (32 <= each codePoint
> and: [each codePoint <= 127]) ifTrue: [each] ifFalse: [$?]]).
> 	].
> 	^stream 
> 		nextPutAll: string; 
> 		contents.
> 
> 
> 
> 
> --
> View this message in context: http://forum.world.st/Glass-Jade-Failure-when-Inpection-an-instance-of-IdentitySet-tp4781781p4782614.html
> Sent from the GLASS mailing list archive at Nabble.com.
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list