From: "İsmail Dönmez" <ismail@namtrac.org>
To: "emacs- devel" <emacs-devel@gnu.org>
Subject: Re: [PATCH] XCloseDisplay already calls XrmDestroyDatabase
Date: Wed, 20 Aug 2008 11:17:28 +0300 [thread overview]
Message-ID: <19e566510808200117y21e78086la6240ad72b676cd7@mail.gmail.com> (raw)
In-Reply-To: <19e566510808190319r454900a7sc3b5a4e9d6d68f95@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]
Hi again,
On Tue, Aug 19, 2008 at 13:19, İsmail Dönmez <ismail@namtrac.org> wrote:
> Hi,
>
> Running on Ubuntu's upcoming Intrepid release I experienced X crashes
> when I quit emacsclient. The gdb log shows XrmDestroyDatabase() is the
> failing line. Looking at
>
> src/xterm.c lines around about 10514:
>
> #ifndef USE_X_TOOLKIT /* I'm told Xt does this itself. */
> #ifndef AIX /* On AIX, XCloseDisplay calls this. */
> XrmDestroyDatabase (dpyinfo->xrdb);
> #endif
> #endif
>
> So this code assumes only on AIX XCloseDisplay itself calls
> XrmDestroyDatabase but this doesn't seem to be the case, looking at
> libX11 1.1.4 source code,
>
> src/OpenDis.c starting line 832:
>
> 822 /* if RM database was allocated by XGetDefault() free it */
> 823 if (dpy->db && (dpy->flags & XlibDisplayDfltRMDB))
> 824 XrmDestroyDatabase(dpy->db);
>
> this is from the _XFreeDisplayStructure() function and the function
> documentation says:
>
>
> /* XFreeDisplayStructure frees all the storage associated with a
> * Display. It is used by XOpenDisplay if it runs out of memory,
> * and also by XCloseDisplay.
> ....
> */
>
> So looks like there is no need to manually call XrmDestroyDatabase()
> anymore, attached patch removes it.
Actually correct solution is to disable XrmDestroyDatabase() call for
GTK+ as done for Xt. See attached patch.
Regards,
ismail
--
Programmer Excuse #4: It's too complicated for you to understand.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: xrm2.patch --]
[-- Type: text/x-diff; name=xrm2.patch, Size: 455 bytes --]
diff --git a/src/xterm.c b/src/xterm.c
index a32f4e1..9b9b976 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10514,7 +10514,7 @@ x_delete_display (dpyinfo)
tail->next = tail->next->next;
}
-#ifndef USE_X_TOOLKIT /* I'm told Xt does this itself. */
+#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) /* Xt and GTK does this by itself */
#ifndef AIX /* On AIX, XCloseDisplay calls this. */
XrmDestroyDatabase (dpyinfo->xrdb);
#endif
next prev parent reply other threads:[~2008-08-20 8:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 10:19 [PATCH] XCloseDisplay already calls XrmDestroyDatabase İsmail Dönmez
2008-08-20 8:17 ` İsmail Dönmez [this message]
2008-08-21 18:40 ` İsmail Dönmez
2008-08-21 19:43 ` Chong Yidong
2008-07-20 20:51 ` bug#581: 23.0.60; OSX: server crashes when quitting emacsclient Markus Triska
[not found] ` <handler.581.B.121658711315039.ack@emacsbugs.donarmstrong.com>
2008-08-08 12:08 ` bug#581: Acknowledgement (23.0.60; OSX: server crashes when quitting emacsclient) Markus Triska
2008-08-09 1:02 ` OFFICE ZERO
2008-08-09 14:12 ` OFFICE ZERO
2008-08-21 19:50 ` bug#581: marked as done " Emacs bug Tracking System
2009-05-13 3:27 ` [PATCH] XCloseDisplay already calls XrmDestroyDatabase YAMAMOTO Mitsuharu
2009-05-13 23:48 ` YAMAMOTO Mitsuharu
2009-05-17 21:40 ` Stefan Monnier
2009-05-18 8:09 ` YAMAMOTO Mitsuharu
2009-05-18 13:29 ` Chong Yidong
2009-05-17 21:40 ` Stefan Monnier
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=19e566510808200117y21e78086la6240ad72b676cd7@mail.gmail.com \
--to=ismail@namtrac.org \
--cc=emacs-devel@gnu.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.