LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

InitCVIRTE generates error message "Unhandled exception in "MyApp.exe": 0xC0000005: Access violation reading location 0x00000000."

Hi,
I have converted a LabWindows CVI project to Visual Studio 2005. When I start the application i debug mode I get the message "Unhandled exception at 0x685662ba in EE352-500V.exe: 0xC0000005: Access violation reading location 0x00000000."
It comes when the application calls:  InitCVIRTE in this context:
 

int

__stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)

{

// Initialize LabWindows/CVI run-time library

if (InitCVIRTE (hInstance, 0, 0) == 0)

{

return -1; /* out of memory */

}

The debugger indicates that value of hInstance is 0x00400000 {unused=9460301} 

Can someone give me a solution to this problem. I have done some search on the Web without success.

Thanks!

 

0 Kudos
Message 1 of 6
(5,469 Views)
Hi rha,

Are you still having this problem? Can you convert any of our examples over and run them fine? What version of CVI are you using?

Best Regards,


Message Edited by Jonathan N on 11-09-2007 06:55 PM
Jonathan N.
National Instruments
0 Kudos
Message 2 of 6
(5,176 Views)

I think that exception might be coming from the data execution prevention service that is part of Win XP SP2.  The OS thinks that you're somehow trying to execute in the data segment and kills the process.  It's intended to catch worms and viruses.

You can turn this service off for non-Microsoft programs using the control panel.

Many pointer handling errors now report as this exception instead of as a memory violation exception.  That looks like a null pointer derefence to me.

Menchar

 



Message Edited by menchar on 11-09-2007 07:12 PM
0 Kudos
Message 3 of 6
(5,173 Views)

Hi all!
Thanks for your feedback. The problems has been solved!

 Best regards

rha

0 Kudos
Message 4 of 6
(5,150 Views)

Hello,

 

actually, i have the same problem, if i call in VS2010 the InitCVIRTE() function, the application crashes directly with the error message, you had posted above.

I'm using Windows 7, the VS 2010 with SP1 and the CVI 9.0.1 and the Vision (IMAQ) modules version 2009.


How have you solved the problem on your machine?

 

Thanks for fast reply,

christian

 

0 Kudos
Message 5 of 6
(4,283 Views)

I get this exception with a Labwindows/CVI2012 SP1 project that I imported into VS2010.  The debugger does not even step into the first executable state ment in the main function.

 

It always crashes in crtexe.c line 587 

 

I am on Win7 Professional.

 

First-chance exception at 0x686b93ea in ConvertedProCEED.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

0 Kudos
Message 6 of 6
(4,169 Views)