emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] XCloseDisplay already calls XrmDestroyDatabase


From: İsmail Dönmez
Subject: Re: [PATCH] XCloseDisplay already calls XrmDestroyDatabase
Date: Wed, 20 Aug 2008 11:17:28 +0300

Hi again,

On Tue, Aug 19, 2008 at 13:19, İsmail Dönmez <address@hidden> 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.

Attachment: xrm2.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]