GNU Emacs crashes when iconified #emacs #fvwm

After installing a new emacs-snapshot package, suddenly Emacs started crashing when I iconified a window and moved the mouse over it.

The output in the terminal said something about an X Error, BadMatch and 42, which a quick search turned up was X_SetInputFocus().

I reported the problem on the emacs-devel mailing list, and also sent an inquiry to the gtk-list.

(I even tried shooting of a message to the fvwm mailing list, but it is probably awaiting moderator approval, as I didn't think to subscribe first.)

Then I dug around a little in the gtk sourcecode. It looks like gtk means to catch these errors, and that gtk2 succeeded while gtk3 doesn't. I can't tell why.

So I turned to the Emacs source code and tried discarding those error events there instead.

This lead to a trivial follow up patch that "solves" the problem by making Emacs discard BadMatch errors from X_SetInputFocus directly.

I don't think it is the right solution, but hopefully someone will pick up the thing and say what is.

Update: Nobody has responded, so I have proceeded to build packages from Julien Danjou's packages with my trivial patch applied - available in my local .deb repository.

Update 2: Jan Djärv committed a fix.

Add comment?



Email (won't be displayed online):


0.0231 s