From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Cibrario Bertolotti Newsgroups: gmane.emacs.bugs Subject: bug#23875: 25.0.95; Emacs crashes when closing a frame on OSX Date: Thu, 30 Jun 2016 21:34:04 +0200 Message-ID: <3C45BB04-687F-4587-A5BA-BCC715329692@polito.it> References: <481371E5-6A60-49C8-B707-33B5001747BA@polito.it> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1467315331 8236 80.91.229.3 (30 Jun 2016 19:35:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2016 19:35:31 +0000 (UTC) Cc: 23875@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 30 21:35:17 2016 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 1bIhk3-0006xa-T2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Jun 2016 21:35:16 +0200 Original-Received: from localhost ([::1]:52323 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIhk3-0006YI-6M for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Jun 2016 15:35:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIhjv-0006VP-B7 for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 15:35:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIhjq-0006zw-Uv for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 15:35:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIhjq-0006zW-RQ for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 15:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bIhjq-0008O6-HT for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 15:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Cibrario Bertolotti Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Jun 2016 19:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23875 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23875-submit@debbugs.gnu.org id=B23875.146731525432184 (code B ref 23875); Thu, 30 Jun 2016 19:35:02 +0000 Original-Received: (at 23875) by debbugs.gnu.org; 30 Jun 2016 19:34:14 +0000 Original-Received: from localhost ([127.0.0.1]:32829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIhj3-0008N1-U9 for submit@debbugs.gnu.org; Thu, 30 Jun 2016 15:34:14 -0400 Original-Received: from fm1nodo5.polito.it ([130.192.180.13]:56855) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIhj2-0008Mn-1p for 23875@debbugs.gnu.org; Thu, 30 Jun 2016 15:34:12 -0400 Original-Received: from polito.it (frontmail1.polito.it [130.192.180.41]) by fm1nodo5.polito.it with ESMTP id u5UJY538006495-u5UJY53A006495 (version=TLSv1.0 cipher=DHE-RSA-AES256-SHA bits=256 verify=CAFAIL); Thu, 30 Jun 2016 21:34:05 +0200 Original-Received: from [87.14.169.187] (account d011741@polito.it HELO [192.168.1.107]) by polito.it (CommuniGate Pro SMTP 6.1.9) with ESMTPSA id 107773353; Thu, 30 Jun 2016 21:34:05 +0200 In-Reply-To: X-Mailer: Apple Mail (2.3124) X-FEAS-SYSTEM-WL: 130.192.180.41 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:120238 Archived-At: Hello Alan, first of all, thank you so much for your help. > On 30 Jun 2016, at 20:50, Alan Third wrote: >=20 > Ivan Cibrario Bertolotti writes: >=20 >> Emacs occasionally crashes with a segmentation fault when deleting a >> frame on OSX. The crash occurs with low probability, I am sorry I >> cannot provide a detailed recipe to reproduce it at the moment. >=20 > Can you provide any information about what you're doing when it = crashes? > Are you just closing a frame with C-x 5 0? Sorry, I forgot to mention. Yes, that=E2=80=99s it. It seems that the = way the frame was created (C-x 5 2, C-x 5 f, or emacsclient) does not = make any difference. On the other hand (but this is just a wild guess given the low = probability of the crash) it seems that having another frame in = full-screen mode makes the crash more likely. In this case, emacs = switches from windowed to full-screen mode when the frame is closed. >> Looking at the crash report (at the bottom of this email) it seems to = me >> that an EmacsImage is being deallocated by autorelease after it has >> already been freed, thus causing a NULL pointer dereference. >>=20 >> Might this be another case of omitted bracketing with >> block_input()/unblock_input(), like in bug #23462? >=20 > It could be, but I don't think so. That one happened when the event > handler fired *within* the iconify function. I don't see anything in = the > stack trace that looks like that. That=E2=80=99s right, I stand corrected. >> I am now running Emacs with NSTRACE_ENABLED. If you have any better >> idea on how to gather more information, please let me know. I am >> willing to help. >=20 > I'm not sure how to go about debugging this stuff, but = NSZombiesEnabled > seems to be the way: >=20 > $ NSZombiesEnabled=3DYES /path/to/emacs.app/Contents/MacOS/Emacs >=20 > this should print out a message when an object is deallocated too many > times, instead of just crashing. > --=20 > Alan Third I understand, it looks nasty indeed and it happens on average only once = a day. Thank you for the hint. I will keep using Emacs with = NSTRACE_ENABLED and NSZombiesEnabled=3DYES. Will get back as soon as I = have more substantial information. Thanks again, Ivan