GemTalk / PharoGemStoneFFI

GemStone GCI access via Pharo FFI
MIT License
1 stars 4 forks source link

Result strings contain null byte #1

Closed kurtkilpela closed 3 years ago

kurtkilpela commented 3 years ago

The result of evaluating the example below contains 'Hello, World!' and an extra 'null' character as an additional byte at the end.

The result should not contain the extra null byte.

session executeStringNb: '''Hello, World!'''.
session blockAndFetchNbResult
kurtkilpela commented 3 years ago

In some instances, the string may contain other garbage bytes.

session executeStringNb: '''Connection Closed'''.
session blockAndFetchNbResult

Results in a Sting containing the following code points. 67 111 110 110 101 99 116 105 111 110 32 67 108 111 115 101 100 96 65 183 206 127 0

nrgiii commented 3 years ago

Fixed by f642e885bed07258a61a7bb4a9be8d9f33d8d2fa

kurtkilpela commented 3 years ago

The problem appears to remain. I end up five additional random characters when evaluating the following. I'm running against a private 3.7.0 build.

|sess|
sess := GsSession newForGsVersion:....
sess loginWithGsUser: 'DataCurator' password: 'swordfish'.
sess executeStringNb: '''Connection Closed'''. "Start the NB command"
sess blockAndFetchNbResult
nrgiii commented 3 years ago

Does not reproduce for me in my image. Are you sure your image is up to date?


|sess r|
sess := GsSession newForGsVersion: '3.7.0' threadSafe: true stone: 'norm' host: 'moop' netldi: '10117'.
sess loginWithGsUser: 'DataCurator' password: 'swordfish'.
sess executeStringNb: '''Connection Closed'''. "Start the NB command"
r := sess blockAndFetchNbResult.
sess logout.
^r last
$d
kurtkilpela commented 3 years ago

I built a new Pharo image using development image 1071. I loaded SparkleFFI commit 3a3ca0b. Using your stone + client libs in the fresh image resulted in the same error. Note, my client is Ubuntu 20.04 rather than Windows.

nrgiii commented 3 years ago

Fixed by 63c119c