Discussion:
LyX 2.1.0 fatal crash
Paul A. Rubin
2014-05-30 15:53:55 UTC
Permalink
I just lost two to three days of work when LyX 2.1.0 crashed. I have no idea
what triggered the crash (I think I had just clicked into the middle of a
line) and cannot reproduce it. Both the document file and the emergency file
are identically corrupted (truncated). Both are 13.0 KB; the correct length
would be approximately 150 KB. There's nothing that I can find in the buffer
directory (which survived) that would seem to be of use figuring out what
happened.

I've seen reports of lost work recently, but don't know if there is a bug
ticket open on it (or multiple tickets), and I'm not sure I can provide
enough useful information to help. Is this a known issue? Is there any info
beyond the above that might be of use? The OS is Linux Mint 16.

Paul
Richard Heck
2014-05-30 16:26:26 UTC
Permalink
Post by Paul A. Rubin
I just lost two to three days of work when LyX 2.1.0 crashed. I have no idea
what triggered the crash (I think I had just clicked into the middle of a
line) and cannot reproduce it. Both the document file and the emergency file
are identically corrupted (truncated). Both are 13.0 KB; the correct length
would be approximately 150 KB. There's nothing that I can find in the buffer
directory (which survived) that would seem to be of use figuring out what
happened.
I've seen reports of lost work recently, but don't know if there is a bug
ticket open on it (or multiple tickets), and I'm not sure I can provide
enough useful information to help. Is this a known issue? Is there any info
beyond the above that might be of use? The OS is Linux Mint 16.
Do the corrupted files end with "\begin_inset Tabular"? Do you have
auto-completion on? How
about auto-save, which is at Toos> Preferences> Document Handling,
"Backup documents, every
N minutes"? Those all seem to relate to the problems we've seen.

If the document file itself is corrupted, that suggests you were trying
to save it, yes? I'm not sure
why LyX would over-write that file unless you were trying to save it.
But that's been bugging me
for a while now....

More importantly, at the moment: In the same dialog, is "Backup original
documents when saving"
also enabled? If so, then you should find a valid backup file in the
Backups directory specified under
Tools> Preferences> Paths or, if no directory is specified, the document
directory. The file will have
a name like
!home!rgheck!files!documents!classes!phil1885.lyx~
and may be "hidden", like a dot file.

