From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#20802: Segfault when showing non-GTK+ tooltip Date: Mon, 15 Jun 2015 18:00:55 +0200 Message-ID: <557EF6B7.3000701@gmx.at> 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> <557E8B50.80905@gmx.at> <83zj41nhg9.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1434384243 32533 80.91.229.3 (15 Jun 2015 16:04:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Jun 2015 16:04:03 +0000 (UTC) Cc: tobias.getzner@gmx.de, 20802@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 15 18:03:51 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 1Z4WrU-0003mv-VC for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 18:03:49 +0200 Original-Received: from localhost ([::1]:35139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4WrU-0003cK-5k for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 12:03:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Wpu-0000jY-6T for bug-gnu-emacs@gnu.org; Mon, 15 Jun 2015 12:02:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4Wpn-0005Mi-LD for bug-gnu-emacs@gnu.org; Mon, 15 Jun 2015 12:02:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Wpn-0005Mc-Hk for bug-gnu-emacs@gnu.org; Mon, 15 Jun 2015 12:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z4Wpn-00005o-DH for bug-gnu-emacs@gnu.org; Mon, 15 Jun 2015 12:02:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jun 2015 16:02:03 +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.143438407132734 (code B ref 20802); Mon, 15 Jun 2015 16:02:03 +0000 Original-Received: (at 20802) by debbugs.gnu.org; 15 Jun 2015 16:01:11 +0000 Original-Received: from localhost ([127.0.0.1]:54876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4Wow-0008Vu-HV for submit@debbugs.gnu.org; Mon, 15 Jun 2015 12:01:10 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:56460) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4Wot-0008VV-Ka for 20802@debbugs.gnu.org; Mon, 15 Jun 2015 12:01:08 -0400 Original-Received: from [178.190.21.103] ([178.190.21.103]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0M6SE3-1ZF2Jd1yax-00ySQN; Mon, 15 Jun 2015 18:00:58 +0200 In-Reply-To: <83zj41nhg9.fsf@gnu.org> X-Provags-ID: V03:K0:3ygWe03tFgyZRa1kcWfw7vYhpkETwD3xm1EQVCZmpuI0jfqerKP yRKH25OnIVl2lcHqGUNejXuAmuoVlMTIxKAQA++dhcltLBCjkTkNqFAJsV4it8e8ypCW+o2 Nlkw8IocQGaDedMxlpdUPw+W+Wp8KWobrb3FkGQzM4XujRGv60OQJWOZauXvfUpPPuzJB40 Xa/fOITnflrA3EwEN7kUQ== X-UI-Out-Filterresults: notjunk:1; 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:103965 Archived-At: >> How are these supposed to >> work when GLYPH_DEBUG is not defined? > > It cannot, obviously. Bug#17524 was reported in the GLYPH_DEBUG code: > the assertion there segfaulted when it tried to access the image > cache. So the code was fixed only for that situation. Hmmm ... you should have told Michael back then. You clairvoyantly identified the problem then as ... But the real problem is that call to x_free_frame_resources, which eventually calls free_frame_faces, which decrements the image-cache refcount and frees the image cache, because the refcount goes to zero. ... but the recipe ... So I think the X version needs the same change I made in w32fns.c in revision 117131, modulo the changes to the assertions. ... was misleading because the bug was triggerd without violating an assertion. I doubt that Michael then build with glyph debugging enabled because otherwise his fix should have helped indeed. > IOW, that bug was mentioned as a source of ideas, not as something to > copy verbatim to xfns.c. Sorry if I was unclear about that. OK. One last question: In struct image_cache we specify refcount as ptrdiff_t while w32fns.c defines image_cache_refcount as int. Both xfns.c and nsfns.m define image_cache_refcount as ptrdiff_t. Shouldn't we uniquify this? martin