From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.bugs Subject: bug#23462: 25.0.93; Crash on OS X when suspending main frame Date: Tue, 10 May 2016 23:57:47 +0200 Message-ID: References: <82D6EB3D-6383-430B-BBC9-DEC216F0C33A@polito.it> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c12355efa1c3e05328403ab X-Trace: ger.gmane.org 1462917502 9809 80.91.229.3 (10 May 2016 21:58:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 May 2016 21:58:22 +0000 (UTC) Cc: 23462@debbugs.gnu.org, Alan Third To: Ivan Cibrario Bertolotti Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 10 23:58:15 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 1b0FfS-0001DE-7q for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 May 2016 23:58:14 +0200 Original-Received: from localhost ([::1]:49364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0FfR-0001zE-O6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 May 2016 17:58:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0FfJ-0001sN-Og for bug-gnu-emacs@gnu.org; Tue, 10 May 2016 17:58:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0FfG-0002OQ-D7 for bug-gnu-emacs@gnu.org; Tue, 10 May 2016 17:58:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0FfG-0002OH-6H for bug-gnu-emacs@gnu.org; Tue, 10 May 2016 17:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b0FfG-0001R9-2R for bug-gnu-emacs@gnu.org; Tue, 10 May 2016 17:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 May 2016 21:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23462 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23462-submit@debbugs.gnu.org id=B23462.14629174765511 (code B ref 23462); Tue, 10 May 2016 21:58:02 +0000 Original-Received: (at 23462) by debbugs.gnu.org; 10 May 2016 21:57:56 +0000 Original-Received: from localhost ([127.0.0.1]:46378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0Ff9-0001Qp-Tb for submit@debbugs.gnu.org; Tue, 10 May 2016 17:57:56 -0400 Original-Received: from mail-vk0-f41.google.com ([209.85.213.41]:36791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0Ff7-0001Qa-7C for 23462@debbugs.gnu.org; Tue, 10 May 2016 17:57:53 -0400 Original-Received: by mail-vk0-f41.google.com with SMTP id s184so34258365vkb.3 for <23462@debbugs.gnu.org>; Tue, 10 May 2016 14:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=TZVUV91xOiuE/8Da3MUQzIIh1fbmH4/HhoVXQSSfX9o=; b=UE0BLWlccwFAnvUgVZ/xpenvZE9vgJZQtpUmfk15q9uVMUQx+nAAfQMpOu+qn45DnU 33Fpz7dH0LJsdyAWqisb06UDLK7+JhUVblww3bla6KPkWLjJ6u1ipdYET2IBbSbUYq+d enNZrR4uxbzxuwa4kGLf7sZ6R9irVP7ML4TyAbHhI4QzL8lTzzIE1gmYI+T7chies84z BlB2GIEXVwT1v04FhwodJDnEVXdl1f1yDJKAHreHwwtzNoUmITZWozZjtaJM9C9NoYkv NqRDbZux/UPRXsDCStCmbyxsKh1rzftLhGu9stu/MDIOYvRQmiWnb/de4MXZsU6rVKL6 DkYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=TZVUV91xOiuE/8Da3MUQzIIh1fbmH4/HhoVXQSSfX9o=; b=cvz6UKJOtJ7Ej5/hL6/7bTmlNbXHon8pBqWk5dDP5tdkfrSBB5zcL2je1g4e+WksoI 09TUIX48J0r4Za5FeljZuIWbX33M8WQ9bUMnuQ+VVQ/57CcX9Iu/zxEapuN1fagT4Ic8 aerdRb9bitjx2F/DDNS7lzAQyblwK0RznRoZI8n7ArYofrbJgGHt3AEtUUXSlaUywmhV x8Gn/kMmDO3FOrKKRqV9GgqnmqFeTxvDy21u0TWN2DbNTyeoAAO5mLZU5D+HgdCyGgvn Xz6qn17WiCES5do9Jg/IJ1MFZcDaGUvEBAKfUEnsH5ZskmTpgilhVctjC75k2+/K1KLR qi8g== X-Gm-Message-State: AOPr4FVZN5uSrA0BH2SqpqhVKiuZScZwrkrU1Fk7Dw33L/+5W+qBt2+aeONVT2WW3FeVb4QlEJsBDyhI5Ur3Uw== X-Received: by 10.176.64.40 with SMTP id h37mr25034795uad.58.1462917467346; Tue, 10 May 2016 14:57:47 -0700 (PDT) Original-Received: by 10.31.214.131 with HTTP; Tue, 10 May 2016 14:57:47 -0700 (PDT) In-Reply-To: <82D6EB3D-6383-430B-BBC9-DEC216F0C33A@polito.it> 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:118089 Archived-At: --94eb2c12355efa1c3e05328403ab Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! Thanks for the trace output. As far as I can tell, I don't see a better location to place the test. (I have to include myself in the group who have no idea why drawRect is being called when the frame is miniatured.) I would suggest that we add it as you originally suggested. Alan, what do you say? Have you looked into this? -- Anders On Tue, May 10, 2016 at 10:13 PM, Ivan Cibrario Bertolotti < ivan.cibrario@polito.it> wrote: > Hi Anders, > > > On 10 May 2016, at 20:56, Anders Lindgren wrote: > > > > Hi Ivan and Alan! > > > > I'm not sure that is the correct place for the patch. > > > > Could you enable NSTRACE (by uncommenting the line defining > NSTRACE_ENABLED in nsterm.h) and see which function calls `drawRect` (if > possible). If that is in a function that is part of Emacs, it's better to > check that the frame is visible higher up in the call chain. > > > > You will have to start Emacs from a terminal window in order to see the > trace output. You can do this by running > "./nextstep/Emacs.app/Content/MacOS/Emacs=E2=80=9D. > > here is the relevant part of the trace output: > > nsterm.m : 1595: [ 6322] x_iconify_frame > nsterm.m : 6770: [ 6323] | [EmacsView windowWillMiniaturize:] > nsterm.m : 6735: [ 6324] | [EmacsView windowDidResignKey:] > nsterm.m : 1504: [ 6325] | | ns_frame_rehighlight > nsterm.m : 7121: [ 6326] | [EmacsView windowDidMiniaturize:] > nsterm.m : 7591: [ 6327] | [EmacsView drawRect:(X:578 Y:4)/(W:15 H:472)= ] > > If I understand it correctly, the top-level function involved (within > nsterm.m) is x_iconify_frame. The only explicit call pertinent to the > issue that I see within it is: > > [[view window] miniaturize: NSApp]; > > at nsterm.m:1615. I think that the others, from windowWillMiniaturize to > drawRect, are callbacks. The reason why a miniaturize request triggers a > drawRect escapes me at this time, but I=E2=80=99m definitely not an exper= t on this > GUI. > > Thank you and please let me know if I can be of further assistance. > > Best regards, > Ivan > > --94eb2c12355efa1c3e05328403ab Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

