Page 1 of 1

Bin2Var / Var2Bin IDSC

Posted: Thu Sep 10, 2015 10:16 am
by bwolfsohn
We've been chasing this problem for a couple of days now.. I thought i'd throw it out there to see if anyone has any suggestions...

We are getting this error from our xb2net server: (the error is occurring in the xb2net server)

Error Base/5
Internal Data Structures Corrupted bin2var

then various called from lines within our software.

It is crashing on this line on the server side:
oRecord := Bin2Var(oSOAPReq:GetVar('RecordObject'))

This same code is working in our previous versions.
it works intermittently in the beta of our next release.

The same xb2net server responds correctly when we use last year's version (same function, same code)
we've tried the 2 different versions of the xb2net libraries on both the server and client sides. Both have the same results... i.e. works with last year's app, doesn't work with this year's (client) app..

the client side created the var: (same code in both versions)

oRecord := profile->(DC_DbRecord():new())
profile->(DC_DbScatter_trim(oRecord))
oAgent:SetVar("RecordObject", Var2Bin(oRecord) )

Both client and server are using xbase++1.9SL1

we had the same results with this year's version (client side) running under xbase++ 2.0
Any suggestions ??

Re: Bin2Var / Var2Bin IDSC

Posted: Thu Sep 10, 2015 5:47 pm
by bwolfsohn
I think i have the culprit..

Roger made a lot of changes to dc_dbrecord() between version 258 and 261. when i put the 258 version of dc_dbrecord() into our app, everything works...

the 261 version crashes...

Roger,


I'll go over this with you when you get back...

Re: Bin2Var / Var2Bin IDSC

Posted: Fri Sep 11, 2015 4:50 am
by rdonnay
I think it must be related to the fact that i have added methods to dc_dbrecord. I will have to think about this.

Re: Bin2Var / Var2Bin IDSC

Posted: Fri Sep 11, 2015 6:50 am
by bwolfsohn
rdonnay wrote:I think it must be related to the fact that i have added methods to dc_dbrecord. I will have to think about this.
var2bin creates 2 different size results from the old and new dbrecord..


oRecord := profile->(DC_DbRecord():new())
profile->(DC_DbScatter_trim(oRecord))
oAgent:SetVar("RecordObject", Var2Bin(oRecord) )

xData:=oAgent:GetVar('RecordObject')
xbSaveToFile(xData, "server" + ltrim(str(seconds())) + ".txt", .f.)