From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Access violation (0xC0000005)

Hello all,

I have a vi that using a lot of Call Library function (same DLL file ) and when i close the vi then the following error is displayed sometimes. Any help? Thanks!

#OSName: Windows Embedded Standard Service Pack 1
#OSVers: 6.1
#OSBuild: 7601
#AppName: LabVIEW
#Version: 15.0 32-bit
#AppKind: FDS
#AppModDate: 6/17/2015 03:53 GMT
#LabVIEW Base Address: 0x00400000


InitExecSystem() call to GetCurrProcessNumProcessors() reports: 2 processors
InitExecSystem() call to GetNumProcessors() reports: 2 processors
InitExecSystem() will use: 2 processors
starting LabVIEW Execution System 2 Thread 0 , capacity: 24 at [3593488142.74428990, (15:09:02.744289875 2017:11:14)]
starting LabVIEW Execution System 2 Thread 1 , capacity: 24 at [3593488142.74428990, (15:09:02.744289875 2017:11:14)]
starting LabVIEW Execution System 2 Thread 2 , capacity: 24 at [3593488142.74428990, (15:09:02.744289875 2017:11:14)]
starting LabVIEW Execution System 2 Thread 3 , capacity: 24 at [3593488142.74428990, (15:09:02.744289875 2017:11:14)]

<DEBUG_OUTPUT>
2017/11/14 下午 03:13:06.000
Crash 0x00000000: Crash caught by NIER
File Unknown(0) : Crash 0x00000000: Crash caught by NIER
minidump id: 224fbd46-6bd8-4c07-b9c8-787f4107ff6d
ExceptionCode: 0xC0000005

</DEBUG_OUTPUT>
0x100011AB - nierInterface <unknown> + 0
0x10005E96 - nierInterface <unknown> + 0
0x1000621C - nierInterface <unknown> + 0
0x7C37FDB4 - MSVCR71 <unknown> + 0
0x77335BE7 - ntdll <unknown> + 0
0x772F98D5 - ntdll <unknown> + 0
0x00000000 - <unknown> <unknown> + 0

0 Kudos
Message 1 of 2
(2,521 Views)

Basically, one or more of your DLL calls corrupt memory. This could be a misconfiguration of the Call Library Node parameters, a bug in the DLL itself, but most likely you forgot to make sure to preallocated an output buffer that you pass one or more of your DLL functions which tries to write into it.

This is a typical LabVIEW programmer error since most LabVIEW programmers are not used to have to worry about preallocating buffers that a VI function might return. When calling C functions however you always have to make sure that any buffer that the function wants to write into (string, arrays) is actually properly preallocated to a size that the function documentation hopefully describes.

 

The crash dump when closing your software only tells you that something went wrong but not where it went wrong. So the bad news is that you need to go into all the Call Library Node VIs and check and recheck each of them to be fully correct and preallocate any buffer to the necessary size that the underlying DLL function needs.

Rolf Kalbermatter
My Blog
Message 2 of 2
(2,491 Views)