03-15-2011 11:57 AM
We have a dll file which is used to control a MPLAB Real Ice programmer in a test sequence. This dll uses a lot of memory, but we dont have the source-code, so we cannot modify it.
Our only option right now is to have TestStand release the dll - and the memory - after the test is done.
But it does not seem to work. Even after the test has been stoppet and "unload all modules" has been executed, the memory is not released until we shut down TestStand completly.
Does someone here have any tips regarding the use - and release - of dll's (the dll is written in C++) ?
03-16-2011 02:13 AM
Are you using the Unload options for the Step?
What TestStand version are you using?
03-16-2011 02:32 AM
I am using TestStand 4.2.0
I have tried to unload after step executes, but it makes no differens.
03-16-2011 09:39 AM
The DLL could be forcing itself to remain loaded with unbalanced LoadLibrary calls. You might try dynamically loading and unloading it from a simple c/c++ program to verify whether it unloads correctly.
03-16-2011 02:31 PM
The dll might be getting unloaded, but the memory might still not be getting freed. It depends on the implementation of the dll. There might be a function in the dll to free the memory that you should be calling.
Hope this helps,
-Doug
03-17-2011 02:36 AM
If you are still suspecting that the Teststand is responsible for not releasing the DLL memory, put a Statement Step at the End of the Sequence and use this expression "RunState.Engine.UnloadAllModules" (just for testing). It will force all the modules to Unload eventhough what ever option may set in the Step Settings or Sequence File Settings.
If the DLL is still catching up the memory, then you have to check the DLL.
AshwiN,
03-17-2011 03:41 AM
Hi guys and thanks for your replies!
We have found out that the DLL we use calls several other DLLs, one of which calls a COM object. We think the COM object causes the problem as most of the DLLs seem to unload as they should.
Our solution is to drop the current programmer and buy one that is better prepared for industrial use.
01-13-2012 02:30 AM
Hi Winther,
I'm trying to do the same thing : program and read a PIC for industrial production. I planned to use MPLAB ICD3 debugger, but with what I see on the internet I may try to find another software suite.
Did you continue to use MPLAB for your test needs or did you find another software program better for industrial use ? Could you advise me another software ?
Thanks a lot !
01-13-2012 02:51 AM
Hi zy17.
We have switched to the ICP2 programer from Softlog Systems, and it seems to do the job well.
I have not communicated with them myself, but from what I hear from one of my collages they have good support for their products.