Bug 42002

GemStone/S 64 Bit

3.1.0.1, 3.1, 3.0.1, 3.0

All

3.1.0.2, 3.1.0.1

GciInterface >> [nb]remotePerform:selector:args: fail with OOPs of non-specials

The methods GciInterface #remotePerform:selector:args: and #nbRemotePerform:select:args fail when one or more of the arguments are the oop to a non-special object.

In versions 3.1 and 3.1.0.1, #remotePerform:selector:args: has been fixed, but the problem reamins in #nbRemotePerform:selector:args:.

Workaround

The following method will construct a String and perform that, producing the equivalent results.

! Bug 42002 Work-around: new GciInterface method:
!
! #remotePerform:selector:args:nb:
!
! with additional argument nb: useNonBlocking.
!
! This code constructs an equivalent string and then uses
! #remoteExecute/#nbRemoteExecute to by-pass bug 42002 present
! in calls to #remotePerform:selector:args/#nbRemotePerform:selector:args
!
category: 'Primitives'
method: GciInterface
remotePerform: remoteOop selector: selector args: args nb: useNonBlocking

| str |
str := String new.
str add: '| args | args := Array new. '.
1 to: args size by: 2 do: [:i |
  (args at: (i + 1))
     ifTrue: [
       str add: 'args add: (Object _objectForOop: '.
       str add: ((args at: i) asString).
       str add: '). ' ]
     ifFalse: [
       str add: 'args add: '.
       str add: ((args at: i) asString).
       str add: '. ' ]].

str add: '^ (Object _objectForOop: '.
str add: remoteOop asString.
str add: ') perform: '.
str add: selector printString.
str add: ' withArguments: args'.
useNonBlocking
  ifTrue: [ ^ self nbRemoteExecute: str ]
  ifFalse: [ ^ self remoteExecute: str ]
%


Last updated: 11/8/12