Since 2006-10-28, someone has broken `Face-frob-property'

Nix nix at esperi.org.uk
Sat Dec 16 19:27:42 EST 2006


I just upgraded to latest CVS (2006-12-16, 21:20) to try to dig
further into this KKCC-related (?) memory leak. (I'll know for
sure if it's KKCC-related in an hour or so.)

Instantly I had two new problems.

The first was that all my comments were suddenly popping up in
proportional fonts. The first two things I do to
`font-lock-comment-face' are these:

(make-face-italic 'font-lock-comment-face)
(make-face-unbold 'font-lock-comment-face)

and after the second, the face was changing drastically.

(copy-face 'font-lock-comment-face 'foo-test-face)
(face-font-name 'foo-test-face)
"Bitstream Vera Sans Mono-11"
(make-face-unbold 'foo-test-face)
(face-font-name 'foo-test-face)
"-*-lucidatypewriter-medium-o-*-*-*-120-*-*-*-*-*-*"

What's going on? It becomes clearer if we look at the face's plists.

Before:

(cl-prettyprint (object-plist (get-face 'foo-test-face)))

(foreground #<color-specifier
            global=
[...]
            font
            #<font-specifier
            global=<unspecified>
            fallback=#<font-specifier
            global=
            (((x)
              .
              "Bitstream Vera Sans Mono-11")
             ((encode-as-utf-8 initial x)
              .
              "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
             ((initial two-dimensional x)
              .
              "Monospace-12")
             ((final one-dimensional x)
              .
              "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
             ((final two-dimensional x)
              .
              "-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1"))
            fallback=
            (((tty)
              .
              "normal")
             ((x)
              .
              "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-*-*")
             ((x)
              .
              "-*-*-medium-r-*-*-*-120-*-*-c-*-*-*")
             ((x encode-as-utf-8 initial)
              .
              "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
             ((x two-dimensional initial)
              .
              "Monospace-12")
             ((x two-dimensional initial)
              .
              "Sazanami Mincho-12")
             ((x one-dimensional final)
              .
              "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
             ((x two-dimensional final)
              .
              "-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1")
             ((x)
              .
              "*"))
            0x1f98>
            0x2ca057>
            display-table
[...]

At this stage, we have an empty global and two fallback objects, one
constructed from X resources (I think) and one from raw C code.


After:

(foreground #<color-specifier
[...]
            font
            #<font-specifier
            global=
            (((default x)
              .
              "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-*-*")
             ((default x)
              .
              "-*-*-medium-r-*-*-*-120-*-*-c-*-*-*")
             ((default encode-as-utf-8 initial x)
              .
              "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
             ((default final one-dimensional x)
              .              "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
             ((default final two-dimensional x)
              .
              "-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1"))
            fallback=#<font-specifier
            global=
            (((x)
              .
              "Bitstream Vera Sans Mono-11")
             ((encode-as-utf-8 initial x)
              .
              "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
             ((initial two-dimensional x)
              .
              "Monospace-12")
             ((final one-dimensional x)
              .
              "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
             ((final two-dimensional x)
              .
              "-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1"))
            fallback=
            (((tty)
              .
              "normal")
             ((x)
              .
              "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-*-*")
             ((x)
              .
              "-*-*-medium-r-*-*-*-120-*-*-c-*-*-*")
             ((x encode-as-utf-8 initial)
              .
              "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
             ((x two-dimensional initial)
              .
              "Monospace-12")
             ((x two-dimensional initial)
              .
              "Sazanami Mincho-12")
             ((x one-dimensional final)
              .
              "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
             ((x two-dimensional final)
              .
              "-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1")
             ((x)
              .
              "*"))
            0x1f98>
            0x2ca057>
[...]

Well, we've got a global spec-list now, but the damn silly thing has
gone and used the *last* fallback, the one I can't customize, the one
from C code, completely disregarding the X font that was *actually being
instanced*.

Face-frob-property is a bit of a monster and I haven't dug into it yet:
if anyone knows the cause, please say?



The second problem was scarier. When writing a region --- *any* region,
up to and including a whole buffer --- I got this:

Debugger entered--Lisp error: (invalid-byte-code "unbalanced specbinding stack")
  write-region(1 1242 "~/.emacs-uptimes" nil 0)
  uptimes-save-uptimes()
  kill-emacs(nil)
  call-interactively(kill-emacs)
  command-execute(kill-emacs t)
  execute-extended-command(nil)
  call-interactively(execute-extended-command)
  (dispatch-event "[internal]")

Obviously this happened at the return from write-region (that's the only
place this error gets generated):

(gdb) print speccount
$13 = 29
(gdb) print specpdl_depth_counter
$14 = 30

I was trying to diagnose this bug further when it vanished. Unless
symlinking xemacs/src/.gdbinit into ~ could cause this (!) then it
vanished without obvious cause.


Installation-string follows.

uname -a: Linux hades 2.6.19.1-skas3-v9-pre9-g968519be-dirty #1 PREEMPT Sat Dec 16 14:56:48 GMT 2006 i686 GNU/Linux

/usr/packages/xemacs/21.5.27-20061216/configure '--without-optimization' '--with-dynamic' '--prefix=/usr' '--infodir=${prefix}/info' '--with-infopath=/usr/info' '--with-athena=xaw' '--with-menubars=lucid' '--with-scrollbars=lucid' '--with-dialogs=athena' '--with-widgets=athena' '--with-xft=all' '--with-external-widget' '--with-gpm=no' '--with-sound=alsa' '--with-mule' '--with-mail-locking=flock' '--with-modules' '--with-xim=no' '--without-xfs' '--with-pdump' '--without-newgc' '--with-bignum=gmp' '--with-memory-usage-stats' '--with-assertions' '--with-zlib' '--with-database=berkdb' '--with-postgresql' '--with-error-checking'


XEmacs 21.5-b27 "fiddleheads" (+CVS-20061215) configured for `i686-pc-linux'.

Compilation Environment and Installation Defaults:
  Source code location:              /usr/packages/xemacs/21.5.27-20061216
  Installation prefix:               /usr
  Operating system description file: `s/linux.h'
  Machine description file:          `m/intel386.h'
  Compiler version:                  gcc (GCC) 4.1.1
    - GCC specs file:                /usr/packages.bin/gcc/4.1.1-1/bin/../lib/gcc/i686-pc-linux-gnu/4.1.1/specs
    - Compiler command:              gcc   -Wall -Wno-switch -Wundef -Wsign-compare -Wno-char-subscripts -Wpacked -Wunused-parameter -g  -O2 -march=athlon-4 -pipe -D__NO_STRING_INLINES -D__NO_MATH_INLINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -ffast-math
  libc version:                      2.5
  Relocating allocator for buffers:  no
  GNU version of malloc:             yes
    - Using Doug Lea's new malloc from the GNU C Library.

Window System:
  Compiling in support for the X window system:
    - X Windows headers location:                 
    - X Windows libraries location:               
    - Handling WM_COMMAND properly.
    - Using fontconfig to manage fonts.
    - Compiling in support for Xft antialiased fonts (EXPERIMENTAL).
  Compiling in support for the Athena widget set:
    - Athena headers location:                    X11/Xaw
    - Athena library to link:                     Xaw
  Using Lucid menubars.
    - Using Xft to render antialiased fonts in menubars.
      WARNING: This feature will be replaced with a face.
  Using Lucid scrollbars.
  Using Athena dialog boxes.
  Using Athena native widgets.
    - Using Xft to render antialiased fonts in tab controls.
      WARNING: This feature will be replaced with a face.
    - Using Xft to render antialiased fonts in progress bars.
      WARNING: This feature will be replaced with a face.
      WARNING: This feature not yet implemented; setting ignored.

TTY:
  Compiling in support for ncurses.

Images:
  Compiling in support for GIF  images (builtin).
  Compiling in support for XPM  images.
  Compiling in support for PNG  images.
  Compiling in support for JPEG images.
  Compiling in support for TIFF images.
  Compiling in support for X-Face message headers.

Sound:
  Compiling in support for sound (native).
  Compiling in support for ALSA (Advanced Linux Sound Architecture).
  Compiling in support for NAS (network audio system).

Databases:
  Compiling in support for Berkeley database.
  Compiling in support for PostgreSQL.
    - Using PostgreSQL header file:  libpq-fe.h
    - Using PostgreSQL V7 bindings.

Internationalization:
  Compiling in support for Mule (multi-lingual Emacs).

Mail:
  Compiling in support for "flock" mail spool file locking method.

Other Features:
  Inhibiting IPv6 canonicalization at startup.
  Compiling in support for dynamic shared object modules.
  Compiling in support for more number types using the GNU MP library.
  Using the new GC mark algorithms (KKCC).
  WARNING: ---------------------------------------------------------
  WARNING: The new algorithms are experimental. They are enabled by
  WARNING: default for this release. Use `--disable-kkcc' to
  WARNING: turn it off.
  WARNING: ---------------------------------------------------------
  Using the new portable dumper.
  Dumping into executable.
  Compiling in support for extra debugging code.
  Compiling in support for runtime error checking.
  WARNING: ---------------------------------------------------------
  WARNING: XEmacs will run noticeably more slowly as a result.
  WARNING: Error checking is on by default for XEmacs beta releases.
  WARNING: ---------------------------------------------------------

-- 
`He accused the FSF of being "something of a hypocrit", which
 shows that he neither understands hypocrisy nor can spell.'
   --- jimmybgood




More information about the XEmacs-Beta mailing list