"stream error" in iOS11

Hi RO Guys,

I tested my project with the last iOS 11. Only in this O.S. i have the stream error when I call a remote method that return a complex type.

This problem is raised with the last beta and also with the last release of the RemObjects SDK.

The ROBinMessage has a ROAESEncryptionEnvelope associated

In attached the error and the call stack.

In this moment I use the last beta of RO SDK.

Any help is really appreciated!!

Thank you very much

iOS_RO_Exception

Looks like this error in std zlib library.
try to disable compression in BIN message. will it improve situation?

Hi EvgenyK yes I have tried to disable it in client side but the error stil happens. In this moment I cannot disable compression in server side because i need to update all Android and Windows applications

Can you try to disable compression on both sides (client-side and server-side)?

about compression: you can safely disable compression on server side only. another side will read it without any problems anyway.

as I see, standard System.Zlib.pas unit uses a lot of LongInt and LongWord types which have another dimensions for IOS.

from http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Simple_Types_(Delphi) :

Many thank’s EvgenyK.

After I will try to disable the compress in server side.

Have you any idea if this problem will resolved?

Thank you very much

as I can see at https://quality.embarcadero.com/issues/?jql=text%20~%20"zlib%20ios" , there is several issues related to zlib and ios so they may be fixed in next Delphi releases.

Many thank’s EvgenyK

but with the same delphi version and the same RO SDK version in iOS 10.x work fine
The problem occurs only in iOS 11. So it look like an iOS problem.

Hi EvgenyK

yes, I confirm that turning off the server-side compression option works fine.

I need to open a ticket to Embarcadero for solve this problem.

Thank you very much.

Hi Evengy, the issue is not related to System.ZLib but to uROZLib.
The definition of ZInternalCompressStream and ZInternalDecompressStream is wrong.
It should be:
procedure ZInternalCompressStream(var zstream: TZStreamRec; inStream, outStream: TStream);
procedure ZInternalDecompressStream(var zstream: TZStreamRec; inStream, outStream: TStream);

That is, you need to include the var modifier before the zstream parameter. If you don’t, the copy of the record may include some trash data between the aligned fields and this leads to the failure of the inflate procedure.

Once you modify the procedure definition everything works like a charm with the iOS 64 bit compiler.

Regards

Thanks, logged as bugs://80879

bugs://80879 got closed with status fixed.