Jump to content

EasyXML crashes back to the desktop with large clusters


WilliamTell

Recommended Posts

I am using easy XML to parse XML configuration files into Labview clusters for use on a PXI controller running LV Real Time.

The configuration files are big – I am using the PXI controller to control 11 closed loops on a test rig running 18 (and possibly more) tests, there are a lot of control parameters per loop and so the configuration file needs to be big.

 

I have been successful so far, but have today expanded the initial test configuration files to run the full 11 loops (from 8 originally) and 18 tests and now easyXMl no longer works.

 

Typically the Easy Generate XML _JKI_EasyXML.vi crashes straight back to the desktop or gives an illegal character message and stops when I pass in the test input cluster. The Easy Read XMl vi cant parse the XML file and also crashes.

 

I am currently running LV 8.6.1, but have also tried LV2009. Both versions exhibit the same problem. I have also tried out the new version 1.1.alpha07. This also crashes.

 

I have attached a source distribution project, which I have been hacking around with to try and find the problem. This project was originally used to test/verify the conversion from JKI XML files to LV XML format files. When I changed the XML source file to encompass all controllers and tests,the Easy XMl read no longer functioned so I started to check a ‘simple’ conversion from the LV cluster to XML.

 

Load and run the vi:

 

Convert motor test configuration xml file.vi

 

And then press ‘Save Cluster as JKI XML’ to parse the all test data cluster to XML into the XML string indicator.

It crashes on my machine.

 

If I reduce the number of tests in the input cluster, say removing 2 or 3, it starts to work OK.

 

Can this behaviour be fixed?

EasyXMLProblem.zip

Link to comment
Share on other sites

Dear WiliamTell,

 

I was trying to reproduce your problem but unfortunatly I'm missing some VIs. All the missing VIs are located under <vi.lib>\addons\_LabVIEW Style Book. Can you tell me where you got these from? Are these from the book written by Peter Blume?

 

Hi,

Apologies for this.

Yes the vi's are from the Blume book, however, I have created a simple project with an easyXML create vi connected to the cluster as well as a LV XML create version. The LV vi works, but the EasyXML vi crashes back to the desktop. I have uploaded this project.

EasyXMLProblem2.zip

Link to comment
Share on other sites

I've basically figured out the issue: The data type has a type descriptor that cannot be represented using the I16 "7.x" type descriptor array.

 

Here are some more details:

 

We can see this when we try to read the type descriptor as shown below. We get an edit time error (you probably won't see the broken run arrow until you hit the run button).

 

12_1_2009_8_43_12_PM.png

 

If you try to convert to variant first and then read the type descriptor (and bypass LabVIEW's edit-time type checking) you'll get a hard crash (LabVIEW just disappears), as shown below.

 

12_1_2009_8_44_35_PM.png

 

Variant_To_Flattened_String_Crash.vi

Note: EasyXML calls Variant To Flattened String, which is causing the crash as shown above.

 

The only solution that I can think of is to split up your data structure or make its type descriptor smaller (user more arrays of clusters, rather than clusters of the same cluster type, or avoid using Enums, which have a very long type descriptor).

Link to comment
Share on other sites

OK, so we've figured out why this is crashing LabVIEW. Let's think about how we can solve this problem.

 

The solution I would consider is to rework the data structure. For example, rather than a cluster of subclusters that are all the same (but have different names), how about making an array of clusters. You could make the first element of the cluster a string labeled "Test Name" for putting the names like "Clean Test 1", "Clean Test 2", etc. Of course, you'd need to then need to search for the one with the right name, but this is pretty straight-forward.

 

Might this work?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.