Delphi Tokyo, RO/DA version 9.4.109.1377
Hi guys,
I’m getting from time to time the following error on Delphi clients calling a method on Delphi Servers.
An exception was raised on the server: Stream read error: Invalid string length "2049".
: Exception EROUnregisteredServerException: An exception was raised on the server: Stream read error: Invalid string length "2049"
The function returns a TWideStringList which is declared as
TWideStringList = class(TROArray)
Which is basically an array of WideStrings as defined on the Service builder. It doesnt happen all the time, probably around 8 times a day out of a couple of thousand.
I see the call reaching the server and being executed and the values being returned but i think that on preparing the message back something goes wrong and crashes with the message above.
The length of the string may vary, so sometimes im getting
An exception was raised on the server: Stream read error: Invalid string length “1698914136”.
: Exception EROUnregisteredServerException: An exception was raised on the server: Stream read error: Invalid string length “1698914136”
But the number looks too big so it might be some buffer overrun of some sort.
Or
An exception was raised on the server: Unexpected end of stream.
: Exception EROUnregisteredServerException: An exception was raised on the server: Unexpected end of stream.
Just for the record and to see if it ticks someones imagination… this is the method.
function GetAllSessionsByRoutingList(const anEventSinkId: UnicodeString; const aRoutingList: GX_Common_Library_intf.TRoutingList): GX_Common_Library_intf.TWideStringList;
I’m using factory instantiation on RO, so I dont see a threading problem unless the guy doing the serialization back is not thread safe, or it is doing it from a “main” thread.
Any ideas, more than welcome. Thank you.