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?

  • I've had this problem intermittently as well on my work machine. Rebooting usually resolved it temporarily. – JohnMcG Oct 21 '10 at 16:51

[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.]


  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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