On 11/25/2012 08:05 AM, Graham Smith wrote:
Liviu
That's odd. The first question that pops to mind: Do you use the
Document > Compressed option? Maybe this corrupts things.
What is also odd is that I can open the file with no problem using a
text editor on the Mac, indeed the file preview in the Mac file
Manager (Pathfinder) reads it without any problems. BUT I have just
tried on Ubuntu (open with text editor) , and it won't open.
I certainly haven't selected the compressed option, but this
particular file is 7 months old, and I can't remember whether it
originated on the Mac or Ubuntu or even the version of Lyx. I will
check the compressed option in future.
However, it seems there is no obvious answer, so I will just be more
cautious in future.
This file is definitley corrupt. Here's the result of "hexdump -c | head
-n 25":
0000000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
0008050 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 . \n \
0008060 e n d _ l a y o u t \n \n \ b e g
0008070 i n _ l a y o u t S t a n d a
0008080 r d \n A d d i t i o n a l l y
0008090 t o g e t t h e m a p t
00080a0 o e x a c t l y f i l l t
00080b0 h e b o u n d i n g b o x
00080c0 a s y o u w a n t \n i t ,
00080d0 y o u c a n a d j u s t
00080e0 t h e s c a l e u n d e r
00080f0 t h e i t e m t a b t o
0008100 t h e r i g h t , w h e n
0008110 t h e \n m a p b o x i s
0008120 s e l e c t e d . \n I t w i
0008130 l l p r o b a b l y b e a
0008140 t s o m e t i n g l i k e
0008150 7 0 0 0 , b y r e d u c i n
0008160 g a n d i n c r e a s i n g
0008170 t h i s \n n u m b e r t h
0008180 e m a p w i l l g e t l
0008190 a r g e r o r s m a l l e r
00081a0 . \n \ e n d _ l a y o u t \n \n \
00081b0 b e g i n _ l a y o u t S t a
As you see, the file begins with some huge number of zeros, and then
starts up again in the middle of a LyX file, with "\end_layout", as
Liviu noted. Most of the file has thus been zero'd out.
If you've had this problem more than once, you may want to think about
whether you have a hardware problem that is corrupting your files.
Richard