RTC Forums
March 28, 2024, 02:58:19 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: 64 Bit problem  (Read 3463 times)
DPerkins
RTC License
***
Posts: 37


« 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.

Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 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
Logged
DPerkins
RTC License
***
Posts: 37


« Reply #2 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.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 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.
Logged
DPerkins
RTC License
***
Posts: 37


« Reply #4 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?


Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #5 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 ...
Logged
DPerkins
RTC License
***
Posts: 37


« Reply #6 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.

Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #7 on: February 04, 2021, 04:27:34 PM »

Great. Glad to be of help. And again ... thanks for your feedback.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.024 seconds with 16 queries.