02-11-2013 06:29 PM
I'm having crashes of Labview 2011 when using Imaq and vision. The Crash is not at a consistent place in the code, which makes it very difficult to trace. I've attached a zip which includes the screen shot of the message right before the crash: "Exception: Access Violation (0xC0000005)". The zip also contains the dumps from the crashes.
I've tried to trace the crash and it usually happens after camera initialization and a few reads. However, when I debug the whole things slows down and it will usually run many more times. Adding delays to the code doesn't seem to help either. I've also experienced a 2 executions so far where the program ran for a bit without crashing, but then in one case it froze on shutdown (abort button wouldn't work so I had to kill Labview with Task Manager) and in the other case it shut down gracefully, but then Labview crashed (same error) when I made a few changes to the block diagram. Again, because the crash doesn't give any useful information, and because it does not happen at a consistent place in the code, it is very difficult to trace.
This software runs flawlessly on several different cameras, but this crash happens every time with 1 specific lower resolution (80x60) camera. The problematic camera runs fine in MAX, and I also wrote a simple test routine to just display the image and that did not crash either. The camera file for the problematic 80x60 camera is attached, as is one that runs without the crashes. I had suspected something about the ROI routines, but after commenting those out, the crashes still happened. Screen shots of a few of the camera messages (startup, set ROI, and read camera) are attached. I also attached a screen shot of the VI hierarchy, in case this is a known issue for some of the VIs I'm using.
I am totally confounded here. There seems to be something about this camera that crashes Labview, even though MAX and a simple image viewer run fine. The crash doesn't provide any information as to what happened and it happens at varying places in the code, so it is very difficult to trace.
Does anyone have any suggestions or experiences here? I haven't seem too many hard crashes like this is Labview, so I'm on unfamiliar territory here.
02-11-2013 10:44 PM
Hi,
Some good details there but unfortunately those crash dumps don't look like they [directly] involve IMAQ or Vision libraries. They all seem to be in the same core memory allocation functions inside of LabVIEW when called via various UI elements in LabVIEW.
Some suggestions:
- Submit your error reports via the automated pop-up that prompts to send the error logs to NI. These get sent to the LabVIEW team and they analyze them.
- Open a support case with NI so that whatever issue you are having can get escalated though the appropriate channels. This type of issue might be too deep to address easily via the forums
- See if you can narrow down your crash to some particular [small] chunk of code. Try disabling different pieces and see what seems to be causing it. See if you can make a simple example that shows the same issue. You could try switching your camera file to the Test Image one and see if you can reproduce it with no real camera. If you could do this and provide NI support with some example code that reproduces it it would likely help a lot.
- See if you can try your code under LV 2012 (if possible)
Eric
02-15-2013 09:21 AM
Eric-
Thanks for the tips. We've got a ticket open with NI, but so far we haven't figure it out. We're going to try upgrading to LV2011 SP1 or LV2012, but we tried that before and it didn't help, so I don't have a lot of hope for that avenue.
We did discover something interesting though: The software runs great for all cameras with an image of 300 x 200 or larger. Once the image is smaller than 300 x 200 for any camera, then Labview crashes. The problematic camera is a small pixel camera, so it's always in this range.
Could there be something fundamentally different about the way Labview handles different images sizes? It seems that larger images are fine and smaller images cause a very difficult to track access violation exception crash.
Thanks,
Casey
02-15-2013 10:13 AM
Hi Casey,
There isn't really anything different between how images of different sizes are handled. I suggest trying to divide up your app and see if you can narrow down what is causing it to crash. If you can isolate it and provide a small example that can reproduce it we can likely get to the root cause. Alternately you could provide your current full code (either via the forum or privately via your support request) to allow us to try to reproduce it...
Eric