From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Ulrich Mueller <ulm@gentoo.org>
Cc: Jason Rumney <jasonr@gnu.org>, emacs-devel@gnu.org
Subject: Re: emacs --daemon and GDK default display
Date: Wed, 25 Mar 2009 20:21:04 +0100 [thread overview]
Message-ID: <49CA8420.7090000@swipnet.se> (raw)
In-Reply-To: <18888.50.303190.358177@a1ihome1.kph.uni-mainz.de>
Ulrich Mueller skrev:
>>>>>> On Mon, 23 Mar 2009, Jan Djärv wrote:
>
>> If I remember correctly, the display manager does not set a new
>> default display when the old is closed. There is some code for that
>> case i gtkutil.c.
>
>> But there was a bug in it. I don't know if that fixes anything, but
>> please try again.
>
> This wouldn't help, since the segmentation fault already happens in
> gdk_display_open, so it doesn't reach the code affected by your
> change of today.
>
>> Note that closing displays under Gtk+ is generally buggy in itself.
>> If you can capture a stack trace in the debugger
>
> A GDB backtrace is attached to our downstream bug at
> <http://bugs.gentoo.org/attachment.cgi?id=185188>. Unfortunately,
> without symbols in Emacs. ;-) But I think that there's enough
> information to see what is going on.
>
>> we should be able to tell if it is Gtk+ or Emacs that is doing the
>> wrong thing.
>
> There's definitely a problem in libcanberra which fails to check for a
> null pointer (already reported to its upstream).
Okay, now I see it in the stack trace Austin posted, thanks.
Emacs opens the first display, and that becomes the
default display. Then that display is closed, and there is no default
display. When a new display is opened, it does not become the default
display. The gdk_display_open function calls libcanberra before Emacs has a
chance to set the default display. Maybe this could be seen as a bug in Gtk+.
I see that the code in Gtk+ kind of assumes that once the default display is
open, it is never closed.
The module initialization, of which libcanberra is part, is triggered by the
display_opened signal. It should be possible to manipulate that signal so
it is either delayed or intercepted. However, I don't have libcanberra here
where I am currently. I'll be back at home in a couple of days, I'll try
something then.
>
> The question is if Emacs could do anything to work around the problem?
> I suppose you can't set a default display before calling
> gdk_display_open?
>
No, but if Emacs can catch the display_opened signal first it can set the
default display before libcanberra is called.
I am thinking of filing an Gtk+ bug on this, but I have to have the proper
setup myself first.
Jan D.
next prev parent reply other threads:[~2009-03-25 19:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-17 11:14 emacs --daemon and GDK default display Ulrich Mueller
2009-03-17 11:47 ` Jason Rumney
2009-03-23 9:28 ` Ulrich Mueller
2009-03-23 17:09 ` Jan Djärv
2009-03-23 21:33 ` Ulrich Mueller
2009-03-25 19:21 ` Jan Djärv [this message]
2009-03-28 15:49 ` Jan Djärv
2009-03-28 18:09 ` Ulrich Mueller
2009-03-24 1:11 ` Austin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49CA8420.7090000@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=emacs-devel@gnu.org \
--cc=jasonr@gnu.org \
--cc=ulm@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.