LyXCorrupt .lyx file due to improper shutdown

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
BrunoCocciaro
Posts: 1
Joined: Fri Apr 08, 2016 10:58 am

Corrupt .lyx file due to improper shutdown

Post by BrunoCocciaro »

Prav wrote:I know the post is closed. But I wanted to add my experience. I could recover my data from the corrupted .lyx by opening the file with miktex and then comparing the code with any other working lyx code(again opened in miktex).
Thank you very much, I had the same problem and your post was for me very useful

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

robsmithrobsmith
Posts: 1
Joined: Wed Aug 03, 2016 4:31 am

Corrupt .lyx file due to improper shutdown

Post by robsmithrobsmith »

BrunoCocciaro wrote:
Prav wrote:I know the post is closed. But I wanted to add my experience. I could recover my data from the corrupted .lyx by opening the file with miktex and then comparing the code with any other working lyx code(again opened in miktex).
Thank you very much, I had the same problem and your post was for me very useful
Had a similar issue with a corrupt LyX file. I managed to recover my information by opening the backup file (with the ~) in the code editor for MATLAB and copying out the bits I needed.
hansli
Posts: 1
Joined: Tue Aug 10, 2021 12:06 pm

Corrupt .lyx file due to improper shutdown

Post by hansli »

Prav wrote:I know the post is closed. But I wanted to add my experience. I could recover my data from the corrupted .lyx by opening the file with miktex and then comparing the code with any other working lyx code(again opened in miktex).
This was indeed very helpful. Or it inspired another easy way to fix things: What helped me pinpointing the issue was opening the document from the command line with verbose flag:

Code: Select all

lyx -v corruptfile.lyx
It will tell you the line where stuff goes wrong. Then use a text editor to compare the corrupted file to a "fresh one". (In my case a floating algorithm caused issues -> create an empty lyx file, insert an algorithm, check in the text editor how it's supposed to look, change the corrupted one, profit)
Post Reply