EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Secureblackbox or Delphi 2009 bug

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#9894
Posted: 05/03/2009 15:45:45
by Jacques Bersier (Standard support level)
Joined: 09/30/2008
Posts: 2

Hi,

I'm using TElSimpleSSHClient component within a DLL on Vista. This DLL is dynamically loaded from a multi-threaded application. When running the app in Windows, everything works fine. But if I try to debug it in Delphi 2009, the IDE hangs after unloading the DLL. Debug works fine in the following situations:

- If I load TElSimpleSSHClient in the main code instead of a DLL.
- If I load it in the DLL, but without using multi-thread.
- If I return from the DLL without loading TElSimpleSSHClient.
- If I debug the project with Delphi 2007.

So the only case that doesn't work is Delphi 2009, multi-thread and component in the DLL. Could you first confirm that TElSimpleSSHClient is supposed to work in this situation? If yes, do you have any suggestion I may try? Should the problem come from the changes in D2009?

It's also important to note that although the app is multi-threaded, it only opens one SSH connection at a time. So the DLL is never loaded twice into memory.

Thanks in advance for the help
#9895
Posted: 05/04/2009 00:17:57
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

Delphi IDE is quite unfair when multi-threaded application is debugged. There are many posts in the Internet referencing similar problems for all versions of Delphi from 5 to 2009. The issue seems to be caused by a kind of bug in Delphi IDE or debugger.

Answering to your question: yes, the components actually should work in such environment as designed. BTW, please note that you should explicitly call SBUtils.CleanupRegisteredGlobalObjects() function when DLL is unloaded if the components are created and used in it to prevent memory leakage.

Can you please check, whether the hangup occurs if the DLL is only loaded and unloaded (and no components are created in it)?
#9896
Posted: 05/04/2009 01:44:42
by Jacques Bersier (Standard support level)
Joined: 09/30/2008
Posts: 2

Yes, everything works fine if I just load and unload the DLL without creating the component. It works fine too if I had the function CleanupRegisteredGlobalObjects before unloading the DLL. Didn't know about that function and didn't found it in the help. Thanks for your prompt reply and help.

Reply

Statistics

Topic viewed 1728 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!