Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

.lvclass file not updating when member data modified

I have an inherited AF project with lots of actors. I've been doing some changes, and tried modifying the data in a class. For simplicity sake, lets say I just added a string. LV takes a good 10-15 minutes figuring out what that means, and updates everywhere it needs to, goes unresponsive for a while, maybe comes back, maybe crashes and has to recover, but eventually populates that new string everywhere it needs to. Great. I save everything, it runs well with new string in place, I save everything again and git push. Go to another computer and git pull, open project open error list everything is broken. The class is missing that new string.

 

I look at the commit notes and see the .lvclass file was not committed. It looks like it was unchanged on disk. But I open the project on the computer where I originally changed it and I see the changes. I don't understand how that is possible. As best I can tell, class member data is stored in <Property Name="NI.LVClass.FlattenedPrivateDataCTL" Type="Bin">[binary data goes here]</Property> in the class file, and therefore should modify the file. 

 

Does this sound like a LV problem, or a git problem? Has anyone else experienced something similar? I've only just noticed it, and haven't yet tried actually comparing a class file pre and post changes myself, but I am about to.

 

[Edit] Just tested it because I had another class this had happened to still unchanged on disk. If I open it in the project, I see the changes, and they're working. If I right click the .lvclass file and explicitly save the file it changes on disk, and TortoiseGit sees the change and changes the icon overlay.

 

So now it's a question of why does Labview not save those changes to disk without directly telling it to save that particular class. How is Labview storing those changes outside of the class? Do I now have to make it a part of my process to go through and save each class individually? I'm kind of scared of what I'll see if I do that right now. There is a good chance this is what has been causing me headache for a while though, as I cannot get a successful build on my computer, but I do get builds on my predecessors computer.

0 Kudos
Message 1 of 8
(3,641 Views)

> Great. I save everything

 

Right after this step, do a diff of the .lvclass file with your trunk master. (1) Verify that you see differences between the file on disk and the trunk. You should see differences. That's where the private data control modifications are saved.

 

> I save everything again and git push.

 

After this, the file on your disk and your trunk should match with the changes you made. (2) Verify that the file on your disk matches trunk AND that it still looks like the file that had the changes you saw in the previous verify.

 

If check (1) fails, then you aren't actually saving the class. I cannot explain that -- if the file was read-only, LV would throw an error dialog saying it cannot save. The only time I've ever seen something like this was a weird user system where they had a housekeeper bot that every time a file changed on disk, the bot would rewrite it back to the original as part of a defense against virus attacks. It was a really dumb system, and I'd be surprised if that was your situation. But it is literally the only time I've seen something that would explain a failure of (1).

 

If check (2) fails, then I would question whether you're issuing the right git command -- maybe you think you're pushing but you're actually reverting? I know that is a dumb question, almost akin to asking "is it plugged in?" but wrong git commands have been the source of many software issues around my office over the years, so I have to ask. I don't know anything else that would cause a (2) failure.

 

If both (1) and (2) pass, then (3) verify that the file you sync on the other computer actually has the changes. You may not be pulling from the trunk that you think you're pushing to.

 

All of these suggestions put the onus on you, I'm afraid, as the most likely source of failure. But the scenario you're describing should work just fine, and I don't know of anything in the tools that would cause an issue.

0 Kudos
Message 2 of 8
(3,609 Views)

To more directly answer your question: LabVIEW does NOT have any external file for changes to a class. All the changes for the class and its private data control are stored in the .lvclass file. If you're loading and seeing your changes, then the file was correctly changed on disk. You can probably also check file timestamps to confirm.

0 Kudos
Message 3 of 8
(3,607 Views)

When you edit the private class data of a class, you get a dialog box that asks if you would like to save the class. Are you saying that you can click to save the class when you close the class data editor and the file doesn't get updated on disk? I have certainly never seen or heard of that occurring. Are you doing a commit with the LabVIEW project still open? Even if you don't save the class individually, when you close the project if you select save all, it should save the class - I've never seen any other behavior.

0 Kudos
Message 4 of 8
(3,605 Views)

Well I don't know what to say. I definitely have a situation where changes are occurring, and saved somewhere, but that somewhere is NOT in my project folder. And it's not in recovery files either. 

 

If I go to the offending .lvclass files in the project and save them individually, the changes get committed to disk in the project file.

0 Kudos
Message 5 of 8
(3,512 Views)

Can you post video of you going through the edits and save process? Maybe we can see you do something unusual.

 

What was the result of the three tests I suggested in my earlier post? Where is the failure occurring?

0 Kudos
Message 6 of 8
(3,502 Views)

I am seeing a similar issue in LV2019. I am not sure if it ever happened when I changed the class private data, but I see it frequently when I add methods to the class and move those into and out of virtual folders inside the class. The new methods show up as new files in git but the lvclass file does not show up in the list of changed files.

0 Kudos
Message 7 of 8
(2,876 Views)

@hfettig wrote:

but the lvclass file does not show up in the list of changed files.


And you have either pressed "ctrl+shift+s" to save all the files or you have right clicked on the class in the project tree and directly said "save"?

0 Kudos
Message 8 of 8
(2,788 Views)