06-27-2016 07:56 AM
Labview Crash Report :
Exception: Access violation (0xC0000005) at EIP=0x0000000141924FCB
Version: 14.0.1f3 (64-bit)
Easy to reproduce with LabVIEW 2014 64bits, Windows 7 :
1) Create one or more IMAQ Images (no matter image type or size)
2) Create then delete one or more images
3) Create more than 255 new images.
4) Try to convert first created in 1) into variant
5) Crash
I joined crash report and VI to reproduce.
06-27-2016 08:35 AM
@amounier wrote:Labview Crash Report :
Exception: Access violation (0xC0000005) at EIP=0x0000000141924FCB
Version: 14.0.1f3 (64-bit)
Easy to reproduce with LabVIEW 2014 64bits, Windows 7 :
1) Create one or more IMAQ Images (no matter image type or size)
2) Create then delete one or more images
3) Create more than 255 new images.
4) Try to convert first created in 1) into variant
5) Crash
I joined crash report and VI to reproduce.
Not sure about the reason, But Try to Swap the values of Build Array Before Closing IMAQ ref.
I tried and crash didnt happened during Swap
06-27-2016 10:17 AM
Sorry I didn't explain the context.
For my application I need to acquire, process, display a lot of images (more than 255) from different cameras.
I need to allocate/deallocate some images during initi/uninit, and others between acquisitions to resize buffers.
I just used variants to pass data into more generic functions, so I solved crash problem using directly IMAQ images for the moment.
For me there is clearly a bug that's why I report this simple VI. I just hope the problem is only located into variant conversion and IMAQ data is not corrupted...
06-27-2016 12:57 PM
@amounier wrote:I just used variants to pass data into more generic functions, so I solved crash problem using directly IMAQ images for the moment.
You have, in fact, solved the problem. An IMAQ "image" is not really an "image" (that is, something that has a certain number of pixels of a certain type), but is more akin to a "pointer to memory" where images are stored. As such, it doesn't make logical sense to try to turn them into variants, which probably explains the crash when you do so.
If you are passing an IMAQ Image into a processing routine, you can use IMAQ functions to find out whatever you need to know about the particular Image being carried by this wire, and adjust your processing code accordingly.
Bob Schor
06-28-2016 03:00 AM
Sorry Bob but I can't really aggree. I have, in fact, around the problem.
Variant data purpose is to convert "any" LabVIEW data type into more generic. A pointer or an IMAQ image are not exception.
In my exemple I show that fonctionality is working for 1 image, but if you create then delete Elsewhere in the program 256 images, function doesn't work any more. I conclude there's just a LabVIEW memory management problem, in IMAQ or variants data.
07-18-2016 07:24 AM
I found another way to crash LabVIEW in similar conditions : update value of IMAQ control by reference.
Again it's working fine with 255 images, and crash with 256.
I updated the VI with new crash demo (save your work before using it).
07-18-2016 07:57 AM - edited 07-18-2016 07:59 AM
First of all I dont find any reason of using VARIANT.
Second....(lets keep it in the code)..you might find the answer in the code itself.
Please let me know this crashes or not..!
07-18-2016 08:06 AM
Thx for your answer (even if I feel a little assaulted), but I can't open your VI. Can you save it for lv2014 ?
07-18-2016 08:19 AM - edited 07-18-2016 08:19 AM
For a while I also thought of whats going on.!!
07-18-2016 08:44 AM
Nice ! It doesn't crash with IMAQ dispose "All Images" option.
I still don't understand why it's working with 254 images and not with 256.
Hypothesis : Maybe without the option and with a lot of images, LV doesn't trace well images already unallocated, then at software closure attemps to unallocate again... and crash.
Using this option at the end of the main programm seems a good way to ignore the memory probem.
Thx your comment was usefull.