From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20802: Segfault when showing non-GTK+ tooltip Date: Thu, 18 Jun 2015 18:53:39 +0300 Message-ID: <83bngdko70.fsf@gnu.org> References: <1434187118.10061.4.camel@gmx.de> <83381wq76d.fsf@gnu.org> <557C0526.5050607@gmx.at> <831thfri91.fsf@gnu.org> <557C2EF2.5030308@gmx.at> <83vberpv07.fsf@gnu.org> <557C3E1F.6030305@gmx.at> <83twubpt43.fsf@gnu.org> <557D5EE9.7070902@gmx.at> <83h9qapee0.fsf@gnu.org> <55813F99.8070801@gmx.at> <83bngemgqv.fsf@gnu.org> <5582C990.5020009@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1434642882 22200 80.91.229.3 (18 Jun 2015 15:54:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Jun 2015 15:54:42 +0000 (UTC) Cc: tobias.getzner@gmx.de, 20802@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 18 17:54:28 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z5c8p-0003La-RK for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Jun 2015 17:54:11 +0200 Original-Received: from localhost ([::1]:53466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5c8p-0001Iq-DS for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Jun 2015 11:54:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5c8k-0001Ec-Ea for bug-gnu-emacs@gnu.org; Thu, 18 Jun 2015 11:54:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5c8g-0000lz-FB for bug-gnu-emacs@gnu.org; Thu, 18 Jun 2015 11:54:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5c8g-0000lv-Bd for bug-gnu-emacs@gnu.org; Thu, 18 Jun 2015 11:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z5c8f-0000zi-Q3 for bug-gnu-emacs@gnu.org; Thu, 18 Jun 2015 11:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jun 2015 15:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20802 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20802-submit@debbugs.gnu.org id=B20802.14346428373812 (code B ref 20802); Thu, 18 Jun 2015 15:54:01 +0000 Original-Received: (at 20802) by debbugs.gnu.org; 18 Jun 2015 15:53:57 +0000 Original-Received: from localhost ([127.0.0.1]:51225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z5c8a-0000zP-FF for submit@debbugs.gnu.org; Thu, 18 Jun 2015 11:53:56 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:58577) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z5c8X-0000zB-BW for 20802@debbugs.gnu.org; Thu, 18 Jun 2015 11:53:54 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NQ500J00DAH7500@mtaout28.012.net.il> for 20802@debbugs.gnu.org; Thu, 18 Jun 2015 18:53:22 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQ500BWNDGY8EA0@mtaout28.012.net.il>; Thu, 18 Jun 2015 18:53:22 +0300 (IDT) In-reply-to: <5582C990.5020009@gmx.at> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104098 Archived-At: > Date: Thu, 18 Jun 2015 15:37:20 +0200 > From: martin rudalics > CC: tobias.getzner@gmx.de, 20802@debbugs.gnu.org > > > Why can't we simply move the code that frees the image cache to > > delete_terminal? There's only one image cache for each terminal, and > > it's shared by all frames on that terminal, right? And we call > > delete-terminal when we delete the last frame on the terminal, right? > > ‘delete-terminal’ can run into precisely the same problem I described in > my previous scenario. IMHO we have to give up the idea of using > refcounts to tell whether a frame might still use some object - they are > not up to this task. These are 2 different issues. Do you agree that there's no need to decide whether we should free the image cache while deleting a frame, and instead do that when we delete a terminal? If you agree, we should move the code that frees the image cache there. If, in addition, you are saying that we will sometimes delete a terminal when it still has live frames, then we could simply count the frames on a terminal instead of using a refcount. Something like this (we already have similar code in delete_frame): count = 0; FOR_EACH_FRAME (tail, frame1) if (FRAME_TERMINAL (XFRAME (frame)) == FRAME_TERMINAL (XFRAME (frame1))) count++;