LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows error message "The memory could not be "read" " upon exiting an application

Hi all,

 

I get a Windows error message saying: "The instruction at "0x6d8da930" referenced memory at "0x6d8da930". The memory could not be "read". Click on OK to terminate the program" when I exit my application.

The last part of the code looks like this:

 

......

 

    MessagePopup( "", "main() - calling return 0..." );
    return 0;
}//end of main()

 

The application is running fine, I get the messagebox "calling return", I click OK, and then I get the above mentioned error message.

Now the strangest part...

I only get this message on the PC where I want my application's release version to run, not on my development PC. I also tried the release version on the dev. PC, no errors.

 

I use DAQmx in my application, and I'm pretty sure that all memory cleanup is done properly. I traced cleanup functions (like DAQmxStopTask(), DAQmxClearTask(), DiscardPanel() and so on) and everything seems to be fine.

 

Softwares used:

LabWindows/CVI ver. 8.0.0

DAQmx ver. 8.8

Windows XP Embedded

 

Any ideas?

 

 

Boti

0 Kudos
Message 1 of 12
(6,401 Views)

I've encountered the exact same message (to the value of the address). The occurence of the message is not systematic. I hope to make some progress using DrWatson (configured to dump ) + generate map file under cvi + disassembler + MS debugging tools.

 

 

Regards.

Nicolas

0 Kudos
Message 2 of 12
(6,392 Views)

The error fired this morning. Sadly, drwatson didn't intercept anything.

Sorry...

Nicolas

0 Kudos
Message 3 of 12
(6,360 Views)

jboti,

 

Do both computers you have tried running this on  have the same service pack of the same version of windows? Also is the CVI runtime and DAQmx version installed the same on both computers? Unfortunately windows errors like this don't tell us a whole lot, so lets try and focus on why it would work on one computer but not on another. Can you try taking a DAQmx example from C:\Documents and Settings\All Users\Documents\National Instruments and adding a message popup, and putting it on the deployment PC?

Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
0 Kudos
Message 4 of 12
(6,344 Views)

Hello Richard,

 

The only difference between the two PCs is that the deployment PC is an Advantech PanelPC with WindowsXP Embedded, while the development PC is a laptop with WindowsXP Proffesional. Both CVI runtime and DAQmx is the same on both. I will also try to get some help on WindowsXP Embedded and on Advantech forums.

I've tried test applications, and othersmall programs, no problem with those.

By the way, it's not the messagebox that causes the problem, I just placed that to trace the point where I get the error message...

 

Thanks for your reply

Boti

0 Kudos
Message 5 of 12
(6,337 Views)

I traced my problem to be stdio window related.

According to my investigation, the  problem appears when we use a stdio window in a program compiled with CVI 9.0.1 running on a run time engine 9.0.0.

(installing CVI RTE 9.0.1 on the deployement machine solved the problem)

 

I hope this helps.

Nicolas

Message Edité par NicoLeach le 05-12-2009 02:12 PM
Message Edité par NicoLeach le 05-12-2009 02:12 PM
0 Kudos
Message 6 of 12
(6,290 Views)

Hello Nicolas,

 

Thank you for your reply.

I'm glad you've found a solution, but unfortunately that doesn't help me. I don't use stdio window, and I have CVI RTE 8.0.0 installed on both the development and the deplyment machine.

 

Boti

0 Kudos
Message 7 of 12
(6,283 Views)

jboti,

 

Have you had any luck on the WindowsXP Embedded and on Advantech forums, if you're doing intensive applications, are the computer specs roughly the same? Also do you see this problem every time you run this one function, or is the problem intermittent?
Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
0 Kudos
Message 8 of 12
(6,258 Views)

Hello Richard,

 

No luck yet.

So far I'm only having one project where my software is running, on the mentioned Advantech PanelPC.

Yes, I see this problem each and every time I exit my application.

 

Boti

0 Kudos
Message 9 of 12
(6,245 Views)

I got the same problem with an LabView application built with 8.6.1 but not with 8.5.  The exe works very well until the EXIT-function. Other selfmade applications doesn't have this.

I use only the database connectivity functions in all apps.

 

Any idea?

 

Andreas

0 Kudos
Message 10 of 12
(5,916 Views)