Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I start emacs daemon with the following commnad.

$ emacs --daemon

This seems to work. After this I start emacs client as follows

$ emacsclient -c

Whenever I close the emacsclient, the server also stops with the following error.

X protocol error: BadWindow (invalid Window parameter) on protocol request 42
When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715
For details, see etc/PROBLEMS.
Fatal error (6)zsh: abort  

I have not found any information about this problem. Is there a way around this?

share|improve this question
    
how do you close the emacs client? With C-x C-c or C-x 5 0 –  Trudbert Nov 27 '12 at 13:49
    
I've tried both, the problem remains the same –  Silverrocker Nov 29 '12 at 17:38

1 Answer 1

up vote 5 down vote accepted

This is a known bug, FS#32423: emacsclient consistently crashes emacs. The bug has been reported to the Emacs authors. It is compounded by a Gtk bug. The following workarounds are reported to work:

  • Downgrading to Emacs 24.1 (instead of 24.2).
  • Downgrading Glib to 2.32 (instead of 2.34).
  • Compiling Emacs without Gtk (--with-x-toolkit=lucid).
  • Starting the daemon with no X connection available (try DISPLAY= emacs --daemon).

No actual solution seems to be known at this time.

This isn't something you can fix on your own unless you're a programmer and you're familiar with the technologies involved. Your best bet is to use one of the workarounds and keep watching the bug reports for a fix.

share|improve this answer
    
For what it's worth, I've tested option 4 with recent (ie: 24.3 release) builds of Emacs, and it does not work. I don't have GTK3 as an option, sadly, but GTK2 exhibits this behaviour irrespective of the DISPLAY state on launch; as near as I can tell from a read of the GTK bug, it's an issue with the client state tracking. –  Chris R Mar 11 '13 at 15:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.