From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rainer M Krug Newsgroups: gmane.emacs.bugs Subject: bug#21428: 24.5; Crash of emacs on OS X, installed via homebrew cask Date: Fri, 23 Oct 2015 11:41:29 +0200 Message-ID: References: <83k2r8b4rr.fsf@gnu.org> <834mibbstw.fsf@gnu.org> <83k2r79bi5.fsf@gnu.org> <834mi4x7tp.fsf@gnu.org> <83fv1mellz.fsf@gnu.org> <1130CA27-B8B0-4009-BC14-A3FC76B92216@gmail.com> <838u7265sv.fsf@gnu.org> <83pp0d4rot.fsf@gnu.org> <83611yucx0.fsf@gnu.org> <831tcmu944.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1445593343 24938 80.91.229.3 (23 Oct 2015 09:42:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Oct 2015 09:42:23 +0000 (UTC) Cc: 21428@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 23 11:42:14 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 1ZpYrV-0002o4-22 for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Oct 2015 11:42:13 +0200 Original-Received: from localhost ([::1]:37204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpYrU-0005NA-7r for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Oct 2015 05:42:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpYrP-0005N0-Dy for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2015 05:42:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpYrK-000821-Td for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2015 05:42:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpYrK-00081x-QT for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2015 05:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZpYrK-0002nI-Ge for bug-gnu-emacs@gnu.org; Fri, 23 Oct 2015 05:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rainer M Krug Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Oct 2015 09:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21428 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 21428-submit@debbugs.gnu.org id=B21428.144559332010732 (code B ref 21428); Fri, 23 Oct 2015 09:42:02 +0000 Original-Received: (at 21428) by debbugs.gnu.org; 23 Oct 2015 09:42:00 +0000 Original-Received: from localhost ([127.0.0.1]:33807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZpYrH-0002n1-Et for submit@debbugs.gnu.org; Fri, 23 Oct 2015 05:42:00 -0400 Original-Received: from mail-wi0-f179.google.com ([209.85.212.179]:36484) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZpYqw-0002mK-Qr for 21428@debbugs.gnu.org; Fri, 23 Oct 2015 05:41:57 -0400 Original-Received: by wicfx6 with SMTP id fx6so23312064wic.1 for <21428@debbugs.gnu.org>; Fri, 23 Oct 2015 02:41:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=0yTdF+UzXFW10NdSySqO0aZcBWVU1nbZUj7nO8U8LYE=; b=L9FG6gZWqHn+Zb+UwGzTNJvXTV+thGOXuSVH+q+BDksVkAbBiKEqGfWtUZ6OOs4yB+ kFHbTGsEKKKUrqCLlPq8eM47S9dGZ3zj8vgou4mLj+2zaK4u1Nf/tZHEAaArGUqNe0n2 Lb4ZifDBKOkrkkYIto9pXKMwSWMpspZlY0WDY23a/4Kt91ZmU1d7592PWPfeUJ5kqCJe rMdveO+JQh8HXlFJKP3UzOsme/HCVXDK/l06NaV5dpZLN5dQBIYYwEqgvSt4AjAcPvhI NxbDrp/jtUntYiyquoa+GIHUeqAAngyf42BiT1e8Taz87CQgJBmOPznamCbmc87ih33w 1PIA== X-Received: by 10.194.186.238 with SMTP id fn14mr3836066wjc.128.1445593298097; Fri, 23 Oct 2015 02:41:38 -0700 (PDT) Original-Received: from Rainers-MacBook-Pro.local ([2a01:e35:8baa:b070:f808:c9d0:d5e8:af60]) by smtp.gmail.com with ESMTPSA id p18sm2307618wik.21.2015.10.23.02.41.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Oct 2015 02:41:36 -0700 (PDT) In-Reply-To: <831tcmu944.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Oct 2015 20:05:31 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) 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: 208.118.235.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:107901 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: Rainer M Krug >> Cc: 21428@debbugs.gnu.org >> Date: Thu, 22 Oct 2015 18:22:43 +0200 >>=20 >> > That seems like an entirely different crash. >>=20 >> That is good to know - I was using emacs for quite some time and no cras= h. > > Great! I'd like you to run it for a few more days. You could run it > regularly, not under GDB, because I think the bug for which the GDB > setup was created will not happen anymore. Ok. - I will still run it under gdb, but not running the script. SO I can get backtraces if necessary. > >> Would it be possible to backport the changes which caused this error to >> the 24 branch? > > Try the patch below (it should apply with some differences in line > numbers). I cannot make any promises (the display code changed quite > a bit since then), but on first sight it looks like this should work > with Emacs 24. Thanks - I will look at that after some further testing of 25. > >> > Can you see what caused >> > it (is emacsframe a NULL pointer or something?), and also show a >> > backtrace? >>=20 >> Is this the info you are looking for: I am using emacs almost >> exclusively in full-screen view. > > Yes, but I'm afraid I cannot interpret it. Martin, any insights? > > Thanks. Thanks a lot for all your help, Rainer > > diff --git a/src/frame.c b/src/frame.c > index 98a7a57..6d596a4 100644 > --- a/src/frame.c > +++ b/src/frame.c > @@ -3651,6 +3651,10 @@ x_set_font (struct frame *f, Lisp_Object arg, Lisp= _Object oldval) > /* Attempt to hunt down bug#16028. */ > SET_FRAME_GARBAGED (f); >=20=20 > + /* This is important if we are called by some Lisp as part of > + redisplaying the frame, see redisplay_internal. */ > + f->fonts_changed =3D true; > + > recompute_basic_faces (f); >=20=20 > do_pending_window_change (0); > diff --git a/src/xdisp.c b/src/xdisp.c > index a793157..986e13f 100644 > --- a/src/xdisp.c > +++ b/src/xdisp.c > @@ -13810,6 +13810,7 @@ redisplay_internal (void) > bool gcscrollbars > /* Only GC scrollbars when we redisplay the whole frame. */ > =3D f->redisplay || !REDISPLAY_SOME_P (); > + bool f_redisplay_flag =3D f->redisplay; > /* Mark all the scroll bars to be removed; we'll redeem > the ones we want when we redisplay their windows. */ > if (gcscrollbars && FRAME_TERMINAL (f)->condemn_scroll_bars_hook) > @@ -13853,6 +13854,20 @@ redisplay_internal (void) > goto retry_frame; > } >=20=20 > + /* If the frame's redisplay flag was not set before > + we went about redisplaying its windows, but it is > + set now, that means we employed some redisplay > + optimizations inside redisplay_windows, and > + bypassed producing some screen lines. But if > + f->redisplay is now set, it might mean the old > + faces are no longer valid (e.g., if redisplaying > + some window called some Lisp which defined a new > + face or redefined an existing face), so trying to > + use them in update_frame will segfault. > + Therefore, we must redisplay this frame. */ > + if (!f_redisplay_flag && f->redisplay) > + goto retry_frame; > + > /* Prevent various kinds of signals during display > update. stdio is not robust about handling > signals, which can cause an apparent I/O error. */ > @@ -13906,8 +13921,10 @@ redisplay_internal (void) > /* Compare desired and current matrices, perform output. */ >=20=20 > update: > - /* If fonts changed, display again. */ > - if (sf->fonts_changed) > + /* If fonts changed, display again. Likewise if redisplay_window_1 > + above caused some change (e.g., a change in faces) that requires > + considering the entire frame again. */ > + if (sf->fonts_changed || sf->redisplay) > goto retry; >=20=20 > /* Prevent freeing of realized faces, since desired matrices are =2D-=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,= UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJWKgDOAAoJENvXNx4PUvmCfAwH/2t3Yb/DlOC2lJuLmDmbxWaQ ba6OjnklN7ObOw419R1b7SuuxNXWr9i2K+TYxgr4jbvcSobREwmLBOoJNyY+oDaz emejh/jp17h17eiFYtBfoyoIT7mHGaxNwIn6Nrq13ts/wyG1x7CJa18z/MuPkMlZ t8UYLhxZAruBYUvg28Hs9XNF3Jn7f5zSfVO31G+cm/vCsmdOeonRWbJYpzfJEAGI E4B9+AiU0Vr+dU/lB1wIT6cHc8j5tHzzV4IBNQ3ehCxWbExBTjXlSM6W+rX2rcbT rZ6Hpykj1/vqSIIpZKrQG6EXpaH7kvXi7CkLr6KaHHpnaP9in6qRHK3rLjP24b8= =/U3x -----END PGP SIGNATURE----- --=-=-=--