Subject: bug#11282: 24.1.50; Error in decoding message

From: Richard Stallman <[email-masked]>
Date: Thu, 19 Apr 2012 14:39:13 -0400

This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgement at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

When I visit this as an Rmail file, Rmail gets an error
decoding the coding system.  Maybe the message really is
invalid, but Rmail should not get an unhandled Lisp error.

Here is the backtrace.

    Debugger entered--Lisp error: (wrong-type-argument wholenump nil)
      decode-coding-region(888 1351 utf-7)
      rmail-mime-insert-decoded-text([("text/html" (charset . "utf-7")) ("inline") "7bit" [[nil nil nil] [t nil t]] [#<marker at 1 in bad-message> #<marker at 5343 in bad-message> t] ["" (nil) nil] [#<marker at 5343 in bad-message> #<marker at 5806 in bad-message> t] nil rmail-mime-insert-text nil])
      rmail-mime-insert-text([("text/html" (charset . "utf-7")) ("inline") "7bit" [[nil nil nil] [t nil t]] [#<marker at 1 in bad-message> #<marker at 5343 in bad-message> t] ["" (nil) nil] [#<marker at 5343 in bad-message> #<marker at 5806 in bad-message> t] nil rmail-mime-insert-text nil])
      rmail-mime-insert([("text/html" (charset . "utf-7")) ("inline") "7bit" [[nil nil nil] [t nil t]] [#<marker at 1 in bad-message> #<marker at 5343 in bad-message> t] ["" (nil) nil] [#<marker at 5343 in bad-message> #<marker at 5806 in bad-message> t] nil rmail-mime-insert-text nil])
      rmail-show-mime()
      rmail-show-message-1(nil)
      rmail-show-message(nil)
      byte-code("q\210	\204\f\304\305 !\210\n\203\306 \210\307 \210\203\310\311!\210\304\207" [mail-buf msg-shown rmail-display-summary run-mail-hook rmail-show-message rmail-first-unseen-message rmail-summary rmail-construct-io-menu run-hooks rmail-mode-hook] 2)
      rmail("~/bad-message")
      rmail-input("~/bad-message")
      call-interactively(rmail-input nil nil)

Here is the file, uuencoded:

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/home/rms/emacs-bzr/trunk/etc/DEBUG.

In GNU Emacs 24.1.50.1 (mips64el-unknown-linux-gnu, GTK+ Version 2.12.12)
 of 2012-04-10 on theobromine2
Bzr revision: 107831 [email-masked]
Configured using:
 `configure 'CFLAGS=-g -O0''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: RMAIL

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  gpm-mouse-mode: t
  display-battery-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
DEL ESC DEL DEL DEL DEL DEL e SPC o f SPC t h e SPC 
s p e e c h . . C-p ESC k ESC k , SPC i f SPC t h e 
SPC d i n n e r SPC e n d s SPC a t SPC a SPC t i m 
e SPC t h a t SPC ESC b ESC b ESC b ESC b ESC b ESC 
b ESC d s p e e c h C-e i s n ' t SPC t o o SPC l a 
t e RET t o SPC h a v e SPC d i n n e r . C-c C-c C-d 
x C-x b o u t g TAB RET g C-p C-o C-x o C-x 1 C-u C-u 
C-n C-n C-n C-n C-n C-o C-o T h a n k SPC y o u . C-n 
C-n ESC f ESC f ESC d SPC n i c e ESC q C-o . SPC SPC 
C a n SPC t h e ESC d ESC d ESC f ESC f DEL ESC q C-n 
DEL ? C-p C-e ESC DEL ESC DEL t h e SPC r e s t a u 
r a n t s RET a r e SPC s y i l DEL DEL DEL t i l l 
SPC o p e n ? ESC k C-x C-s C-x b R TAB RET C-d q ESC 
v ESC v ESC v C-x h ESC x w r SPC r e RET b a d - m 
e s s a g e RET i ESC p RET q ESC x r e p o r t SPC 
e m a c s SPC b u g RET

Recent messages:
Error during redisplay: (error "Invalid base64 data")
Entering debugger...
Back to top level.
scroll-down-command: Beginning of buffer
Mark set [2 times]
Wrote /home/rms/bad-message
Counting messages...done
Error during redisplay: (error "Invalid base64 data")
Entering debugger...
Back to top level.

Load-path shadows:
/home/rms/emacs-bzr/trunk/lisp/mouse-sel hides /home/rms/emacs-bzr/trunk/lisp/obsolete/mouse-sel
/home/rms/emacs-bzr/trunk/lisp/mail/mailpost hides /home/rms/emacs-bzr/trunk/lisp/obsolete/mailpost

Features:
(shadow emacsbug tar-mode jka-compr epa-mail epa derived epg
epg-config utf-7 novice vc-sccs vc-svn vc-rcs vc-dir ewoc etags
compare-w ispell apropos pp find-func debug cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
conf-mode info help-fns whitespace rmailsum log-view vc-bzr dired-aux
ind-util mule-util cal-move cal-menu calendar cal-loaddefs log-edit
pcvs-util add-log diff-mode easy-mmode vc ediff-merg ediff-diff
ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff
vc-dispatcher parse-time vc-cvs sgml-mode dabbrev multi-isearch shell
pcomplete grep compile comint ansi-color ring quail help-mode view
rmailout qp newcomment mailalias rmailmm message sendmail format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mailabbrev
gmm-utils mailheader mail-parse rfc2231 rmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils dired regexp-opt t-mouse
time-date battery paren cus-start cus-load tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar
gtk x-toolkit x multi-tty emacs)

--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call