Richard
Paul A. Rubin
2014-05-30 18:18:04 UTC
Permalink
Post by Richard Heck
Do the corrupted files end with "\begin_inset Tabular"?
Yes. So I gather this is nothing new (or else you're an incredibly lucky
guesser).
Post by Richard Heck
Do you have auto-completion on?
Yes for math, no for text.
Post by Richard Heck
How about auto-save, which is at Toos> Preferences> Document Handling,
"Backup documents, every
N minutes"?
No.
Post by Richard Heck
Those all seem to relate to the problems we've seen.
If the document file itself is corrupted, that suggests you were
trying to save it, yes? I'm not sure
why LyX would over-write that file unless you were trying to save it.
But that's been bugging me
for a while now....
I think I hit ctrl-S to save the last thing I did, and then clicked
somewhere before the GUI evaporated, and I think I saw the cursor assume
its new position before entropy won out. It could be that I clicked fast
enough to beat a crash during the save, or it could be the save went
okay and the click precipitated the crash.
Post by Richard Heck
More importantly, at the moment: In the same dialog, is "Backup
original documents when saving"
also enabled? If so, then you should find a valid backup file in the
Backups directory specified under
Tools> Preferences> Paths or, if no directory is specified, the
document directory. The file will have
a name like
!home!rgheck!files!documents!classes!phil1885.lyx~
and may be "hidden", like a dot file.
No, it's not. Fortunately, though, I had symlinked the folder to my
Dropbox folder (and then forgotten I'd done so). I was able to retrieve
the last pre-crash version from Dropbox. Hence the lack of swear-words
in this message.

Paul
Scott Kostyshak
2014-05-30 18:26:19 UTC
Permalink
Post by Paul A. Rubin
Post by Richard Heck
Do the corrupted files end with "\begin_inset Tabular"?
Yes. So I gather this is nothing new (or else you're an incredibly lucky
guesser).
Post by Richard Heck
Do you have auto-completion on?
Yes for math, no for text.
Post by Richard Heck
How about auto-save, which is at Toos> Preferences> Document Handling,
"Backup documents, every
N minutes"?
No.
Post by Richard Heck
Those all seem to relate to the problems we've seen.
If the document file itself is corrupted, that suggests you were trying to
save it, yes? I'm not sure
why LyX would over-write that file unless you were trying to save it. But
that's been bugging me
for a while now....
I think I hit ctrl-S to save the last thing I did, and then clicked
somewhere before the GUI evaporated, and I think I saw the cursor assume its
new position before entropy won out. It could be that I clicked fast enough
to beat a crash during the save, or it could be the save went okay and the
click precipitated the crash.
Post by Richard Heck
More importantly, at the moment: In the same dialog, is "Backup original
documents when saving"
also enabled? If so, then you should find a valid backup file in the
Backups directory specified under
Tools> Preferences> Paths or, if no directory is specified, the document
directory. The file will have
a name like
!home!rgheck!files!documents!classes!phil1885.lyx~
and may be "hidden", like a dot file.
No, it's not. Fortunately, though, I had symlinked the folder to my Dropbox
folder (and then forgotten I'd done so). I was able to retrieve the last
pre-crash version from Dropbox. Hence the lack of swear-words in this
message.
I don't know if this is relevant, but did you have continuous spell
check enabled? I think the other report I remember about this did have
it.

Scott
Paul A. Rubin
2014-05-30 18:30:04 UTC
Permalink
Post by Scott Kostyshak
I don't know if this is relevant, but did you have continuous spell
check enabled? I think the other report I remember about this did have
it. Scott
Yes, continuous spell check is on (using what I think is the default
setting, Enchant).

Paul
Richard Heck
2014-05-30 18:32:26 UTC
Permalink
Post by Scott Kostyshak
I don't know if this is relevant, but did you have continuous spell
check enabled? I think the other report I remember about this did have it.
And the other question is whether you have word-completion enabled.

I'm skeptical the cause is there, however, since a normal save doesn't
create a clone and suspends the GUI, right? Or is it possible that
something about the Buffer itself is modified, as a result of GUI
events, while we are trying to save it?

Richard
Richard Heck
2014-05-30 18:28:34 UTC
Permalink
Post by Paul A. Rubin
Post by Richard Heck
Do the corrupted files end with "\begin_inset Tabular"?
Yes. So I gather this is nothing new (or else you're an incredibly
lucky guesser).
No, not new. But we've had a very difficult time debugging it, since no
one can reproduce.
Post by Paul A. Rubin
Post by Richard Heck
Do you have auto-completion on?
Yes for math, no for text.
Post by Richard Heck
How about auto-save, which is at Toos> Preferences> Document
Handling, "Backup documents, every N minutes"?
No.
Well, that IS helpful. The suspicion has all along been that it had to
do with autosave. Apparently it does not.
Post by Paul A. Rubin
Post by Richard Heck
If the document file itself is corrupted, that suggests you were
trying to save it, yes? I'm not sure
why LyX would over-write that file unless you were trying to save it.
But that's been bugging me
for a while now....
I think I hit ctrl-S to save the last thing I did, and then clicked
somewhere before the GUI evaporated, and I think I saw the cursor
assume its new position before entropy won out. It could be that I
clicked fast enough to beat a crash during the save, or it could be
the save went okay and the click precipitated the crash.
If the saved file is corrupted, that means LyX hit some problem during
the save. It then tried to save an emergency backup, but ran into the
same problem. Whatever it is.
Post by Paul A. Rubin
Post by Richard Heck
More importantly, at the moment: In the same dialog, is "Backup
original documents when saving"
also enabled? If so, then you should find a valid backup file in the
Backups directory specified under
Tools> Preferences> Paths or, if no directory is specified, the
document directory. The file will have
a name like
!home!rgheck!files!documents!classes!phil1885.lyx~
and may be "hidden", like a dot file.
No, it's not. Fortunately, though, I had symlinked the folder to my
Dropbox folder (and then forgotten I'd done so). I was able to
retrieve the last pre-crash version from Dropbox. Hence the lack of
swear-words in this message.
Well, that is good.

I think we should enable "save backups" by default at this point.

Richard
Paul A. Rubin
2014-05-30 18:33:17 UTC
Permalink
Post by Richard Heck
I think we should enable "save backups" by default at this point.
Probably not a bad idea, although in my case it would not have mattered.
Sometime long ago, when floppy disks ruled (and were actually floppy), I
got in the habit of turning off timed backups and automatic backup on
save in pretty much every program that had them, to conserve precious
space (and save some time). Today neither the disk space nor the CPU
time is really at a premium ... but you can't teach an old dog new tricks.

Paul
Peter Kümmel
2014-05-31 04:54:42 UTC
Permalink
Post by Paul A. Rubin
I just lost two to three days of work when LyX 2.1.0 crashed. I have no idea
what triggered the crash (I think I had just clicked into the middle of a
line) and cannot reproduce it. Both the document file and the emergency file
are identically corrupted (truncated). Both are 13.0 KB; the correct length
would be approximately 150 KB. There's nothing that I can find in the buffer
directory (which survived) that would seem to be of use figuring out what
happened.
I've seen reports of lost work recently, but don't know if there is a bug
ticket open on it (or multiple tickets), and I'm not sure I can provide
enough useful information to help. Is this a known issue? Is there any info
beyond the above that might be of use? The OS is Linux Mint 16.
Paul
Sorry to hear you lost three days of work! And thanks for being
still interested in LyX!

At least this shows that current practice of using only one emergency
file does not protect against loosing user data.

LyX should change its strategy here. Maybe 5 rolling emergency files,
in the hope a LyX crash does not delete files which it does not write
to when crashing.

Peter

Loading...