Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Read File error -1074396159

Hi NI,

I am getting "IMAQ Read File" error -1074396159 when trying to read a large image.  I get this error when trying to read a ~400MB image on a very clean (not many extraneous applications) Windows 7 computer with 4GB or RAM.  I tried this on two other not very clean Windows 7 computers with 4GB of RAM and 2GB of RAM respectively.  On the latter two computers I do not get this error.  I found this knowledgebase which explains one possible cause of this error.  Are there any other causes for this error?  Are there any workarounds?

 

Thanks,

Jonathan-LV

0 Kudos
Message 1 of 7
(3,970 Views)

Try to use Windows 7 x64. LabVIEW and VDM are also available for 64 bit operation system.

 

0 Kudos
Message 2 of 7
(3,967 Views)

Thanks for the post Andrey, however we have to be able to run on a 32 bit OS.

 

Thanks,

Jonathan-LV

0 Kudos
Message 3 of 7
(3,959 Views)

That KB is incorrect, as the memory only needs to be virtually contiguous inside the process address space, not physically contiguous in RAM. This is not affected by how many programs are loaded (with the very slight exception that some read-only pages of DLLs can be shared cross-process in certain cases). This is really a function of how fragmented the memory space is in the process itself. The problem is that a normal 32-bit app on 32-bit Windows only has 2GB of virtual memory space. 500MB is 25% of the entire space. DLLs tend to get loaded scattered throughout the memory space for various reasons and other memory allocations that have different lifetimes cause fragmentation. The number of multi-hundred-MB chunks available is very small in a large app like LabVIEW.

 

Some options to help:

-Moving to a 64-bit OS (still using 32-bit LabVIEW) will change that 2GB address space to 4GB with no changes to your app

-Moving to both a 64-bit OS plus 64-bit LabVIEW will change that 4GB address space to 8TB (virtually unlimited)

 

Eric

Message 4 of 7
(3,955 Views)

Hi Eric,

Very nice post.  Thanks for the thorough explanation. 

 

Do you (or anyone else) know if this error is always indicative of not enough virtually continuous memory inside the process address space?  Is there anything else that can be causing this?

 

Thanks,

Jonathan-LV

0 Kudos
Message 5 of 7
(3,938 Views)

Jonathan-LV wrote:

Do you (or anyone else) know if this error is always indicative of not enough virtually continuous memory inside the process address space?  Is there anything else that can be causing this?


There is virtually nothing else that can generate this error besides an out-of-memory condition being returned from the OS from a memory allocation. The fact that you are getting this from a function that obviously allocates memory for an image and the size is so large means I have no doubt that this is the case.

 

You could play with a tool like VMMap (http://technet.microsoft.com/en-us/sysinternals/dd535533) to visualize the memory space for your process and confirm this via that mechanism.

 

Eric

0 Kudos
Message 6 of 7
(3,933 Views)

Thanks for your post Eric.  You have been very helpful.

 

Jonathan-LV

0 Kudos
Message 7 of 7
(3,914 Views)