GNU bug report logs - #59794
29.0.60; NSport segfaults when a fullscreen frame is being closed

Previous Next

Package: emacs;

Reported by: Kai Ma <justksqsf <at> gmail.com>

Date: Sat, 3 Dec 2022 08:22:02 UTC

Severity: normal

Merged with 64147

Found in versions 29.0.60, 30.0.50

Done: Daniel Martín <mardani29 <at> yahoo.es>

Bug is archived. No further changes may be made.

Full log


Message #56 received at 59794 <at> debbugs.gnu.org (full text, mbox):

From: Kai Ma <justksqsf <at> gmail.com>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: Po Lu <luangruo <at> yahoo.com>,
 Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Eli Zaretskii <eliz <at> gnu.org>, 59794 <at> debbugs.gnu.org
Subject: Re: bug#59794: 29.0.60; NSport segfaults when a fullscreen frame is
 being closed)
Date: Sun, 4 Dec 2022 22:04:05 +0800
> On Dec 4, 2022, at 21:53, Daniel Martín <mardani29 <at> yahoo.es> wrote:
> 
> Kai Ma <justksqsf <at> gmail.com> writes:
> 
>> 
>> diff --git a/src/nsterm.m b/src/nsterm.m
>> index 507f2a9e7d..f99d7cde3c 100644
>> --- a/src/nsterm.m
>> +++ b/src/nsterm.m
>> @@ -6703,8 +6703,18 @@ - (BOOL)acceptsFirstResponder
>> 
>> - (void)resetCursorRects
>> {
>> -  NSRect visible = [self visibleRect];
>> -  NSCursor *currentCursor = FRAME_POINTER_TYPE (emacsframe);
>> +  NSRect visible;
>> +  NSCursor *currentCursor;
>> +
>> +  /* FIXME: [resetCursorRects:] can be called from the event loop
>> +     after the frame is deleted.  When this happens,
>> +     emacsframe->output_data is NULL.  This means there is an
>> +     underlying leak of the EmacsView object!  (bug#59794) */
>> +  if (! emacsframe || ! FRAME_OUTPUT_DATA (emacsframe))
> 
> Wouldn't it be more clear to check !FRAME_LIVE_P (emacsframe) instead?
> (I can't reproduce this bug, so I don't know if that would avoid the
> crash.)  There is a similar check in - (void)windowWillExitFullScreen
> and - (void)windowDidExitFullScreen, for example.


Indeed!  I can confirm this check also fixes the crash here.

Kai



This bug report was last modified 1 year and 335 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.