01-06-2006 04:22 PM
01-07-2006 02:30 AM
Hi Nancy,
I've seen the memory.cpp error under many different conditions and don't think there's a simple diagnosis. But given the scenario you've describe, I'd be tempted to use Tools\advanced\Profile VIs to monitor the memory used by the different VIs in your program - in the hopes of identifying a "memory-leak". I don't think "Profile" is available in the run-time environment, though.
luck/cheers
01-09-2006 12:20 PM
01-10-2006 12:10 AM
01-11-2006 01:38 PM
I want to thank those who have responded so far. I don't have an answer yet, but will try to provide you with more information so maybe we can get a little further in solving this problem.
Since the last post we have had the error occur one more time. So unfortunately I can't call it a one-off and assume it will never happen again. But, we have also had hours and hours of error free run-time also...
Dynamik had suggested using the Profile tool to monitor the memory by vi. I'm not exactly sure how to use this tool. I was able to turn the memory checkbox on, and then it listed info on all the vis (lots of vis here, when loading the application it loads over 500 vis). Do I have to then just select the "snapshot" button occasionally and see what has changed in memory usage? I guess figuring out how to make use of the data it is providing is confusing me. How do I tell which vis, if any, are causing memory problems without recording each one's information between snapshots? Any advice here would be appreciated.
Chris C asked for more information on the application and asked about type casting. He also mentioned using the memory meter.
We tried running the memory meter while running one lot of parts on the software (about 3 hours of work) and did not see any increasing memory usage. When we stopped the program we basically dropped down to our starting memory level. I will want to keep this memory monitor running when we do a longer run, as it may be a memory problem due to database access or something like that, which we won't see unless we run a lot more parts.
The application is to automatically run parts through 4 different tests. We are using plain old LabVIEW, not FieldPoint or real-time or anything like that. We are using the database toolkit, and the Vision toolkit. We communicate with a robot through a serial line (VISA) and have it move parts from test station to test station. The software is all under one main vi - we are not doing any dynamic calling of vis or anything. Each of the tests is started through setting a flag and the tests are running in parallel loops so they all can be run at the same time. We can have four different parts under test at the same time, one in each test station. When all of the tests are done the robot will move the parts on to the next test station and the finished parts back to the storage tray. One of the test stations is using doing a visual examination - using a motor (Newport motor controller using GPIB interface), camera and image processor, and analog data collection. One of the test stations is using a motor and analog data collection only. The third station is using only a GPIB interface to an oscilliscope. The fourth station is using analog inputs and a serial interface (also VISA) to a laser micrometer. So far the memory.cpp errors have come right around the time we get a timeout error communicating with this serial laser micrometer. I don't know if the serial error is the cause of the memory problem, or if the memory problem caused the serial error or if there is even any connection at all. We have communicated with the device many, many times without problem and the only times we have recorded an error communicating with it we have also had this memory.cpp line 638 error.
As far as type casting, the only place I see that we are doing type casting is when we call the IMAQ Cast Image routine (to convert from the acquired 8-bit image to a 16-bit image so I can add a number of images together and not go offscale) and when we use the database toolkit and get a record back and use the "database variant to data" vi to cast the data to the correct type. So the only type casting we are doing is by calling vis provided by NI.
Does this additional information help at all?
I have a further question for perfb. Where did you find out information about the line 638 error? When I did a search of the NI site I did not find any hits on my problem. I would like to read-up on any information anyone has on this. How have you been working around this problem?
Nancy Backes
01-12-2006 05:53 AM
Hi Nancy,
Your application sounds like more fun than what I'm working on! (except for the mem.cpp thing...) ![]()
Did a search of these forums for "line 638", and found among the "hits", a post by XU, which reproduces the same "line 638" symptom without any apparent reference to a DLL. Here's the link
http://forums.ni.com/ni/board/message?board.id=170&message.id=100477&requireLogin=False
01-12-2006 06:26 AM
01-12-2006 07:44 PM
Hi Neil,
Would like to look at your code - is it possible to create/attach a (simple) example? - (note: this [new] subject probably deserves its own thread. ![]()
cheers!
01-13-2006 03:31 AM
01-13-2006 05:50 AM - edited 01-13-2006 05:50 AM
Unfortunatly this is not as easy. While you seem not to crash near any of your DLL executions they very well can be the culprit.
@nrp wrote:
Hi there,
I have been getting very similar error messages in a rather large app of mine. I have traced the culprit to a single wire in my code, which (in theory) should not cause any problems.
In part of my app, I write some info to a graph, this is done by reading out of a text file, taking the arrays striaght to the graph indicator (plotting two data sets, not huge amounts of info, possibly several hundred thousand points). This reliably crashes my application after a few hours! (Have checked all memory usage, no leaks at all). If I remove this writing to graph wire from my code, the app runs for days with no problem.
Although I do have some custom DLL calls, the code in them does no memory management, and this crash does not occur any where near these DLL calls, so I would like to rule that out (also, the code does not crash if I remove this graph update, so that would also seem to indicate the DLL code is ok)
Message Edited by rolfk on 01-13-2006 12:51 PM