01-31-2020 12:54 AM
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??
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.
01-31-2020 03:26 AM - edited 01-31-2020 03:27 AM
01-31-2020 09:31 AM
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.
02-03-2020 06:23 AM - edited 02-03-2020 06:24 AM
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.
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.