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: Thu, 01 Sep 2011 12:42:38 +0200 Message-ID: <87wrds35nl.fsf@thinkpad.tsdh.de> References: <87d3flnxoo.fsf@thinkpad.tsdh.de> <83fwkhdld0.fsf@gnu.org> <871uw04lr9.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1314873775 26311 80.91.229.12 (1 Sep 2011 10:42:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Sep 2011 10:42:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 01 12:42:51 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 1Qz4jQ-0003iv-OK for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2011 12:42:49 +0200 Original-Received: from localhost ([::1]:49663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz4jP-0000T9-Vx for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2011 06:42:47 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz4jM-0000Se-Uy for emacs-devel@gnu.org; Thu, 01 Sep 2011 06:42:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qz4jL-0002lU-SH for emacs-devel@gnu.org; Thu, 01 Sep 2011 06:42:44 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:36153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz4jK-0002kj-1z; Thu, 01 Sep 2011 06:42:42 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 722F4D2313; Thu, 1 Sep 2011 12:42:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at uni-koblenz.de Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HuB9zvkhtvzM; Thu, 1 Sep 2011 12:42:40 +0200 (CEST) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id D4B7DD2312; Thu, 1 Sep 2011 12:42:39 +0200 (CEST) In-Reply-To: (Eli Zaretskii's message of "Thu, 01 Sep 2011 06:27:21 -0400") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 141.26.64.15 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:143683 Archived-At: Eli Zaretskii writes: >> It turned out to be a crash, not something calling Fkill_emacs. Here's >> the backtrace: > > What about the Lisp backtrace? That would have been xbacktrace, right? Next time... > And since this is an optimized build, the backtrace is almost useless > anyway. Can you try reproducing this in an unoptimized build? That emacs was compiled with CFLAGS="-mtune=native -O1 -pipe -g -ggdb" and I'll try with -O0 the next time. >> #7 0x00000000004e157c in xg_display_close (dpy=0x6ca0020) at gtkutil.c:182 >> gdpy = 0xd682e0 >> #8 0x00000000004afc49 in x_delete_terminal (terminal=) >> at xterm.c:10607 >> dpyinfo = 0x698d3e0 >> #9 0x00000000004a40f2 in Fdelete_terminal (terminal=107998581, >> force=) at terminal.c:345 >> t = 0x66fed70 >> #10 0x00000000004235cc in delete_frame (frame=99991829, force=) >> at frame.c:1379 >> tmp = >> terminal = >> f = 0x5f5c110 >> sf = 0x121b7e0 >> kb = 0x0 >> minibuffer_selected = 0 >> tooltip_frame = 0 >> #11 0x000000000042382a in Fdelete_frame (frame=, >> force=) at frame.c:1516 > > This part does look as if Emacs was going to close the X display where > the frame was displayed. Were all other frames in that session on > other displays? No, there was exactly one single frame on the current display, and no TTY frames. Then I clicked some link to a txt file in the chromium browser, which fired up "emacsclient -c file.txt". So then I had exactly 2 X11 frames. Then I clicked the X knob of the frame brought up by the client, and that made emacs crash. > If not, how come Emacs is about to delete the terminal? Here's the > relevant code: > > if (terminal->reference_count == 0) > { > Lisp_Object tmp; > XSETTERMINAL (tmp, terminal); > > kb = NULL; > Fdelete_terminal (tmp, NILP (force) ? Qt : force); > } > > Can you look at the value of terminal->reference_count? In an unoptimized build, that should be in the backtrace, right? Bye, Tassilo