06-10-2009 10:24 PM
I am running a TestStand sequence, using the .NET adaptor I am creating a class, and calling methods of a Class Library I created in VB.NET. I tested my class library in VB.NET and everything works in that environment. The sequence I call is pretty simple,
The first pass of the sequence, it runs, the second pass of the sequence, whether in a For loop or the entire TestStand Sequence started again, it initializes the camera, but the second sequence, TestStand reports a system.out of memory exception in an underlying assembly/dll of my dll. But, when I call my dll from a .exe I made to test my dll, it works fine.
Thanks
06-11-2009 05:18 PM
Hi mobiux,
In the exe you made, are you executing the assembly multiple times in the same execution? It seems like the problem may be relating to the fact that you are opening references to the camera without closing them, then attempting to initialize again. When running the assembly in TestStand, the camera references will not be closed unless your code does so specifically, so make sure that a close step is implemented in your dll. Let me know if there is anything else I can do to help!
06-12-2009 11:55 AM
Thanks for you reply.
I am calling the setup and initialization of the camera once; it is the calling the method that runs a sequence of tests that I am repeating calls to and subsequently failing on the second call. The interesting thing is if I close out of TestStand completely after the first run. Then run my TestStand sequence again, it reportsd the same error. It seems something is not being released, or cleared, or something. Keep in mind, I am only getting this with TestStand, I do not get it when I run a test .exe that calls my dll. I since have tested calling my .exe in TestStand that calls my DLL and that works. The problem is clearly in using TestStand to create the class and call the methods.
Thanks
06-15-2009 10:42 AM
Are any of your objects disposable or required to be cleaned up before things can run again? You might want to check if the objects you are using support IDispose and if so call Dispose() on them when you are done with them. Also what version of TestStand are you using. Also if you can reproduce this in a simple case please post the code here.
Hope this helps,
-Doug
06-15-2009 11:41 AM
06-17-2009 03:26 PM
06-17-2009 03:43 PM
The reason is doesn't work in TestStand is because when you combine the allocations you make with those that TestStand makes (which includes loading every system DLL TestStand depends on), you run out free address ranges that are large enough for your buffers. There is not much to do about that. You could try using one of the example User Interface applications instead of the sequence editor. If you are willing to go minimalist, use the CVI or MFC simple UI examples. Even those could be paired down by cutting out the Report control so the IE doesn't get loaded into your process. You could also make sure you aren't enabling database logging, since that will probably load quite a few extra dlls.
06-17-2009 03:50 PM
...also, I'm not sure what you are waiting to hear from the provider of your assembly about using the /3gb switch. According to the MS documentation, you setup that switch on your machine and then you use their editbin utility to make sure that the IMAGE_FILE_LARGE_ADDRESS_AWARE bit is set in the executable file you run, which would probably be the sequence editor or whichever UI you use.
06-17-2009 04:11 PM
In the documentation on the Memory Tuning, it said that some manufacturers preconfigure to use the Memory tuning, they were going to see if they are or not. I will try using the stripped down UI, and the Editbin.util.to modify the header. Thanks again, very much appreciated, will keep you posted.
06-17-2009 04:45 PM