LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal Internal Error : "ThEvent.cpp", line 209

Hi,

 

Any help with the following AddRef()/Release() issue would be most appreciated: 

 

I'm a software developer working on a COM (ActiveX) object for use by e.g. C# (test ok) and LabVIEW clients.  The object supports events; however, when events are accessed with the "Register Event Callback" block, LabVIEW does not free the object when the VI is finished, and upon subsequently closing LabVIEW, I receive the following dialog:

 

Fatal Internal Error : "ThEvent.cpp", line 209

LabVIEW version 8.6

You will lose any unsaved work.  For assistance in resolving this problem, please relaunch LabVIEW, or contact National Instruments.

 

 and log:

 

####
#Date: Fri, Nov 14, 2008 12:44:58 PM
#OSName: Windows NT
#OSVers: 5.1
#AppName: LabVIEW
#Version: 8.6
#AppKind: FDS
#AppModDate: 06/26/2008 05:25 GMT

 

source\mgcore\ThEvent.cpp(209) : DAbort:
$Id: //labview/branches/Saturn/dev/source/mgcore/ThEvent.cpp#6 $
0x00B129F6 - LabVIEW <unknown> + 0
0x0040F5C0 - LabVIEW <unknown> + 0
0x7719C351 - OLEAUT32 <unknown> + 0
0x7712DB25 - OLEAUT32 <unknown> + 0
0x77EF658C - RPCRT4 <unknown> + 0
0x77EF4BF3 - RPCRT4 <unknown> + 0
0x7717E724 - OLEAUT32 <unknown> + 0
0x77600C31 - ole32 <unknown> + 0
0x77600BDB - ole32 <unknown> + 0
0x7750F237 - ole32 <unknown> + 0
0x7750F15C - ole32 <unknown> + 0
0x7750FC79 - ole32 <unknown> + 0
0x77600E3B - ole32 <unknown> + 0
0x776009BC - ole32 <unknown> + 0
0x77600DF2 - ole32 <unknown> + 0
0x7750FCB3 - ole32 <unknown> + 0
0x7750FAE9 - ole32 <unknown> + 0
0x7E418734 - USER32 <unknown> + 0
0x7E418816 - USER32 <unknown> + 0
0x7E4189CD - USER32 <unknown> + 0
0x7E4196C7 - USER32 <unknown> + 0
0x0041E852 - LabVIEW <unknown> + 0
0x0042AB32 - LabVIEW <unknown> + 0
0x00A27592 - LabVIEW <unknown> + 0
0x00A2DC60 - LabVIEW <unknown> + 0
0x00E3A5B9 - LabVIEW <unknown> + 0
0x008F0FF6 - LabVIEW <unknown> + 0
0x008F0CDA - LabVIEW <unknown> + 0
0x008F0EFB - LabVIEW <unknown> + 0
0x008F0F40 - LabVIEW <unknown> + 0
0x015AB20D - LabVIEW <unknown> + 0
0x7C816FD7 - kernel32 <unknown> + 0
0x00000000 - LabVIEW <unknown> + 0

0 Kudos
Message 1 of 9
(5,182 Views)

Chriscort-

 

                 .cpp errors are internal crashes. If you post an example VI that can run on any computer and steps to reproduce the error then I can pass it off to our R&D team for further analysis. There are a couple of line 209 CARs (corrective action request) already in work but I would need to see an example of the error to see if this pertains to one of them or if this is a new case. None of the error codes centering around this have any promising leads so far so I don't have any positive news on a fix for you. Post it up and I'll see what I can find for you. Thanks!!

0 Kudos
Message 2 of 9
(5,148 Views)

I've attached a minimal COM server (that starts a thread when events are requested) that shows the issue.  Steps to reproduce with LabVIEW 8.6 on Windows XP for x86 follow(stuff in parenthesis are comments):

 

(1) unzip HelloClass.zip to C:\ (4 files:  hello.vi, callback.vi, HelloClass.dll, Hello.tlb)
(2) C:\>regsvr32 helloclass.dll (should get "DLLRegisterServer in helloclass.dll suceeded." dialog)
(3) C:\>hello.vi (start LabVIEW)
(4) Ctrl+R (run the VI.  You should see "Command: test" in the String Indicator.  At this point the last call into the server is AddRef() but should be Release())
(5) Alt+F4 (close the VI)
(6) Alt+F4 (close LabVIEW)

 

You may need to perform steps 3-6 up to ~10 times, because at this point one of 3 behaviors randomly occurs:
(A)  Fatal Internal Error : "ThEvent.cpp", line 209
(B) Release() is finally called the same # of times as AddRef(), causing the destructor ~HelloClass to run (which kills the thread).  This should instead happen after step 4 (which it does if you remove the "Reg Event Callback" block)
(C) Release() is called several times, but not enough to decrement the reference count to 0

 

Behavior A doesn't occur if the server doesn't start the thread.  In source.zip, I've also attached the server's source code for your R&D team along with dbgMon, which is useful for looking at the _RPTF debug output.  Thanks much for your patience and for looking at this.

Download All
0 Kudos
Message 3 of 9
(5,133 Views)

chriscortopassi-

 

                     I have passed off all you information to our R&D team and they are working on it at the moment. Unfortunately .cpp (internal) errors normally just have to be fixed and then rolled into the next version of LabVIEW because it is a low-level bug. If they find a work around though, I will let you know. Thanks for the feedback and helping LabVIEW evolve a little more. Cheers!!

0 Kudos
Message 4 of 9
(5,120 Views)
Thanks.  When you find out, I'd appreciate it if you could post whether this is a bug in LabVIEW that will be fixed in the next release, or something I'm doing. 
0 Kudos
Message 5 of 9
(5,116 Views)
I'd also appreciate it if you could please let me know if you were able to reproduce.  Thanks again.
0 Kudos
Message 6 of 9
(5,107 Views)

Hi,

 

It's been over a month and I'd much appreciate it if NI could please just let me know if

 

(a) NI could reproduce

(b) whether NI plans to change something in a future LabVIEW release, or whether it's something I need to change

 

Thanks and happy holidays!

0 Kudos
Message 7 of 9
(4,985 Views)

Hello!

 

This was reported to R&D (# 130282) for further investigation.  Additionally, I was able to reproduce this error on the first try.  I will make sure to update the CAR.

Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
0 Kudos
Message 8 of 9
(4,966 Views)

Any update on this bug?  I just saw it today using LabVIEW 2010 (10.0f2).

And yes, I realize this is a 4 year old thread..  The fact it still exists may indicate that it was never fixed.

 

I got line 236.

 

0 Kudos
Message 9 of 9
(3,832 Views)