04-21-2025 01:10 PM
I get this dialog when trying to load a class that worked before the holiday a couple of days ago. I had to rename the class file just to get it to load. I have included the class file by itself to see if someone can open it without a crash.
04-21-2025 03:04 PM
There's something corrupt in the flattened private data control that is stored in the .lvclass file. If I replace the XML of your private data with the equivalent of an empty private data control, the class loads without crashing.
I don't know of any way to restore a .lvclass file with a corrupted private data control XML element.
04-21-2025 03:17 PM - edited 04-21-2025 03:19 PM
Can you post the file that opens? I don't really care about the default data, as long as I can open the class file with its contents in place.
Unfortunately, for this project I don't have it in a repo. The next version of the class file is from when I started the project (with very few items in the lvclass file).
Is there a way to make LabVIEW load the lvclass file and just load empty data?
04-21-2025 03:37 PM
I think I have a pretty quick solution. I just deleted the corrupt class file, and I will add the accessor controls to the lvclass .ctl class definition.
04-21-2025 03:39 PM
@JoeClaLvSinceVersion2.0 wrote:
Is there a way to make LabVIEW load the lvclass file and just load empty data?
Not that I know of. The private data control XML element defines the data type of the class, i.e. all the controls you've placed inside the private data control cluster.
04-21-2025 03:43 PM
Loading up the class object .ctl with controls, I added http client and I got this error again. This data type seems to be the culprit perhaps?
04-21-2025 03:48 PM
I would try a couple of things as alternates.
First, see if disconnecting the type definition before adding it to your class private data helps.
If that doesn't help, then I would suggest storing it in the private data as a Variant, and have your accessors for it convert it to and from a Variant internally.
If this is a repeatable bug you might consider trying to get CAR submitted so NI can maybe correct the issue down the line.
04-21-2025 03:53 PM - edited 04-21-2025 03:55 PM
Thanks for the reply Kyle! I don't want to come across as a LabVIEW snob - it seems awkward to use a variant in a class. If this persists, I am thinking casting to/from U32 in the class accessor. That may be a better way to go.
04-21-2025 04:08 PM
I loaded that http reference control from the http sub-VI and added it to the class library ctl with no issues. That did the trick. Thanks for the help guys!