LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Project or Library file is corrupt" upon opening project file

Solved!
Go to solution

corrupt_err_msg.png

 

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?

 

 

0 Kudos
Message 1 of 25
(2,921 Views)

Hi Alex,

 


@Alex2019 wrote:

 Any suggestions how to heal it?


Options:

  1. Get the latest working version from your SCC (Source Code Control) system. Ready.
  2. Get the latest working version from your backup. Ready.

You don't use SCC or backups?

Now you learned about the importance of both: use them from now on!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 25
(2,911 Views)

Thank you ,

 

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.

0 Kudos
Message 3 of 25
(2,895 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 25
(2,887 Views)

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...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 25
(2,881 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 25
(2,876 Views)

@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 😉

0 Kudos
Message 7 of 25
(2,872 Views)

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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 25
(2,868 Views)

@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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 25
(2,860 Views)

@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.

0 Kudos
Message 10 of 25
(2,846 Views)