LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exception: Access violation (0xC0000005) at EIP=0x7752D968 when tried to run the application in DV

Solved!
Go to solution

Hi,

I have a VI with subVIs using Call Library function node. I am using user32.dll in the application.

When I run the main VI in the development mode there are no error and everything works fine. But when I create the application and try to run it, application crashes and following error pops-up:

 

"Exception: Access violation (0xC0000005) at EIP=0x7752D968"

 

LV log attached

 

Download All
0 Kudos
Message 1 of 7
(18,573 Views)

This usually means there's something wrong with the executable access not the application code you programmed yourself. Are you running the executable by itself or are you distributing using an installer first?

 

YOu could try checking the Additional Exclusions part of your executable build and make sure everything is included (or not excluded).

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 7
(18,566 Views)

I had a problem like this once where when I built the application it would include a system DLL with the build.  I think the EXE didn't like running a system DLL out of a non-system directory.  I ended up checking the "specify path on diagram" box for the DLL call, and then excluding the DLL from the build.

 

The call then looked like this:

dll by path.png

Message 3 of 7
(18,554 Views)

Hi,

I am trying to run the application itself through the project explorer. I tried building the application first before distributing.

0 Kudos
Message 4 of 7
(18,548 Views)
Solution
Accepted by topic author Pankaj_K.

@Kyle97330 wrote:

I had a problem like this once where when I built the application it would include a system DLL with the build.  I think the EXE didn't like running a system DLL out of a non-system directory.  I ended up checking the "specify path on diagram" box for the DLL call, and then excluding the DLL from the build.

 

The call then looked like this:

dll by path.png


That's really a workaround and Rube Goldberg too.

 

The correct fix for this is to only specify user32.dll as library name and not the whole path into the system directory in the Call Library Node configuration dialog.

You can also simply specify a path constant on the diagram with only the DLL name itself similar to what you did but without the need to query the path for the system core libraries, But specifying the name only in the Library Name configuration is also enough.

 

When you only specify the DLL name without path, the LabVIEW application builder assumes that it is a system file and does NOT include it into the build directory. Copying any system file into your application directory is never a good idea since Windows gets then confused. Besides it is actually a license violation to copy system files around and distribute them.

Rolf Kalbermatter
My Blog
Message 5 of 7
(18,537 Views)

Hi Kyle,

I tried the method suggested. It seems to work but got another message in the lvlog.

the access violation still exists but with a different error log.

 

i can post the error log.. the statements in the lvlog are not making sense to me.. can anyone please elaborate ?

 

---------------------------------------

 

InitExecSystem() call to GetCurrProcessNumProcessors() reports: 8 processors
InitExecSystem() call to GetNumProcessors()            reports: 8 processors
InitExecSystem()                                      will use: 8 processors
VI_BROKEN (0): [VI "Set Window Z-Position.vi" (0x0787fe60)]
DSToExtFuncLinkRef::UnFlatten: refer is [VI "Set Window Z-Position.vi" (0x0787fe60)], refeeIndentity is [LinkIdentity "user32.dll:SetWindowPos:C" [ Main Application Instance]
VI_BROKEN (0): [VI "Set Window Z-Position.vi" (0x0787fe60)]
SetVIBad on vi [VI "Set Window Z-Position.vi" (0x0787fe60)]
VI_BROKEN (1): [VI "Set Window Z-Position.vi" (0x0787fe60)]
NotifyVIOfChangedLink

<DEBUG_OUTPUT>
12/4/2015 8:52:17.038 AM
Crash 0x00000000: Crash caught by NIER
File Unknown(0) : Crash 0x00000000: Crash caught by NIER
minidump id: 3a33a6dc-cd2b-4783-8165-5358eb5fe5d4
ExceptionCode: 0xC0000005

</DEBUG_OUTPUT>
0x100011AB - nierInterface <unknown> + 0
0x10005E86 - nierInterface <unknown> + 0
0x1000620C - nierInterface <unknown> + 0
0x7C37FDB4 - MSVCR71 <unknown> + 0
0x7756344F - ntdll <unknown> + 0
0x77529855 - ntdll <unknown> + 0
0x00000000 - <unknown> <unknown> + 0
*** Dumping Bread Crumb Stack ***
*** LabVIEW Base Address: 0x30000000 ***

 

----------------------------------------------------------------------------------------

Thanks,

Pankaj K.

0 Kudos
Message 6 of 7
(18,494 Views)

Hi roflk,

Thanks for the advice to include only the library name for windows files/libraries.

I found that in certain subVis the whole location was present and for some only the library name was present in the configuration.

I modified them all to use only the library name and not the whole path.

 

earlier the project created two user32.dll under dependencies and when looked for their callers one of them reference the whole path library and other only the name.

 

Modified as suggested and it worked. The access violation error did not come up and the application ran as required. Thank you all for the information and clarification.

 

but i would still be interested in what the LabVIEW log mentions..

 

Thanks!

0 Kudos
Message 7 of 7
(18,480 Views)