unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* My tex file became chaos code without any sake when I reopen it.
@ 2006-12-10 13:59 Hongyi Zhao
  2006-12-11  0:54 ` Kenichi Handa
  2006-12-11 20:06 ` Piet van Oostrum
  0 siblings, 2 replies; 9+ messages in thread
From: Hongyi Zhao @ 2006-12-10 13:59 UTC (permalink / raw)
  Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

Dear Kenichi and others,

I encountered a strange thing, the attached is my tex file which I reopen it
when I restart my PC, but I find it becomes chaos codes, whose default
encoding scheme is GB18030.  I've used all the methods to revert it but all
these methods like water off a duck's back.

Sigh.  It this a bug of Emacs, or anything I don't know?  Who can tell me?

-- 
Hongyi Zhao <hongyi.zhao@gmail.com>
赵弘毅
--

题目:《春怀示邻里》
作者:陈师道(1053-1101)
断墙着雨蜗成字,老屋无僧燕作家,
剩欲出门追语笑,却嫌归鬓著尘沙。
风翻蛛网开三面,雷动蜂窠趁两衙。
屡失南邻春事约,只今容有未开花。

[-- Attachment #2: PDFSCREEN-slide-gbk-chaos.tex.bz2 --]
[-- Type: application/octet-stream, Size: 11470 bytes --]

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: My tex file became chaos code without any sake when I reopen it.
  2006-12-10 13:59 My tex file became chaos code without any sake when I reopen it Hongyi Zhao
@ 2006-12-11  0:54 ` Kenichi Handa
  2006-12-11  3:04   ` Hongyi Zhao
  2006-12-11 20:06 ` Piet van Oostrum
  1 sibling, 1 reply; 9+ messages in thread
From: Kenichi Handa @ 2006-12-11  0:54 UTC (permalink / raw)
  Cc: emacs-devel

In article <20061210135952.GA6086@localdomain>, Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> I encountered a strange thing, the attached is my tex file which I reopen it
> when I restart my PC, but I find it becomes chaos codes, whose default
> encoding scheme is GB18030.  I've used all the methods to revert it but all
> these methods like water off a duck's back.

> Sigh.  It this a bug of Emacs, or anything I don't know?  Who can tell me?

If that file was sane before saving and became insane after
saving, it is surely Emacs' bug.  Anyway, the file contains
only NULL bytes after line 586, and from only that broken
file, I have no idea what is wrong.   So, could you please
find a simple test file; which can be read correctly by
Emacs, but can't be written correctly by Emacs

---
Kenichi Handa
handa@m17n.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: My tex file became chaos code without any sake when I reopen it.
  2006-12-11  0:54 ` Kenichi Handa
@ 2006-12-11  3:04   ` Hongyi Zhao
  0 siblings, 0 replies; 9+ messages in thread
From: Hongyi Zhao @ 2006-12-11  3:04 UTC (permalink / raw)
  Cc: emacs-devel

> If that file was sane before saving and became insane after
> saving, it is surely Emacs' bug.  Anyway, the file contains
> only NULL bytes after line 586, and from only that broken
> file, I have no idea what is wrong.   So, could you please
> find a simple test file; which can be read correctly by
> Emacs, but can't be written correctly by Emacs

Difficult, because that case is a random thing.  I don't know how to
reproduce it.  But once I encounter with it, I'll tell you immediately.

-- 
Hongyi Zhao <hongyi.zhao@gmail.com>
赵弘毅
--

《近试上张水部》
作者:朱庆余
洞房昨夜停红烛,待晓堂前拜舅姑。
妆罢低声问夫婿,画眉深浅入时无。

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: My tex file became chaos code without any sake when I reopen it.
  2006-12-10 13:59 My tex file became chaos code without any sake when I reopen it Hongyi Zhao
  2006-12-11  0:54 ` Kenichi Handa
@ 2006-12-11 20:06 ` Piet van Oostrum
  2006-12-12 14:29   ` Richard Stallman
  2006-12-13  1:00   ` Kenichi Handa
  1 sibling, 2 replies; 9+ messages in thread
From: Piet van Oostrum @ 2006-12-11 20:06 UTC (permalink / raw)


>>>>> Hongyi Zhao <hongyi.zhao@gmail.com> (HZ) wrote:

>HZ> Dear Kenichi and others,
>HZ> I encountered a strange thing, the attached is my tex file which I reopen it
>HZ> when I restart my PC, but I find it becomes chaos codes, whose default
>HZ> encoding scheme is GB18030.  I've used all the methods to revert it but all
>HZ> these methods like water off a duck's back.

>HZ> Sigh.  It this a bug of Emacs, or anything I don't know?  Who can tell me?

It typically looks like some file corruptions that I have met occasionally.
It happened to me when I run out of diskspace. Then there isn't enough
swapspace available and virtual memory allocation may fail. I think that
Emacs doesn't check properly if a malloc fails and then corrupts its memory
when a malloc fails. I have no idea if that might be the cause of your
memory corruption, but I have had several times (let's say once a month)
file corruptions.
-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet@vanoostrum.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: My tex file became chaos code without any sake when I reopen it.
  2006-12-11 20:06 ` Piet van Oostrum
@ 2006-12-12 14:29   ` Richard Stallman
  2006-12-24 21:44     ` Piet van Oostrum
  2006-12-13  1:00   ` Kenichi Handa
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2006-12-12 14:29 UTC (permalink / raw)
  Cc: emacs-devel

Emacs as very sophisticated handling for malloc failure,
because it is very important not to corrupt files in such cases.

So if it fails in some specific case, please do NOT think of it as
something inevitable that you should ignore.  It isa bug we need
to debug and fix.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: My tex file became chaos code without any sake when I reopen it.
  2006-12-11 20:06 ` Piet van Oostrum
  2006-12-12 14:29   ` Richard Stallman
@ 2006-12-13  1:00   ` Kenichi Handa
  2006-12-13 12:34     ` Piet van Oostrum
  1 sibling, 1 reply; 9+ messages in thread
From: Kenichi Handa @ 2006-12-13  1:00 UTC (permalink / raw)
  Cc: emacs-devel

In article <m2irgiurha.fsf@ordesa.cs.uu.nl>, Piet van Oostrum <piet@cs.uu.nl> writes:

>>>>>> Hongyi Zhao <hongyi.zhao@gmail.com> (HZ) wrote:
> >HZ> Dear Kenichi and others,
> >HZ> I encountered a strange thing, the attached is my tex file which I reopen it
> >HZ> when I restart my PC, but I find it becomes chaos codes, whose default
> >HZ> encoding scheme is GB18030.  I've used all the methods to revert it but all
> >HZ> these methods like water off a duck's back.

> >HZ> Sigh.  It this a bug of Emacs, or anything I don't know?  Who can tell me?

> It typically looks like some file corruptions that I have met occasionally.
> It happened to me when I run out of diskspace. Then there isn't enough
> swapspace available and virtual memory allocation may fail. I think that
> Emacs doesn't check properly if a malloc fails and then corrupts its memory
> when a malloc fails. I have no idea if that might be the cause of your
> memory corruption, but I have had several times (let's say once a month)
> file corruptions.

Did you see that file corruptions only with emacs-unicode-2
branch?  Or does it happen with HEAD too?

---
Kenichi Handa
handa@m17n.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: My tex file became chaos code without any sake when I reopen it.
  2006-12-13  1:00   ` Kenichi Handa
@ 2006-12-13 12:34     ` Piet van Oostrum
  0 siblings, 0 replies; 9+ messages in thread
From: Piet van Oostrum @ 2006-12-13 12:34 UTC (permalink / raw)


>>>>> Kenichi Handa <handa@m17n.org> (KH) wrote:

>KH> Did you see that file corruptions only with emacs-unicode-2
>KH> branch?  Or does it happen with HEAD too?

I only use HEAD.
-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet@vanoostrum.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: My tex file became chaos code without any sake when I reopen it.
  2006-12-12 14:29   ` Richard Stallman
@ 2006-12-24 21:44     ` Piet van Oostrum
  2006-12-25 16:53       ` Richard Stallman
  0 siblings, 1 reply; 9+ messages in thread
From: Piet van Oostrum @ 2006-12-24 21:44 UTC (permalink / raw)


>>>>> Richard Stallman <rms@gnu.org> (RS) wrote:

>RS> Emacs as very sophisticated handling for malloc failure,
>RS> because it is very important not to corrupt files in such cases.

>RS> So if it fails in some specific case, please do NOT think of it as
>RS> something inevitable that you should ignore.  It isa bug we need
>RS> to debug and fix.

Last week I had again one of the file mixups, but it appeared that also
files were affected that were outside of Emacs. So now I suspect the file
system instead of Emacs. As Emacs is the most used program on my computer
it is natural that in case of problems files that are under control of
Emacs are affected.

A disk check revealed that there were problems with the file structure on
that partition so I reformatted the thing and populated it with new copies
of the files.

Now I am quite confident that Emacs was not the cause of the problem.
-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet@vanoostrum.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: My tex file became chaos code without any sake when I reopen it.
  2006-12-24 21:44     ` Piet van Oostrum
@ 2006-12-25 16:53       ` Richard Stallman
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Stallman @ 2006-12-25 16:53 UTC (permalink / raw)
  Cc: emacs-devel

    A disk check revealed that there were problems with the file structure on
    that partition so I reformatted the thing and populated it with new copies
    of the files.

    Now I am quite confident that Emacs was not the cause of the problem.

That is reassuring news.

Thanks for following this up.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-12-25 16:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-10 13:59 My tex file became chaos code without any sake when I reopen it Hongyi Zhao
2006-12-11  0:54 ` Kenichi Handa
2006-12-11  3:04   ` Hongyi Zhao
2006-12-11 20:06 ` Piet van Oostrum
2006-12-12 14:29   ` Richard Stallman
2006-12-24 21:44     ` Piet van Oostrum
2006-12-25 16:53       ` Richard Stallman
2006-12-13  1:00   ` Kenichi Handa
2006-12-13 12:34     ` Piet van Oostrum

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).