all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rainer M Krug <Rainer@krugs.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 21428@debbugs.gnu.org
Subject: bug#21428: 24.5; Crash of emacs on OS X, installed via homebrew cask
Date: Fri, 23 Oct 2015 11:41:29 +0200	[thread overview]
Message-ID: <m2bnbpapme.fsf@krugs.de> (raw)
In-Reply-To: <831tcmu944.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Oct 2015 20:05:31 +0300")

[-- Attachment #1: Type: text/plain, Size: 4437 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Rainer M Krug <Rainer@krugs.de>
>> Cc: 21428@debbugs.gnu.org
>> Date: Thu, 22 Oct 2015 18:22:43 +0200
>> 
>> > That seems like an entirely different crash.
>> 
>> That is good to know - I was using emacs for quite some time and no crash.
>
> 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?
>> 
>> 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);
>  
> +  /* This is important if we are called by some Lisp as part of
> +     redisplaying the frame, see redisplay_internal.  */
> +  f->fonts_changed = true;
> +
>    recompute_basic_faces (f);
>  
>    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.  */
>  		= f->redisplay || !REDISPLAY_SOME_P ();
> +	      bool f_redisplay_flag = 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;
>  		    }
>  
> +		  /* 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.  */
>  
>      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;
>  
>        /* Prevent freeing of realized faces, since desired matrices are

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

  parent reply	other threads:[~2015-10-23  9:41 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 10:08 bug#21428: 24.5; Crash of emacs on OS X, installed via homebrew cask Rainer M Krug
2015-09-07 15:14 ` Eli Zaretskii
2015-09-07 17:46   ` Rainer M Krug
2015-09-08 18:16     ` Eli Zaretskii
2015-09-09  7:39       ` Rainer M Krug
2015-09-09  8:42       ` Rainer M Krug
2015-09-11  9:50         ` Rainer M Krug
2015-09-21  8:42           ` Rainer M Krug
2015-09-21  9:37             ` Eli Zaretskii
2015-09-21 10:00               ` Rainer M Krug
2015-09-21 10:19               ` Rainer M Krug
2015-09-21 10:25                 ` Eli Zaretskii
2015-09-21 11:00             ` Eli Zaretskii
     [not found]               ` <m27fnkroj5.fsf@krugs.de>
     [not found]                 ` <83y4g0m0js.fsf@gnu.org>
     [not found]                   ` <m2y4g0q7fs.fsf@krugs.de>
2015-09-21 13:18                     ` Eli Zaretskii
2015-09-21 13:27                       ` Rainer M Krug
2015-09-21 13:35                         ` Eli Zaretskii
2015-09-21 13:46                           ` Rainer M Krug
2015-09-23  8:41                           ` Rainer M Krug
2015-09-23  9:48                             ` Eli Zaretskii
2015-09-23 10:00                               ` Rainer M Krug
2015-09-24 13:22                               ` Rainer M Krug
2015-09-24 16:29                                 ` Eli Zaretskii
2015-09-24 17:22                                   ` Rainer M Krug
2015-09-24 18:23                                     ` Eli Zaretskii
2015-09-24 18:37                                       ` Rainer M Krug
2015-09-24 18:55                                         ` Eli Zaretskii
2015-09-25  9:34                                           ` Rainer M Krug
2015-09-25 10:01                                             ` Eli Zaretskii
2015-09-25 10:46                                               ` Rainer M Krug
2015-09-25 12:30                                                 ` Rainer M Krug
2015-09-25 14:39                                                   ` Eli Zaretskii
2015-09-28  9:33                                                     ` Rainer M Krug
2015-09-28 10:03                                                       ` Eli Zaretskii
2015-09-28 11:12                                                         ` Rainer M Krug
2015-09-28 11:27                                                           ` Rainer M Krug
2015-09-28 12:00                                                             ` Eli Zaretskii
2015-09-28 12:53                                                               ` Rainer M Krug
2015-09-28 13:14                                                             ` Eli Zaretskii
2015-09-28 15:39                                                               ` Rainer M Krug
2015-09-28 16:30                                                                 ` Rainer M Krug
2015-09-28 16:42                                                                   ` Eli Zaretskii
2015-09-29  6:58                                                                     ` Rainer M Krug
2015-09-29  7:22                                                                       ` Eli Zaretskii
2015-09-29  8:01                                                                         ` Rainer M Krug
2015-09-29  8:30                                                                           ` Eli Zaretskii
2015-09-29  8:52                                                                             ` Rainer M Krug
2015-09-29  9:52                                                                               ` Eli Zaretskii
2015-09-29 10:17                                                                                 ` Rainer M Krug
2015-09-29 10:50                                                                                   ` Eli Zaretskii
2015-09-29 11:16                                                                                     ` Rainer M Krug
2015-09-30  9:49                                                                                       ` Rainer M Krug
2015-09-30 10:06                                                                                         ` Eli Zaretskii
2015-09-30 10:36                                                                                           ` Rainer M Krug
2015-09-30 18:49                                                                                             ` Eli Zaretskii
2015-09-30 10:37                                                                                           ` Rainer M Krug
2015-09-30 19:38                                                                                             ` Eli Zaretskii
2015-10-01  7:29                                                                                               ` Rainer M Krug
2015-10-01  8:21                                                                                                 ` Rainer M Krug
2015-10-01  9:36                                                                                                   ` Eli Zaretskii
2015-10-01 10:45                                                                                                     ` Rainer M Krug
2015-10-06  8:16                                                                                                       ` Rainer M Krug
2015-10-06 16:47                                                                                                         ` Eli Zaretskii
2015-10-07  8:13                                                                                                           ` Rainer M Krug
2015-10-07 15:36                                                                                                             ` Eli Zaretskii
2015-10-07 16:10                                                                                                               ` Rainer M Krug
     [not found]                                                                                                                 ` <m2vba7dxds.fsf@krugs.de>
2015-10-16 18:12                                                                                                                   ` Eli Zaretskii
2015-10-16 19:22                                                                                                                     ` Rainer M Krug
2015-10-17 12:15                                                                                                                       ` Eli Zaretskii
2015-10-22 14:28                                                                                                                         ` Rainer M Krug
2015-10-22 15:43                                                                                                                           ` Eli Zaretskii
2015-10-22 16:22                                                                                                                             ` Rainer M Krug
2015-10-22 17:05                                                                                                                               ` Eli Zaretskii
2015-10-22 17:32                                                                                                                                 ` martin rudalics
2015-10-22 17:40                                                                                                                                   ` Eli Zaretskii
2015-10-22 18:14                                                                                                                                     ` martin rudalics
2015-10-22 20:04                                                                                                                                       ` Anders Lindgren
2015-10-22 20:08                                                                                                                                         ` Eli Zaretskii
2015-10-23  9:51                                                                                                                                           ` Rainer M Krug
2015-10-23 10:44                                                                                                                                             ` Anders Lindgren
2015-10-23 11:03                                                                                                                                               ` Rainer M Krug
2015-10-23  9:52                                                                                                                                           ` Rainer M Krug
2015-10-23  8:02                                                                                                                                         ` martin rudalics
2015-10-23 18:01                                                                                                                                         ` martin rudalics
2015-10-23  9:49                                                                                                                                       ` Rainer M Krug
2015-10-23 18:01                                                                                                                                         ` martin rudalics
2015-10-23  9:45                                                                                                                                   ` Rainer M Krug
2015-10-23 18:01                                                                                                                                     ` martin rudalics
2015-10-23  9:41                                                                                                                                 ` Rainer M Krug [this message]
2015-10-25 19:04                                                                                                                               ` Eli Zaretskii
2015-10-26  7:59                                                                                                                                 ` Rainer M Krug
2015-10-26 19:09                                                                                                                                   ` Eli Zaretskii
2015-10-27 11:50                                                                                                                                     ` Rainer M Krug
2015-09-28 11:58                                                           ` Eli Zaretskii
2015-09-23  8:58                           ` Rainer M Krug
2015-09-23  9:51                             ` Eli Zaretskii
2015-09-08 23:24     ` Glenn Morris
2015-09-09  7:39       ` Rainer M Krug
2015-09-09  4:32     ` Xue Fuqiao
2015-09-09  7:38       ` Rainer M Krug
2015-09-09 14:47 ` bug#21428: possible additional case for #21428: Emacs 24.5.1 on OSX, installed via homebrew Jason May

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2bnbpapme.fsf@krugs.de \
    --to=rainer@krugs.de \
    --cc=21428@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.