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

@crossrulz wrote:

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


 

 

Another day, another crash... This time it asks to delete backup file 😮

Looks like LabView autosave/backup function does not really work.

 

Alex2019_0-1592467458268.png

 

 

0 Kudos
Message 11 of 25
(2,328 Views)
Solution
Accepted by Alex2019

Hi Alex,

 


@Alex2019 wrote:

This time it asks to delete backup file 😮


It asks to manually backup files out of this autosave folder to allow you to (try to) recover them later on your own.

Isn't that a nice feature of LabVIEW?

Best regards,
GerdW


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

@GerdW wrote:

It asks to manually backup files out of this autosave folder to allow you to (try to) recover them later on your own. Isn't that a nice feature of LabVIEW?


Absolutely it is a nice feature!

But the message is confusing, it says "delete backup files" which indeed it does not do, it just relocates them. Thank you for explanations GerdW, I wish it would be your short sentence as a message instead of that scary one.

0 Kudos
Message 13 of 25
(2,322 Views)

I'm having exact the same issue as this post.

I'm using LabVIEW 2017. The project file has been working okay but for some reason, I can no longer open it, it shows message "Project or Library file is corrupt.". I don't consider it's the project file problem, because the LabVIEW cannot open an older copy of the same project file either, even though LabVIEW can open other project files. Some one suggested run the VI Analyzer, but it doesn't work with project files.

Hope someone can give some suggestions. Thanks.

0 Kudos
Message 14 of 25
(2,237 Views)

@guangdew1 wrote:

I'm having exact the same issue as this post.

I'm using LabVIEW 2017. The project file has been working okay but for some reason, I can no longer open it, it shows message "Project or Library file is corrupt.". I don't consider it's the project file problem, because the LabVIEW cannot open an older copy of the same project file either, even though LabVIEW can open other project files. Some one suggested run the VI Analyzer, but it doesn't work with project files.

Hope someone can give some suggestions. Thanks.


Why do you say it can't be the project file?  To me, it screams that it is, indeed, the project file.  Open it up in your favorite text editor - it's just an xml file.  You can probably spot the thing that is wrong with it.  Maybe a duplicate tag or something, when your versioning software decided it was smart enough to merge conflicting versions.

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.
Message 15 of 25
(2,224 Views)

billko, thanks for responding to my post and point me a direction. I mentioned it's the project file, because I have the know working copy of this project file, LabVIEW cannot open it either. I opened the file using Wordpad++, which recognized it's xml directly. Still I cannot tell what is wrong, one thing is I'm not familiar with xml, another thing is the file is very big, 1590 lines long. Can you give further advice? Thanks.

0 Kudos
Message 16 of 25
(2,219 Views)

@guangdew1 wrote:

billko, thanks for responding to my post and point me a direction. I mentioned it's the project file, because I have the know working copy of this project file, LabVIEW cannot open it either. I opened the file using Wordpad++, which recognized it's xml directly. Still I cannot tell what is wrong, one thing is I'm not familiar with xml, another thing is the file is very big, 1590 lines long. Can you give further advice? Thanks.


This is confusing to me.  How do you know it's a working copy of the project file if you can't open it with LabVIEW?  Doesn't that mean it is NOT a working copy?

 

If you are allowed to, upload the project file.  I don't need all the files that go with it, just the project file, itself.  (Seems strange, because usually people upload just the project file and I have to tell them to upload the files that go along with it.)

 

I've had to hand edit the project file before, so I kind of know how it's supposed to look.

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.
Message 17 of 25
(2,212 Views)

Billko, thanks for your help. I tried to load the project file to online xml viewer, it showed following error message. Also, could you suggest how I can fix the error, can I just open it with a text editor then save as lvproj file? The know working file I mean is, I copied the whole project before I did any change, the copied project file worked okay for a month until last Friday.

guangdew1_0-1618722009061.png

 

0 Kudos
Message 18 of 25
(2,207 Views)

I posted this thread under other user some time ago. Interestingly, people still need help with it.

 

For my previous assignment where I've developed a relatively large project (many files and code for FPGA, cRIO and PC application) I learned that it is very important to backup your project on the daily basis and, sometimes, even few times per day. I used LabView 2019, however, it does not matter what version you use. Practically every time I finished my work at the middle or end of the day the LabView hanged and I had to kill the process in Windows task manager. Naturally, there is a high risk that project file will be corrupted soon or later.

 

Once, I even had to compare corrupted project file with its backup copy with help of unix utility "diff" and see what went wrong.

 

So, to conclude:

  1.  Do backups few times per day by physically copying all project files to the new location (can be slow).
  2. To speed things up use utility such as "rsync" or commit your changes to svn or git repositories. This you do after you press "Save All" in LabView, before and after you close LabView (yeah, that level of paranoia).
  3. If file corruption occur you can quickly recover that file from repository.
  4. If you work under MS Windows, install cygwin and then all sweet unix tools will be available to you for detailed investigation and xml file comparison/editing.

 

 

 

Message 19 of 25
(2,193 Views)

@Alex2012 wrote:

I posted this thread under other user some time ago. Interestingly, people still need help with it.

 

For my previous assignment where I've developed a relatively large project (many files and code for FPGA, cRIO and PC application) I learned that it is very important to backup your project on the daily basis and, sometimes, even few times per day. I used LabView 2019, however, it does not matter what version you use. Practically every time I finished my work at the middle or end of the day the LabView hanged and I had to kill the process in Windows task manager. Naturally, there is a high risk that project file will be corrupted soon or later.

 

Once, I even had to compare corrupted project file with its backup copy with help of unix utility "diff" and see what went wrong.

 

So, to conclude:

  1.  Do backups few times per day by physically copying all project files to the new location (can be slow).
  2. To speed things up use utility such as "rsync" or commit your changes to svn or git repositories. This you do after you press "Save All" in LabView, before and after you close LabView (yeah, that level of paranoia).
  3. If file corruption occur you can quickly recover that file from repository.
  4. If you work under MS Windows, install cygwin and then all sweet unix tools will be available to you for detailed investigation and xml file comparison/editing.

 

 

 


Interesting.  I just discussed the importance of committing often in another topic.

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 20 of 25
(2,162 Views)