From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Killing a frame sometimes kills emacs Date: Tue, 11 Oct 2011 21:17:22 +0200 Message-ID: <877h4bs5h9.fsf@thinkpad.tsdh.de> References: <87d3flnxoo.fsf@thinkpad.tsdh.de> <83fwkhdld0.fsf@gnu.org> <871uw04lr9.fsf@thinkpad.tsdh.de> <87sjog35jj.fsf@thinkpad.tsdh.de> <4E5F7ECD.9060601@swipnet.se> <838vq8e0x5.fsf@gnu.org> <87sjn03tzx.fsf@thinkpad.tsdh.de> <87sjmzbmvv.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1318360663 27556 80.91.229.12 (11 Oct 2011 19:17:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Oct 2011 19:17:43 +0000 (UTC) Cc: Ulrich Mueller , emacs-devel@gnu.org, schwab@linux-m68k.org, Stefan Monnier , Eli Zaretskii , "Jan D." To: James Cloos Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 11 21:17:36 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RDhpX-0000cP-2N for ged-emacs-devel@m.gmane.org; Tue, 11 Oct 2011 21:17:35 +0200 Original-Received: from localhost ([::1]:39787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDhpW-00051o-Hv for ged-emacs-devel@m.gmane.org; Tue, 11 Oct 2011 15:17:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDhpT-0004y1-QD for emacs-devel@gnu.org; Tue, 11 Oct 2011 15:17:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDhpS-0001pc-JI for emacs-devel@gnu.org; Tue, 11 Oct 2011 15:17:31 -0400 Original-Received: from out4.smtp.messagingengine.com ([66.111.4.28]:54797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDhpP-0001oW-3h; Tue, 11 Oct 2011 15:17:27 -0400 Original-Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 1061721E4F; Tue, 11 Oct 2011 15:17:26 -0400 (EDT) Original-Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 11 Oct 2011 15:17:26 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:references:date :in-reply-to:message-id:mime-version:content-type; s=smtpout; bh=6X8XEo0Na74BzbkDxir698ZkBWg=; b=M9REZsH4GTBQu/1aGwbqQFbVYKR5 H5dFd0xZst1kLd2+EHUstreIA3G31lgAvRsMmcowHNZfn7RGYVpUFC1UhX63AZpi SHkQSlMRs2pMqbl9cFSg9F3CgNBFVx3yu/njKpIY0jXqO7s+G4DjZ0bL72RDf2cM OSVLkzoBrKd8qks= X-Sasl-enc: Td9LiTY3RfMQacAm2fGANcfm67s2vuP5CnYri6CzkIyg 1318360645 Original-Received: from thinkpad.tsdh.de (91-67-169-145-dynip.superkabel.de [91.67.169.145]) by mail.messagingengine.com (Postfix) with ESMTPSA id F0456403442; Tue, 11 Oct 2011 15:17:23 -0400 (EDT) In-Reply-To: (James Cloos's message of "Tue, 11 Oct 2011 13:38:02 -0400") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144907 Archived-At: James Cloos writes: > TH> So as soon as I mix these two invocation styles, (x-display-list) > TH> returns (":0" ":0.0"). Those displays are different, and when I > TH> delete the last frame on one of the (equivalent) displays, emacs > TH> (including the original frames on the other displays) are killed. > > It seems, then, that emacs needs to canonicalize the DISPLAY strings > before comparing them. It's not that emacs kills itself. It segfaults probably because gtk deletes/frees the display while emacs is still using it. (Well, or something like that...) Oh, checking the backtrace I've posted at the beginning of this thread, I've found this code in gtkutil.c: --8<---------------cut here---------------start------------->8--- #if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 10 /* GTK 2.2-2.8 has a bug that makes gdk_display_close crash (bug http://bugzilla.gnome.org/show_bug.cgi?id=85715). This way we can continue running, but there will be memory leaks. */ g_object_run_dispose (G_OBJECT (gdpy)); #else /* This seems to be fixed in GTK 2.10. */ gdk_display_close (gdpy); #endif } --8<---------------cut here---------------end--------------->8--- That's already the right workaround, isn't it? The only thing is that this bug is *not* fixed in GTK 2.10 but instead still exists (or exists again) in GTK 3.2.0. Bye, Tassilo