Thanks for the trace output.
<= div>
As far as I can tell, I don't see a better location = to place the test. (I have to include myself in the group who have no idea = why drawRect is being called when the frame is miniatured.) I would suggest= that we add it as you originally suggested.

Alan,= what do you say? Have you looked into this?

=C2= =A0 =C2=A0 -- Anders


On Tue, May 10, 2016 at 10:13 PM, Ivan Cibrario Bertolott= i <ivan.cibrario@polito.it> wrote:
Hi Anders,

> On 10 May 2016, at 20:56, Anders Lindgren <andlind@gmail.com> wrote:
>
> Hi Ivan and Alan!
>
> I'm not sure that is the correct place for the patch.
>
> Could you enable NSTRACE (by uncommenting the line defining NSTRACE_EN= ABLED in nsterm.h) and see which function calls `drawRect` (if possible). I= f that is in a function that is part of Emacs, it's better to check tha= t the frame is visible higher up in the call chain.
>
> You will have to start Emacs from a terminal window in order to see th= e trace output. You can do this by running "./nextstep/Emacs.app/Conte= nt/MacOS/Emacs=E2=80=9D.

here is the relevant part of the trace output:

nsterm.m=C2=A0 : 1595: [ 6322]=C2=A0 x_iconify_frame
nsterm.m=C2=A0 : 6770: [ 6323]=C2=A0 | [EmacsView windowWillMiniaturize:] nsterm.m=C2=A0 : 6735: [ 6324]=C2=A0 | [EmacsView windowDidResignKey:]
nsterm.m=C2=A0 : 1504: [ 6325]=C2=A0 | | ns_frame_rehighlight
nsterm.m=C2=A0 : 7121: [ 6326]=C2=A0 | [EmacsView windowDidMiniaturize:] nsterm.m=C2=A0 : 7591: [ 6327]=C2=A0 | [EmacsView drawRect:(X:578 Y:4)/(W:1= 5 H:472)]

If I understand it correctly, the top-level function involved (within nster= m.m) is x_iconify_frame.=C2=A0 The only explicit call pertinent to the issu= e that I see within it is:

[[view window] miniaturize: NSApp];

at nsterm.m:1615.=C2=A0 I think that the others, from windowWillMiniaturize= to drawRect, are callbacks.=C2=A0 The reason why a miniaturize request tri= ggers a drawRect escapes me at this time, but I=E2=80=99m definitely not an= expert on this GUI.

Thank you and please let me know if I can be of further assistance.

Best regards,
Ivan


--94eb2c12355efa1c3e05328403ab--