ronaldosantana
ronaldosantana

Reputation: 5252

Delphi project - debug x release version - problem with Indy library

We have port an application from Delphi 7 to Delphi 2007 - and the communication between server and client from Indy 9 to Indy 10.

The part that checks the username and password is now giving some really weird results: If I'm on my Virtual Machine (development environment) with Delphi 2007, I can login into the server application no problem.

If I generate the executables and try to run it outside the virtual machine, I get a wrong password. The code that checks for the password reads the data using a TIdTCPConnection.ReadString - for Delphi 7 and a TidTCPConnection.Socket.ReadString on Delphi 2007.

I was guessing this was related, somehow, with the extra parameters on Delphi 2007 version for the ReadString method but then, why I can login when I run the application in Debug mode - either running the server in Debug or the client in Debug but not able to connect outside my Delphi 2007 environment.

Is there any DLL or other file that I am missing here?

Any help, even pointing the right direction, is much appreciated - we are stucked on it since yesterday.

EDITED - EDITED - EDITED - EDITED - EDITED - EDITED:

I have changed the title for this question, and have isolated the problem that is only happening with the release version of the application. With a debug version, including TD32, debug info, local symbols, debug DCU, etc, the problem just not happen.

The machine where I'm testing the release and debug version only have Delphi 7 installed. The one generating the executables, with Finalbuilder, have Delphi 7 and Delphi 2007 (the compiler version being used).

I have another virtual machine, that I use to develop Delphi 2007 projects - anything generated on this machine - debug version, works fine as well - but release version - without debug information, will have the same password problem.

Upvotes: 1

Views: 636

Answers (2)

Remy Lebeau
Remy Lebeau

Reputation: 595732

This is really hard to diagnose without seeing your actual code and data. Most likely, when you made the switch from Indy 9 to 10, your Indy 10 code is not actually using the correct functionality that is equivilent to your Indy 9 code. Please provide more details.

Upvotes: 0

Alan Clark
Alan Clark

Reputation: 2079

You could try using OutputDebugString or logging the password to a file on the server side, to ensure it is receiving it correctly.

Also, are you using the latest version of Indy? There may be fixes pertaining to string handling.

Upvotes: 0

Related Questions