Bug 143515

Summary: XEmacs crashes when loading a UTF-8 encoded Japanese file
Product: [openSUSE] SUSE Linux 10.1 Reporter: Mike Fabian <mfabian>
Component: X11 ApplicationsAssignee: Mike Fabian <mfabian>
Status: RESOLVED FIXED QA Contact: Stefan Dirsch <sndirsch>
Severity: Major    
Priority: P5 - None CC: aj, duwe, kukuk, ro, werner
Version: Alpha 3   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: ttt

Description Mike Fabian 2006-01-17 15:10:02 UTC
How to reproduce:

mfabian@magellan:~$ cat /tmp/ttt
日本語
mfabian@magellan:~$ locale
LANG=ja_JP.UTF-8
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=
mfabian@magellan:~$ xemacs -q -vanilla /tmp/ttt

Loading edmacro...
Loading edmacro...done


Fatal error (11).

Your files have been auto-saved.
Use `M-x recover-session' to recover them.

Your version of XEmacs was distributed with a PROBLEMS file that may describe
your crash, and with luck a workaround.  Please check it first, but do report
the crash anyway.

Please report this bug by invoking M-x report-emacs-bug, or by selecting
`Send Bug Report' from the Help menu.  If that won't work, send ordinary
email to `xemacs-beta@xemacs.org'.  *MAKE SURE* to include this entire
output from this crash, especially including the Lisp backtrace, as well as
the XEmacs configuration from M-x describe-installation (or equivalently,
the file `Installation' in the top of the build tree).

*Please* try *hard* to obtain a C stack backtrace; without it, we are unlikely
to be able to analyze the problem.  Locate the core file produced as a result
of this crash (often called `core' or `core.<process-id>', and located in
the directory in which you started XEmacs or your home directory), and type

  gdb /usr/X11R6/bin/xemacs core

then type `where' at the debugger prompt.  No GDB on your system?  You may
have DBX, or XDB, or SDB.  (Ask your system administrator if you need help.)
If no core file was produced, enable them (often with `ulimit -c unlimited')
in case of future recurrance of the crash.

Lisp backtrace follows:

  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (catch #<INTERNAL OBJECT (XEmacs bug?) (opaque, size=0) 0x2aaaacd8a4b8> ...)
  # (unwind-protect ...)
  # bind (inhibit-quit)
  # (unwind-protect ...)
  # bind (inhibit-quit)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # bind (inhibit-quit)
  # (condition-case ... . error)
  # (catch top-level ...)

セグメンテーション違反です (core dumped)
mfabian@magellan:~$
Comment 1 Mike Fabian 2006-01-17 15:13:35 UTC
Created attachment 63627 [details]
ttt

test file used in comment #1 to reproduce the bug.
Comment 2 Mike Fabian 2006-01-17 15:14:40 UTC
If I build XEmacs from the same sources (from STABLE) for SuSE 10.0
and install the result on STABLE, the above crash does not happen,
then it works fine.
Comment 3 Mike Fabian 2006-01-17 15:19:21 UTC
Reassigned to Michael Matz <michael.matz@novell.com>.

Michael, is it possible that this is a compiler bug?
Comment 4 Michael Matz 2006-01-17 16:56:45 UTC
This can't be told without a testcase showing the problem.  Based on my
experience with current STABLE I would assume that it's not a compiler
problem.  It could be a problem in the source (non-conformant stuff, which
happened to work with older compilers), or some library.

I also see some advices from xemacs in the initial comment, which don't seem
to be followed.  Before assigning to the compiler team this needs to be
analyzed quite some more.
Comment 5 Mike Fabian 2006-03-08 15:55:55 UTC
Apparently this can be fixed by upgrading to XEmacs 21.5.25.
Comment 6 Torsten Duwe 2006-03-10 13:47:12 UTC
Would someone care to do so, please?

It's not necessary to use Japanese; German UTF-8 crashes as well. If you want examples, just say so, but I guess when Japanese is fixed German will be as well.

Personally I would raise this bug's severity, but I guess not too many people use XEmacs :-(
Comment 7 Mike Fabian 2006-03-10 14:05:12 UTC
Adding Andreas Jaeger <aj@suse.de> to CC:.

Andreas, can we update?
Comment 8 Andreas Jaeger 2006-03-10 15:24:19 UTC
OK, go ahead if it's in for Beta8.
Comment 9 Mike Fabian 2006-03-14 14:54:25 UTC
Fixed package has been checked into STABLE:

-------------------------------------------------------------------
Mon Mar 06 17:31:53 CET 2006 - mfabian@suse.de

- update to 21.5.25. Fixes: 
  + bugzilla #141126 (XEmacs 21.5.24 doesn't read localized
    app-defaults)
  + bugzilla #145121 (XIM doens't work anymore in XEmacs)
  + bugzilla #143515 (XEmacs crashes when loading a UTF-8 encoded
    Japanese file)
- Bugzilla #155506:
  add configure option "--with-canna", the auto-detection of canna
  seems to be broken but when enabling canna explicitly it works.

-------------------------------------------------------------------
Comment 10 Torsten Duwe 2006-03-21 14:03:33 UTC
The xemacs in beta8 fixed my UTF-8 problem.
Comment 11 Mike Fabian 2006-03-21 14:24:43 UTC
Good, thank you for verifying that it works!
Comment 12 Mike Fabian 2006-04-10 17:01:42 UTC
FIXED.