From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel =?UTF-8?Q?Mart=C3=ADn?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59794: 29.0.60; NSport segfaults when a fullscreen frame is being closed) Date: Sun, 04 Dec 2022 14:53:45 +0100 Message-ID: References: <835yerd5gb.fsf@gnu.org> <87ilirr0uq.fsf@yahoo.com> <83ilirbh68.fsf@gnu.org> <87a643qt09.fsf@yahoo.com> <838rjnbbqc.fsf@gnu.org> <0137C1CC-0AEC-4790-85E6-D1AD987A63E1@gmail.com> Reply-To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12376"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) Cc: Po Lu , Gerd =?UTF-8?Q?M=C3=B6llmann?= , Eli Zaretskii , 59794@debbugs.gnu.org To: Kai Ma Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 04 14:54:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p1pRh-00031L-KJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Dec 2022 14:54:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1pRV-0002s6-65; Sun, 04 Dec 2022 08:54:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1pRS-0002rQ-Un for bug-gnu-emacs@gnu.org; Sun, 04 Dec 2022 08:54:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1pRS-0007L8-JA for bug-gnu-emacs@gnu.org; Sun, 04 Dec 2022 08:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p1pRS-0008PZ-Eb for bug-gnu-emacs@gnu.org; Sun, 04 Dec 2022 08:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Dec 2022 13:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59794 X-GNU-PR-Package: emacs Original-Received: via spool by 59794-submit@debbugs.gnu.org id=B59794.167016203932325 (code B ref 59794); Sun, 04 Dec 2022 13:54:02 +0000 Original-Received: (at 59794) by debbugs.gnu.org; 4 Dec 2022 13:53:59 +0000 Original-Received: from localhost ([127.0.0.1]:57808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1pRO-0008PJ-MP for submit@debbugs.gnu.org; Sun, 04 Dec 2022 08:53:58 -0500 Original-Received: from sonic303-20.consmr.mail.ir2.yahoo.com ([77.238.178.201]:46460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1pRM-0008P9-3r for 59794@debbugs.gnu.org; Sun, 04 Dec 2022 08:53:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1670162028; bh=S7xOA4be0+PNApXlyuTV/toHsNhcu+h69TTz+Yw6fAA=; h=From:To:Cc:Subject:References:Date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xjsDFhq3cC2.t9CtfYtxyXyExSuSiV4AQossZ pLUC0O8UIc40V794Mo1ewLc1O8pOipMHw0TdkVOvNr.5Qb9euw59hto0txh72fJU8EDA_Mf0dMh1 xgwkxRq_rSJgtR2duy4UMu3Q_MSPAeMmZNpLJQIXIgmfbPFxnSPlvsKzGh8LWeUZAYYO8Xq6vHVs OBmwcZVJqMU73kRqgO7jO9lQbChKZiZlNlr7FacofwVuFLp6C.Pgp6zYc_HkscvdjdZDysSIHn4l tTiaOS2qHuOVoZlRh83.wA0F01ck83UaHA2ubSleqgJHYyVI7fpk2Am3t1pX2bKTRrNaHWPxYrK8 6ZS1R13k3kapYy_N3mPU53zWVWQg0WSuHpZrteQWcL9oAsyeaZjTP7z5UfjOY7RqBkYnOBz2rUSq SAUWdCsr8.BPt7Lzdl4ZBUP56LeyaW4fFqRPN8SPqpUld0495Wzam.dnV2soTvdjbZWecwwQ6GIV jYWvZSdAP5v_Rtv1dnhaTF7xnxA2mZadeja1QcKavw5HFS7ShRI7NeT82mIuduBycdT5UK4c2Ba. HssXN58Eto.xHFOWdh1RYoezzX8.pxP2UVrY_IhW8F8giScxPRkTuavOa_giOV9l.8_V935ibb0Z zYC251AHT0i.ub6aZs4NZR9p32lvYy2FofHMRiY.0Z X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ir2.yahoo.com with HTTP; Sun, 4 Dec 2022 13:53:48 +0000 Original-Received: by hermes--production-ir2-5795fc58c8-n8czn (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 0027ac5b2adc86d13d6f3ccfc73c21ff; Sun, 04 Dec 2022 13:53:46 +0000 (UTC) In-Reply-To: <0137C1CC-0AEC-4790-85E6-D1AD987A63E1@gmail.com> (Kai Ma's message of "Sun, 4 Dec 2022 20:45:12 +0800") X-Mailer: WebService/1.1.20926 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249941 Archived-At: Kai Ma 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.