06-17-2020 06:33 AM
Hi! My LaqbView 2019 crashed and then upon opening the project file I get message project or "Project or Library file is corrupt".
Any suggestions how to heal it?
Solved! Go to Solution.
06-17-2020 06:55 AM
Hi Alex,
@Alex2019 wrote:
Any suggestions how to heal it?
Options:
You don't use SCC or backups?
Now you learned about the importance of both: use them from now on!
06-17-2020 07:55 AM
Thank you GerdW,
I used backup for project and library files. Works fine now, but it would be great to have a feature in LabView which would save a back-up/previous version (error free!) of all important files.
06-17-2020 08:22 AM
Hi Alex,
@Alex2019 wrote:
it would be great to have a feature in LabView which would save a back-up/previous version (error free!) of all important files.
That's what you get when using any kind of SCC tool.
Read the LabVIEW help on this topic!
06-17-2020 08:29 AM
Usually when that happens, you get an option to reload from an autosave. (That feature is turned on by default.) I'm surprised you didn't get this option the first time you opened your project after the crash...
06-17-2020 08:35 AM
@billko wrote:
Usually when that happens, you get an option to reload from an autosave. (That feature is turned on by default.) I'm surprised you didn't get this option the first time you opened your project after the crash...
Correct. LabVIEW will create backups every so often of unsaved files that are open. When you save or revert or close and decide to discard changes, those backups go away. How often are the backups made? I have no clue. But after a crash, when you load LabVIEW, you should have had a recovery dialog come up asking what to do with the backups.
06-17-2020 08:47 AM
@billko wrote:
Usually when that happens, you get an option to reload from an autosave. (That feature is turned on by default.) I'm surprised you didn't get this option the first time you opened your project after the crash...
No, this time I did not get option to recover from auto-save.
Usually LabView shows recover option. Also, one local variables became marked with big yellow triangle in the project explorer to the left, and I was not able to delete of modify this variable (only option from right-click was to "Find callers"). I guess this is how LabView marks "corrupt" things. Sorry, I did not save a snapshots of that triangle.
This is another topic, but actually, LabView 2019 crashes quite often when I edit CTL file (type def.) and forget to close other VIs or CTL files where the edited CTL is used. I used to approve sending crash reports (with my contact info specified) to NI, but who knows if they really look at these reports and fix issues 😉
06-17-2020 08:59 AM - edited 06-17-2020 09:02 AM
Did this happen after merging from a repository? If both you and someone else both worked on the library and made commits, most SCC systems will outsmart themselves and try to merge them into something it thinks best represents both changes - which is almost never correct - and results in a corrupt file. A library file is just an xml file, so SCC will treat it as a text file and try to merge it as such.
The best way to avoid this is to let SCC know that lvproj and lvlib should be treated as binary; therefore, no merging will take place, and you get the yellow triangle of a conflicted file instead. You mentioned yellow triangle on another file, so this is what I think happened.
06-17-2020 09:05 AM
@billko wrote:
Did this happen after merging from a repository? If both you and someone else both worked on the library and made commits, most SCC systems will outsmart themselves and try to merge them into something it thinks best represents both changes - which is almost never correct - and results in a corrupt file. A library file is just an xml file, so SCC will treat it as a text file and try to merge it as such.
The best way to avoid this is to let SCC know that lvproj and lvlib should be treated as binary; therefore, no merging will take place, and you get the yellow triangle of a conflicted file instead. You mentioned yellow triangle on another file, so this is what I think happened.
The only way to resolve this conflict is to choose one committed version over the other, and have the loser take the change and live with it - i.e., fix the library to reflect his changes, also. Then be careful when you are making commits when working in the same area of code as someone else.
06-17-2020 09:21 AM
@billko wrote:
Did this happen after merging from a repository? ....
No no, I do not have SCC nor any other version control system. I do backup manually every day after work is finished.