LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Crashes while using Native NI XML Parser with Exception 0xc0000005

Hi Everyone,

 

I am using NI XML parser to parse an XML file. But LabVIEW crashes with the Exception 0xc0000005. Crash occurs in Get All Matched Nodes.vi or Get First Matched Node.vi present in the NI_XML.lvlib(vi.lib\xml\XPath\Get All Matched Nodes.vi). These two VIs call the dll DOMUserDefRef.

 

When I tried to understand this problem more, I found out the possible reasons for causing the exception while calling a dll from NI site here. The point 2 of the solutions in the above link says that we must wire all inputs and outputs of a Call Library Function Node or else the DLL function will overwrite unallocated memory and will cause LabVIEW to crash.

 

When I went through the implementations of Get All Matched Nodes.vi and Get First Matched Node.vi I found out that the last two pointer inputs to the call library function node are not wired. Maybe this causes the LabVIEW crash??

                             

                  Monisha26_2-1580453194431.png

 

Can anyone confirm this? If so, I would like to understand why those inputs are not exposed to the user/left unwired?

Please let me know if anyone has come across this issue / has some fix for the issue.

 

Thanks,

Monisha.

0 Kudos
Message 1 of 4
(2,712 Views)

There's an example called "Parse XML String for Multiple Nodes.vi" which uses the VI you mention. It does not crash for me. Does that VI work for you? Do you have an xml file we can test with?

 

It has nothing to do with the inputs not being wired.

 

 

Certified LabVIEW Architect
0 Kudos
Message 2 of 4
(2,676 Views)

It's been that way since LV 2012 at least.  (That's the oldest version I have on my PC.)  I think that someone else would've complained in the seven years (or more) that it's been that way.  😉

 

HOWEVER... I've noticed that NI has been quietly changing things in the background lately, starting with LV 2017, I think.  It could be that they "tightened up" that CLFN requirement that all inputs and outputs be wired.  I'm thinking we'd see a lot more failures of a similar nature if this was so.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 4
(2,631 Views)

Hi Thols and Billko,

 

Thanks for your reply

 

I am able to run the example "Parse XML String for Multiple Nodes.vi" without any issue. I would like to elaborate on how I am using the NI XML Parser and the issue that I am facing

 

In my project, we have an XML parser which uses the NI XML library to parse an XML file and gives out the data in the form of clusters(Output Data Clusters). We have created JKI unit tests to test this XML parser module. The parser module runs as expected when I call them in a VI but hangs when I run multiple tests from JKI VI Tester. Running a single unit test doesn't hang LabVIEW. Before a month, I was able to run unit tests without any issues. Recently, we have made a few changes in the Output Data Clusters that the parser module gives out(removed few unnecessary items). As changes are minor which removes few items from the output data clusters, I don't see that as the reason for the issue.

 

Even now, I am able to run the VIs as expected and I am also able to run the individual tests as expected and LabVIEW doesn't crash. The problem occurs when I run a set of tests together --> LabVIEW crashes at Call Library Function node of the 'Get All Matched Nodes.vi'. I have also observed that LabVIEW doesn't crash at this VI every time but crashes after calling it a couple of times.

 

Please let me know what might be the reason for this kind of issue.

 

Also, From this page, I see that wiring the inputs is mandatory for a few data types to allocate the memory when calling a DLL.

 

  Monisha26_0-1580732327188.png

 

Could you please help me to understand how memory allocation is handled in 'Get All Matched Nodes.vi' and 'Get First Matched Node.vi' if it is not that case?

 

Thanks,

Monisha.

 

0 Kudos
Message 4 of 4
(2,413 Views)