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: Tue, 16 Jun 2015 19:31:21 +0200 Message-ID: <55805D69.2060707@gmx.at> References: <1434187118.10061.4.camel@gmx.de> <83381wq76d.fsf@gnu.org> <1434439264.2078.6.camel@gmx.de> <558024F4.5090205@gmx.at> <1434468845.21431.2.camel@gmx.de> <83oakfmyq4.fsf@gnu.org> <1434472472.21431.4.camel@gmx.de> 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 1434475944 20421 80.91.229.3 (16 Jun 2015 17:32:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Jun 2015 17:32:24 +0000 (UTC) Cc: 20802@debbugs.gnu.org To: Tobias Getzner , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 16 19:32:12 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 1Z4uiY-0006BH-NS for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Jun 2015 19:32:10 +0200 Original-Received: from localhost ([::1]:41590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4uiY-000563-6E for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Jun 2015 13:32:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4uiU-00055y-Qp for bug-gnu-emacs@gnu.org; Tue, 16 Jun 2015 13:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4uiR-0001Ly-DW for bug-gnu-emacs@gnu.org; Tue, 16 Jun 2015 13:32:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4uiR-0001Lr-Ak for bug-gnu-emacs@gnu.org; Tue, 16 Jun 2015 13:32:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z4uiQ-0001Dy-UX for bug-gnu-emacs@gnu.org; Tue, 16 Jun 2015 13:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Jun 2015 17:32:02 +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.14344758954668 (code B ref 20802); Tue, 16 Jun 2015 17:32:02 +0000 Original-Received: (at 20802) by debbugs.gnu.org; 16 Jun 2015 17:31:35 +0000 Original-Received: from localhost ([127.0.0.1]:56102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4uhy-0001DE-Ky for submit@debbugs.gnu.org; Tue, 16 Jun 2015 13:31:34 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:52761) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4uhv-0001D0-Lt for 20802@debbugs.gnu.org; Tue, 16 Jun 2015 13:31:33 -0400 Original-Received: from [88.117.84.100] ([88.117.84.100]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0LrNoG-1YzVKK2tjw-0139DY; Tue, 16 Jun 2015 19:31:24 +0200 In-Reply-To: <1434472472.21431.4.camel@gmx.de> X-Provags-ID: V03:K0:qxoevH25QzMN2tXT/lftPDAJmPj8/HDVm9wdlnf8pEfYccAlY/y fp5IQFO/wI+FitivlCoch4YzVXhTdqcD6CrqXW+/kJPowvjuWWgqZdLHhZvpTVuM7E+fWrV d7GF0E0VxF9we8eZgrLPlu/FBgD5oLlsoQcxWKqvimt4TZGcXpAuWE0EnCMAOSvFy8UPOXL oEuARRmcl8Y3K4tLCHFEA== 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:104000 Archived-At: > Breakpoint 1, x_free_frame_resources (f=0x124fd70) at xterm.c:10970 > 10970 { > (gdb) bt > #0 x_free_frame_resources (f=0x124fd70) at xterm.c:10970 > #1 0x00000000004c9715 in unwind_create_frame (frame=19201397) at xfns.c:2842 > #2 0x00000000004c9759 in unwind_create_tip_frame (frame=) at xfns.c:4997 > #3 0x0000000000557b2e in unbind_to (count=, value=value@entry=0) at eval.c:3211 > #4 0x0000000000557cf9 in unwind_to_catch (catch=catch@entry=0x140a040, value=value@entry=19849283) > at eval.c:1157 > #5 0x00000000005592ed in Fsignal (error_symbol=error_symbol@entry=18624, data=) > at eval.c:1557 > #6 0x00000000005595f9 in xsignal (error_symbol=error_symbol@entry=18624, data=) > at eval.c:1581 > #7 0x0000000000559c6d in signal_error (s=s@entry=0x5e3d1d "Undefined color", arg=19849315, > arg@entry=34016084) at eval.c:1636 > #8 0x00000000004ccc57 in x_decode_color (f=, color_name=34016084, > mono_color=) at xfns.c:495 > #9 0x00000000004ce96c in x_set_foreground_color (f=0x124fd70, arg=34016084, oldval=) > at xfns.c:602 > #10 0x0000000000426ff6 in x_set_frame_parameters (f=f@entry=0x124fd70, alist=alist@entry=140737488338931) > at frame.c:3152 > #11 0x0000000000429ac7 in x_default_parameter (f=f@entry=0x124fd70, alist=alist@entry=19856675, > prop=prop@entry=22320, deflt=34090788, xprop=xprop@entry=0x5db8ca "foreground", > xclass=xclass@entry=0x5e3f61 "Foreground", type=RES_TYPE_STRING) at frame.c:4374 > #12 0x00000000004cd200 in x_create_tip_frame (dpyinfo=0x173c900, parms=19856675, parms@entry=19857043, > text=text@entry=34092084) at xfns.c:5181 > #13 0x00000000004cd94d in Fx_show_tip (string=34092084, frame=18429029, parms=19857043, timeout=42, dx=22, > dy=82) at xfns.c:5540 Why am I not surprised? xfns.c sets image_cache_refcount on line 5192, that is, after it processes the foreground parameter on line 5181 so probably line 5192 is not executed. I initially tried to set it right after the record_unwind_protect on line 5061 but that got me a(nother?) segfault as well. Funnily I coudn't get a crash after my patch. Can you try whether my conjecture is true by putting a breakpoint on line 5192 and check whether the refcount gets set there for the tooltip frame? If it isn't, then could you experimentally try to move the image_cache_refcount = FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0; #ifdef GLYPH_DEBUG dpyinfo_refcount = dpyinfo->reference_count; #endif /* GLYPH_DEBUG */ block from line 5192 somewhere up in the code, first before line 5172, later maybe a bit further up and check whether it helps? Thanks, martin