RTC Forums

Subscription => Support => Topic started by: DPerkins on February 04, 2021, 12:41:02 PM



Title: 64 Bit problem
Post by: DPerkins on February 04, 2021, 12:41:02 PM
Hello

Using v9.51, BCBv10.4.1, currently in the process of upgrading to BCB v10.4.1 (from BCB2007!).

If I compile a 32 bit version of my server module, the client applications can happily connect and download data.

If I compile a 64 bit version, the server module will happily start and start listening, but as soon as a client (32 bit) connects, the server module crashes in 'inflate_fast', which I assume is ZLib.  I've set RTC Compression = cFast.

When compiling RTC for BCB (using Delphi and selecting output all BCB files),  I just select '^4 Bit' and I'm assuming the project file will use the appropriate 64 bit versions of the zlib OBJ files.

Any suggestions on how to fix this?

Thanks.



Title: Re: 64 Bit problem
Post by: D.Tkalcec (RTC) on February 04, 2021, 12:52:49 PM
You should definitely BUILD all the source code files from the RTC SDK for the exact platform you are targeting (win32 != win64). Just re-compiling for a different target platform, or using files compiled for any other platform, can't work ... for the simple reason that RTC SDK uses compile defines to "decide" which data types to use and what parts of the code to compile.

Best Regards,
Danijel Tkalcec


Title: Re: 64 Bit problem
Post by: DPerkins on February 04, 2021, 12:59:08 PM
This is what I have done.  I have \32 and \64 folders under the rtc\lib dir.


Title: Re: 64 Bit problem
Post by: D.Tkalcec (RTC) on February 04, 2021, 01:10:32 PM
Try this ...

Open the "rtcDefs.inc" file in the "rtc\lib" folder and remove the dot (.) from this line ...

{.$DEFINE RTC_USEZLIB}

... so it looks like this ...

{$DEFINE RTC_USEZLIB}

.. then rebuild the RTC SDK and your Project.


Title: Re: 64 Bit problem
Post by: DPerkins on February 04, 2021, 03:23:28 PM
More info:

On my client application I have:

{$DEFINE COMPRESS}
{.$DEFINE RTC_USEZLIB}

On my server application I have:

{$DEFINE COMPRESS}
{.$DEFINE RTC_USEZLIB}

A 32 bit server works.
A 64 bit server crashes in inflate_fast

If I revert Compression to cNone on both server and client, then my 32-bit client is able to talk to my 64 bit server.

By removing the dot and using {$DEFINE RTC_USEZLIB} is that likely to make existing clients and a new server incompatible?




Title: Re: 64 Bit problem
Post by: D.Tkalcec (RTC) on February 04, 2021, 04:01:05 PM
I can't give you any guarantees, since I didn't write those compression and decompression algorithms myself, but ... I'd expect all of them to be compatible, because ... they should all be implementing "zlib". On the other hand, the only way to be sure is to try it out, so ...


Title: Re: 64 Bit problem
Post by: DPerkins on February 04, 2021, 04:26:00 PM
Yep, I came to that conclusion as well.  The good news is that switching on ZLIB works.

So I now have:

Client - 32 bit, built with BCB2007,  rtc v6.24 

   talking to:

Server - 64 bit, built with BCB 10.4.1, rtc v9.51 using ZLib

Thanks for your help.



Title: Re: 64 Bit problem
Post by: D.Tkalcec (RTC) on February 04, 2021, 04:27:34 PM
Great. Glad to be of help. And again ... thanks for your feedback.