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.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

what is causing the error : common language runtime debugging services, application has generated an exception that could not be handled?

hello-
i am using a .net MonthCalendar control in one of my subVIs. when i try to probe in the VI that contains the .net control, i get an error titled: labview. exe common language runtime debugging services that says "application has generated an exception that could not be handled. process id=0xaac (2732), thread id-0xfdc (4060). click ok to terminate application, click cancel to debug application." then labview quits.
what is the reason for this error and how can it be prevented?
thanks!
0 Kudos
Message 1 of 5
(13,652 Views)
I'm having a similar problem. My TestStand sequence calls LabVIEW VIs, and LabVIEW VIs invoke methods in a .NET assembly  which was written using managed C++. The sequence runs OK, but when I close the sequence, I got an error message box popped up saying "Application has generated an exception that could not be handled". Anybody has experience in fixing such kind of error? Thanks a lot.

MB
0 Kudos
Message 2 of 5
(11,616 Views)

NewKat,

This is a very generic error message. Here's some question to get a more clear picture:

1) Does the VI run properly if you do not put any probe (breakpoint I assume)

2) Can you post a sample VI that demonstrate this problem? If so, at what step exactly does the exception get thrown?

3) Did you develop this VI on this computer or it was brought over from another computer?

3) What version of LabVIEW are you using?

Regards,

Song D

Regards,

Song Du
Systems Software
National Instruments R&D
0 Kudos
Message 3 of 5
(11,581 Views)
I've found how the error can be produced in my case:

1) TestStand steps call LabVIEW VIs.
2) LabVIEW VIs invoke methods in .NET assembly written in managed C++.
3) Methods in the assmbly create GC object and return it to LabVIEW.
4) There are two steps in my sequence that call the same VI.
5) Run the sequence and then close the sequence or just close the operator interface or TestStand sequence editor, the error message box pops up.

Then I duplicate the VI that was called by two steps so that now each step calls a different VI. Run the sequence and then close the sequence or the operator interface, there is no error message box any more.

It might be that LabVIEW does not handle GC objects properly. The LabVIEW version I'm using is 7.1.
0 Kudos
Message 4 of 5
(11,421 Views)

maplebird,

Could you post a simple example that demonstrate this behavior?

Regards,

Song Du
Systems Software
National Instruments R&D
0 Kudos
Message 5 of 5
(11,400 Views)