From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#58857: 28.2; Emacs on macOS seg faults when deleting fullscreen frame Date: Sat, 29 Oct 2022 09:39:17 +0300 Message-ID: <83wn8ji162.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22810"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58857@debbugs.gnu.org To: Kevin Lin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 29 08:40:14 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 1oofVt-0005mg-Nc for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Oct 2022 08:40:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oofVo-0006Tq-Vd; Sat, 29 Oct 2022 02:40:09 -0400 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 1oofVi-0006S7-Dw for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2022 02:40:02 -0400 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 1oofVi-0002b1-6Q for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2022 02:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oofVh-0002n9-U7 for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2022 02:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Oct 2022 06:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58857 X-GNU-PR-Package: emacs Original-Received: via spool by 58857-submit@debbugs.gnu.org id=B58857.166702557010687 (code B ref 58857); Sat, 29 Oct 2022 06:40:01 +0000 Original-Received: (at 58857) by debbugs.gnu.org; 29 Oct 2022 06:39:30 +0000 Original-Received: from localhost ([127.0.0.1]:34842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oofVB-0002mH-Kf for submit@debbugs.gnu.org; Sat, 29 Oct 2022 02:39:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oofV8-0002m3-WA for 58857@debbugs.gnu.org; Sat, 29 Oct 2022 02:39:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oofV3-0002UQ-0i; Sat, 29 Oct 2022 02:39:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=l84BRMuFHQCuVOI1j+/x6XIsahGOf4E9yMt5+FM2ei4=; b=AC45TDdgR3+e o70fd5T1h3T9khL9867I6dVl6e3I5zP2p6aCpTvU5Dl08GlBe1/9SJxMJLsSmOwM/7PgX+AB6+0tm hwMMbe+84kOjHG59p99no/0vrKS23ndOANc+IH8OhTeKb6mVZndRyUGwdjB0RGm8k1caZT3MAkdoP R+maA0186iTlv1I3sOH74vDeykfnsp6+Zy5ljeUat69hxBK5Q5I++5qM6J/hUV+MPcSkkfDXoKUH9 d+l7N38Ox61RpjR1UYb+dmRB9gTonM8y9mR5pdgEEQOobddPdxmk66ospsaZELZEdfnMUGhkU0p32 GgDldcPLxtJ2iwpVXCStcg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oofV1-0004h9-5q; Sat, 29 Oct 2022 02:39:20 -0400 In-Reply-To: (message from Kevin Lin on Fri, 28 Oct 2022 10:59:16 -0700) 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246490 Archived-At: > From: Kevin Lin > Date: Fri, 28 Oct 2022 10:59:16 -0700 > > Using stock Emacs 28.2 from https://emacsformacosx.com/: This distribution is done by someone outside of the Emacs project. I therefore suggest that you first report the problem to that person. > 1) $ /Applications/Emacs.app/Contents/MacOS/Emacs -Q > > 2) open a second frame by, e.g., C-X-5-2 > > 3) make it fullscreen, e.g., by clicking the green title button > > 4) delete the fullscreened frame by, e.g., C-X-5-0 > > I don't know enough about ObjC or NS to isolate the issue in the ObjC source, but the following work-around works for me: > > (defun frame-turn-off-fullscreen (theframe) > (if (eq 'fullboth > (cdr (assq 'fullscreen > (frame-parameters theframe)))) > (set-frame-parameter theframe 'fullscreen nil))) > > (if (boundp 'ns-use-native-fullscreen) > (add-to-list 'delete-frame-functions 'frame-turn-off-fullscreen)) > > I haven't tried this with Emacs in gdb, but do have macOS-generated crash logs I can send along upon request. > > Also, I'm running this on macOS 13 (Ventura), but this has happened to me since macOS 10.13 (High Sierra) with Emacs 27 (possibly even earlier). Reporting it only now because the work-around above has worked for me and I forgot about it. In general, we don't expect any Emacs 28 releases, so it would be of great help to us if you could try Emacs 29 (from the master branch of the Emacs Git repository) and see if the problem still exists there. That's assuming the person who prepares these binaries concludes that the problem is in the upstream code, not related to the particular way these binaries are built. Thanks.