Subject: 24.3.50; Deleting frame and reconnecting to Emacs daemon results in blank frame

From: Ulrich Mueller <[email-masked]>
Date: Fri, 22 Mar 2013 21:07:27 +0100

With Emacs from Bzr linked against Motif 2.3.4, I get a blank frame
when connecting for the second time to a daemonised Emacs.

To reproduce:

   $ emacs -Q --daemon
   $ emacsclient -c
   Waiting for Emacs...

Up to here everything appears to be o.k.
Now I delete the frame and try to connect for a second time:

   C-x 5 0
   $ emacsclient -c
   Waiting for Emacs...
   *ERROR*: X protocol error: RenderBadPicture (invalid Picture parameter) on protocol request 138

This time, I get above error message and a blank Emacs frame. (For the
menu bar, the background colour is visible, but otherwise it is also
blank. The toolbar is not visible at all.) Sometimes the error appears
only when connecting to the daemon for the third time.

The problem disappears when I disable the menu bar ("M-x menu-bar-mode
RET" before doing "C-x 5 0" the first time).

In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, Motif Version 2.3.4)
 of 2013-03-22 on juno
Bzr revision: [email-masked]
Windowing system distributor `The X.Org Foundation', version 11.0.11400000
System Description:	Gentoo Base System release 2.2

Configured using:
 `configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --libdir=/usr/lib64
 --disable-dependency-tracking --program-suffix=-emacs-24-vcs
 --program-transform-name=s/emacs-[0-9].*/emacs-24-vcs/
 --infodir=/usr/share/info/emacs-24-vcs
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --with-gameuser=games --without-compress-info --without-hesiod
 --without-kerberos --without-kerberos5 --with-gpm --with-dbus
 --without-gnutls --with-inotify --with-acl --without-xml2
 --without-selinux --without-wide-int --with-sound --with-x
 --without-ns --without-gconf --without-gsettings
 --without-toolkit-scroll-bars --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xpm --with-imagemagick --with-xft
 --without-libotf --without-m17n-flt --with-x-toolkit=motif
 GENTOO_PACKAGE=app-editors/emacs-vcs-24.3.9999 EBZR_BRANCH=trunk
 EBZR_REVNO=112108 CFLAGS='-march=core2 -ggdb -O2 -pipe'
 LDFLAGS='-Wl,-O1 -Wl,--as-needed''

X resources (output of "appres Emacs"):
Emacs.geometry: 80x50-0-0
Emacs.font:	Droid Sans Mono-10
Emacs.foreground:	black
Emacs.background:	ivory
Emacs.cursorColor:	dark slate grey
Emacs.menuBar:	on
Emacs.scrollBarWidth:	8
Emacs.*.renderTable:	emacs
Emacs.*.renderTable.fontName:	Droid Sans
Emacs.*.renderTable.fontSize:	10
Emacs.*.renderTable.fontType:	FONT_IS_XFT
Emacs.pane.menubar.*.renderTable.fontStyle:	bold
*foreground:	black
*background:	ivory