Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running emacs 23.2.1 on Cygwin on Windows 7. Yesterday, emacs-X11 was working fine; now it refuses to launch, instead exiting instantly with the error message "Arithmetic error". Running emacs-X11 -Q gives the same error. The exit status according to bash is 255, but it's 65280 (0xff00) according to Process Monitor.

I can run emacs-X11 --version and emacs-X11 --help just fine, but any attempt to open a window fails. I can also run emacs in batch mode (e.g. emacs-X11 -batch -f batch-byte-compile *.el).

Running the non-X11 version of emacs (emacs-nox, or equivalently DISPLAY= emacs; with DISPLAY set :0.0 as I have by default, emacs is equivalent to emacs-X11) also runs fine.

I can also run other X11 programs (e.g. xlogo) just fine.

Does anyone have any idea what might cause this or how I can fix it?

share|improve this question
I've had this problem intermittently as well on my work machine. Rebooting usually resolved it temporarily. – JohnMcG Oct 21 '10 at 16:51
up vote 1 down vote accepted

[I'd comment, but I don't have the reputation. :-( ]

I too have seen this problem running cygwin with emacs32 under X. When I start getting this, other GTK based programs running Cygwin-X also stop working (e.g. navit using gtk). The quick way I have found to resolve it is to restart the X server. [Rebooting is not needed.]


share|improve this answer
Hmm well I eventually had to reboot for an unrelated reason, and that seemed to fix the problem; I forgot to try just restarting X11 before rebooting. – Adam Rosenfield Oct 21 '10 at 21:36

Your Answer


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.