Emacs hangs up X11

Hi,

after running portupgrade -ay, I find that emacs, which was updated, hangs up my X11 when I start it. It receives no more keyboard or mouse input (clicks, although the mouse moves) until I kill emacs by logging into another shell or having telnet open.

The installed version of emacs is:
Code:
emacs-24.1.50.109364,1 GNU editing macros

I am running:
Code:
FreeBSD tirith 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012     root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

If I start emacs -nw it works perfectly.

I get several output warnings, like:
Code:
(emacs:2537): GLib-WARNING **: In call to g_spawn_sync(), exit status of a child process was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received by waitpid(), so exit status can't be returned. This is a bug in the program calling g_spawn_sync(); either don't request the exit status, or don't set the SIGCHLD action.
But I got those before too and Emacs did work. I get no other output.

The only strange thing I note is that while emacs is launched but frozen, PS will show:
# ps -x | grep dbus
Code:
 2542  ??  Is   0:00.00 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print
 2567   0  RL+  0:00.01 grep dbus
 2541   1  I+   0:00.00 dbus-launch --autolaunch=65bfd4339d47e8593bd3b21a000062
 2548   1  I+   0:00.01 dbus-launch --autolaunch=65bfd4339d47e8593bd3b21a000062

after I kill emacs, I only have:
# ps -x | grep dbus
Code:
 2569   0  RL+  0:00.01 grep dbus
 2541   1  S    0:00.00 dbus-launch --autolaunch=65bfd4339d47e8593bd3b21a000062

Any suggestions? I suppose dbus is acting up? I rebuilt and reinstalled dbus, just to be sure.

Riccardo
 
Looks familiair. There is a tread on the freebsd-ports mailing list about this. Don't know what the exact cause of the problems are but solutions for me were:
- Build emacs with options DBUS, GCONF and GSETTINGS turned off. After that emacs didn't lock up X anymore, but the gtk file chooser crashed emacs;
- Upgrade the base system to 9.1-PRERELEASE (= 9-STABLE), and emacs works fine. After this I build emacs again with the DBUS options turned on, and it still works ok.

Regards,
Marco
 
I hope upgrading is not a must... I suspect... I will try turning dbus support off too.
 
Building emacs without dbus solved this problem for me. If you want dbus you have to launch it properly. For example, put the line below in ~/.xinitrc.

Code:
exec ck-launch-session dbus-launch --exit-with-session fluxbox
 
This is a little off topic, but potentially helpful for those that want to reduce the port's dependencies. If you aren't running gnome and don't want GCONF and GSETTINGS and don't require ImageMagick support (MAGICK option) you might require many fewer dependencies. I think it was a difference of about 50 ports for me.
 
Turning DBUS and GCONF off helped me. I dont' run GNOME so it is not a big deal.

However, since before the update Emacs was running properly with those options and it launched dbus automatically, I think there is a bug.
 
Back
Top