1
votes

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.

2
I suggest you elaborate on I get a wrong password . Is it different from what you send? how is it different?jachguate
The routine tries to compare the password sent from the client to the server - it does some fancy stuff as generating a random string, mixing and then comparing - but I isolated the problem on the password reading - its a different value... I'm following Alan recommendation to see how it goes...ronaldosantana
How do I change the question to what you are suggesting?ronaldosantana
In release you can log the password you're sending and the password you're receiving to a plain text files. I suggest you show us what you sent and what you got.jachguate
I have isolate the problem further more. For memory management we use FastMM - not the bundled version, but the latest one. Whenever the FullDebug directive is set to false, the problem happens.ronaldosantana

2 Answers

0
votes

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.

0
votes

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.