GNU bug report logs - #16967
frame related race condition

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Juanma Barranquero <lekktu@HIDDEN>; dated Sat, 8 Mar 2014 16:21:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 14 Mar 2014 13:32:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 14 09:32:21 2014
Received: from localhost ([127.0.0.1]:36560 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WOSDk-0000nC-70
	for submit <at> debbugs.gnu.org; Fri, 14 Mar 2014 09:32:20 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:40335)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WOSDd-0000mx-5c
 for 16967 <at> debbugs.gnu.org; Fri, 14 Mar 2014 09:32:13 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM
X-IPAS-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="52067520"
Received: from 76-10-154-114.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net)
 ([76.10.154.114])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 14 Mar 2014 09:32:12 -0400
Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848)
 id 49C86AE1F9; Fri, 14 Mar 2014 09:32:12 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#16967: frame related race condition
Message-ID: <jwvlhwcrk38.fsf-monnier+emacsbugs@HIDDEN>
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
 <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
 <531DA5ED.6090601@HIDDEN>
 <CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>
 <531DB9F3.2030508@HIDDEN>
 <CAAeL0STVxKir8gTaizHcfXAa-mUuoT0sJyJOxpbZM6q8MjyLyQ@HIDDEN>
 <531E0CB2.3070609@HIDDEN>
 <CAAeL0SR8ScHaM2OYt22Nn2Fs=wq_TjymNrRE-WZhgPKK7iMgDw@HIDDEN>
 <531EC439.7050803@HIDDEN> <jwv1ty75xqd.fsf-monnier+emacsbugs@HIDDEN>
 <5322E8AD.3060900@HIDDEN>
Date: Fri, 14 Mar 2014 09:32:12 -0400
In-Reply-To: <5322E8AD.3060900@HIDDEN> (martin rudalics's message of "Fri, 14
 Mar 2014 12:31:57 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 16967
Cc: Juanma Barranquero <lekktu@HIDDEN>, 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

> If a frame is obscured (has visible=2) and we get a SIZE_RESTORED
> message for it, we probably should do some redisplay stuff but I'm not
> sure whether either redisplay_other_windows or SET_FRAME_GARBAGED does
> accomplish something the other doesn't.

redisplay_other_windows only tells Emacs that the next redisplay will
need to loop through all windows to see which ones need to be
redisplayed.  Without it, Emacs will only try to redisplay selected-window.

SET_FRAME_GARBAGED tells Emacs that this frame needs to be redrawn.
It calls redisplay_other_windows unconditionally.

> However, soon after I removed the conditioning on `iconified' I got my
> usually "non-redrawing a previously obscured frame" behavior and
> decided that my cure wasn't useful anyway.

Presumably, un-obscuring a frame shouldn't trigger any SIZE_RESTORED
thingy since the size is unaffected, right?

>> And we should probably also set it back to 1 when we receive expose
>> events on that frame.

Can you try to do this?

>>> BTW: The more I look into this, the more I'm convinced that implementing
>>> frame parameters on top of the old frame infrastructure was one of the
>>> worst design ideas ever.
>> I have no idea what this is referring to.
> In the case at hand it refers to the fact that when searching for the
> cause of some strange behavior of frame visibility, it's not sufficient
> to grep just for `make-frame-visible'.

Oh, that.  Yes, I'm not very happy with the use of frame-parameters to
affect "internal" frame properties.  It has never *really* bothered me,
but it seems like asking for trouble.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 14 Mar 2014 11:32:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 14 07:32:07 2014
Received: from localhost ([127.0.0.1]:36503 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WOQLO-0005Zj-V7
	for submit <at> debbugs.gnu.org; Fri, 14 Mar 2014 07:32:07 -0400
Received: from mout.gmx.net ([212.227.17.22]:53998)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1WOQLL-0005ZU-9f
 for 16967 <at> debbugs.gnu.org; Fri, 14 Mar 2014 07:32:04 -0400
Received: from [93.82.10.128] ([93.82.10.128]) by mail.gmx.com (mrgmx101) with
 ESMTPSA (Nemesis) id 0MIQlv-1WRRoG2Um7-004AYB;
 Fri, 14 Mar 2014 12:31:59 +0100
Message-ID: <5322E8AD.3060900@HIDDEN>
Date: Fri, 14 Mar 2014 12:31:57 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#16967: frame related race condition
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>	<531D8028.8020807@HIDDEN>
 <531D94CB.7020704@HIDDEN>	<CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>	<531DA5ED.6090601@HIDDEN>	<CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>	<531DB9F3.2030508@HIDDEN>	<CAAeL0STVxKir8gTaizHcfXAa-mUuoT0sJyJOxpbZM6q8MjyLyQ@HIDDEN>	<531E0CB2.3070609@HIDDEN>	<CAAeL0SR8ScHaM2OYt22Nn2Fs=wq_TjymNrRE-WZhgPKK7iMgDw@HIDDEN>	<531EC439.7050803@HIDDEN>
 <jwv1ty75xqd.fsf-monnier+emacsbugs@HIDDEN>
In-Reply-To: <jwv1ty75xqd.fsf-monnier+emacsbugs@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:M/9QyMMlOMkn2OgYmof7WBulKKTl23VAEXyLq61j4dJz8NWOnWs
 x/7CiRJD7CG+HA0k2RCozyDXx5tRr5RPR1gVnUyriLeXxryFFHtxnH4JuT3y4pOSuTWI2ka
 UQOK5B3qnKkQ73w/gfmQBbfDONDDSCO9suhsX9ZPOLVzZ6IYQ7Hh5gNDPPPdwFG8QtFwMft
 ERT29LEHamm5NKjMTWvcA==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 16967
Cc: Juanma Barranquero <lekktu@HIDDEN>, 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 > Hmm... I didn't realize this "visible=2" is also used in the Windows GUI.
 > So maybe the "visible=2" case under Windows is indeed mishandled by the
 > "redisplay bit" code.  Or by some other part of the code.

If a frame is obscured (has visible=2) and we get a SIZE_RESTORED
message for it, we probably should do some redisplay stuff but I'm not
sure whether either redisplay_other_windows or SET_FRAME_GARBAGED does
accomplish something the other doesn't.  However, soon after I removed
the conditioning on `iconified' I got my usualy "non-redrawing a
previously obscured frame" behavior and decided that my cure wasn't
useful anyway.

 > I'm not sure what SIZE_RESTORED is for, but indeed when we receive
 > a size-change notification, the "visible=2" optimization might not be
 > valid any more so we should set it back to 1.
 >
 > And we should probably also set it back to 1 when we receive expose
 > events on that frame.
 >
 > But I'm generally clueless about GUI code, and even more clueless about
 > w32, so please don't take my word for it.

As explained above, I haven't been able to stop the indecent behavior of
obscured frames I observed with an even more radical approach, so I'm
clueless as well.

 >> BTW: The more I look into this, the more I'm convinced that implementing
 >> frame parameters on top of the old frame infrastructure was one of the
 >> worst design ideas ever.
 >
 > I have no idea what this is referring to.

In the case at hand it refers to the fact that when searching for the
cause of some strange behavior of frame visibility, it's not sufficient
to grep just for `make-frame-visible'.  You also have to spot things
like (set-frame-parameter frame 'visibility t) and maybe all occurrences
of `modify-frame-parameters' and `modify-all-frames-parameters'.
Obviously searching for 'visibility only is more efficient but this will
fail miserably with more mundane words like `right' or `left'.  So the
introduction of frame parametes often multiplies the effort necessary to
find the cause of frame related bugs.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 12 Mar 2014 14:06:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 12 10:06:21 2014
Received: from localhost ([127.0.0.1]:34695 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WNjnY-000885-VH
	for submit <at> debbugs.gnu.org; Wed, 12 Mar 2014 10:06:21 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:35250)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WNjnX-00087y-Cy
 for 16967 <at> debbugs.gnu.org; Wed, 12 Mar 2014 10:06:19 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av8EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAScvIwULCzQSFBgNEAETiB4GwS2RCgOkeoFegxM
X-IPAS-Result: Av8EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAScvIwULCzQSFBgNEAETiB4GwS2RCgOkeoFegxM
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="51455613"
Received: from 76-10-154-114.dsl.teksavvy.com (HELO pastel.home)
 ([76.10.154.114])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 12 Mar 2014 10:06:18 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id 7B6A86057F; Wed, 12 Mar 2014 10:06:18 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#16967: frame related race condition
Message-ID: <jwv1ty75xqd.fsf-monnier+emacsbugs@HIDDEN>
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
 <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
 <531DA5ED.6090601@HIDDEN>
 <CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>
 <531DB9F3.2030508@HIDDEN>
 <CAAeL0STVxKir8gTaizHcfXAa-mUuoT0sJyJOxpbZM6q8MjyLyQ@HIDDEN>
 <531E0CB2.3070609@HIDDEN>
 <CAAeL0SR8ScHaM2OYt22Nn2Fs=wq_TjymNrRE-WZhgPKK7iMgDw@HIDDEN>
 <531EC439.7050803@HIDDEN>
Date: Wed, 12 Mar 2014 10:06:18 -0400
In-Reply-To: <531EC439.7050803@HIDDEN> (martin rudalics's message of "Tue, 11
 Mar 2014 09:07:21 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 16967
Cc: Juanma Barranquero <lekktu@HIDDEN>, 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

>   /* Nonzero if the frame is currently displayed; we check
>      it to see if we should bother updating the frame's contents.

>      On ttys and on Windows NT/9X, to avoid wasting effort updating
>      visible frames that are actually completely obscured by other
>      windows on the display, we bend the meaning of visible slightly:
>      if equal to 2, then the frame is obscured - we still consider
>      it to be "visible" as seen from lisp, but we don't bother
>      updating it.  */
>   unsigned visible : 2;

Hmm... I didn't realize this "visible=2" is also used in the Windows GUI.
So maybe the "visible=2" case under Windows is indeed mishandled by the
"redisplay bit" code.  Or by some other part of the code.

At least frame.h does:

   SET_FRAME_VISIBLE (struct frame *f, int v)
   {
     eassert (0 <= v && v <= 2);
     if (v == 1 && f->visible != 1)
       redisplay_other_windows ();
     f->visible = v;
   }

so it should handle the w32 case correctly.

> is likely responsible for the fact that Emacs doesn't always redisplay a
> frame when I remove the window of another application obscuring it.  I'm
> still convinced that we should call SET_FRAME_VISIBLE, at least when
> f->visible equals 2, in SIZE_RESTORED.

I'm not sure what SIZE_RESTORED is for, but indeed when we receive
a size-change notification, the "visible=2" optimization might not be
valid any more so we should set it back to 1.

And we should probably also set it back to 1 when we receive expose
events on that frame.

But I'm generally clueless about GUI code, and even more clueless about
w32, so please don't take my word for it.

> BTW: The more I look into this, the more I'm convinced that implementing
> frame parameters on top of the old frame infrastructure was one of the
> worst design ideas ever.

I have no idea what this is referring to.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 11 Mar 2014 21:14:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 17:14:25 2014
Received: from localhost ([127.0.0.1]:33623 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WNU0G-0007Of-TY
	for submit <at> debbugs.gnu.org; Tue, 11 Mar 2014 17:14:25 -0400
Received: from mail-yk0-f175.google.com ([209.85.160.175]:43538)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <lekktu@HIDDEN>) id 1WNU0E-0007OU-7o
 for 16967 <at> debbugs.gnu.org; Tue, 11 Mar 2014 17:14:23 -0400
Received: by mail-yk0-f175.google.com with SMTP id 131so24674300ykp.6
 for <16967 <at> debbugs.gnu.org>; Tue, 11 Mar 2014 14:14:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc:content-type;
 bh=BAszaD32tp3z5bJPw2bvLFySc/6NnCRUJhR3cdQdGfI=;
 b=vrWqe1X6C37AZnx9Fo9YJgupxSR6obI/ME7mYIlxdRSu2S3IHqnAQXfDN371jRvRQF
 oYn8G2cXJpJLvrz6HIRN2/gQRd2r3oq8mOnf7lR2cWdtUQ8nDj2XMaN8ceIuS+PBQVwl
 361Yx4iniLKAcki29+O38316LlQ14R9fLb2FqpL+SyX3AE4DJSFD9MI7fXZNstG4UBPA
 w2UxgfrQbVHVeCudUBtKz/VL3Ri+zYxf424mFA/TiK3/2in9pSi65T08tGx4Wy2HyRdf
 GQbcGxoarxulgsz8XU75GoSYB0d8n5JX305yqbO9/wisWaFV/GzjwKApQsMvf61KKlIO
 ehUA==
X-Received: by 10.236.101.18 with SMTP id a18mr55979500yhg.65.1394572461625;
 Tue, 11 Mar 2014 14:14:21 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.170.163.3 with HTTP; Tue, 11 Mar 2014 14:13:40 -0700 (PDT)
In-Reply-To: <531EC439.7050803@HIDDEN>
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
 <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
 <531DA5ED.6090601@HIDDEN>
 <CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>
 <531DB9F3.2030508@HIDDEN>
 <CAAeL0STVxKir8gTaizHcfXAa-mUuoT0sJyJOxpbZM6q8MjyLyQ@HIDDEN>
 <531E0CB2.3070609@HIDDEN>
 <CAAeL0SR8ScHaM2OYt22Nn2Fs=wq_TjymNrRE-WZhgPKK7iMgDw@HIDDEN>
 <531EC439.7050803@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Tue, 11 Mar 2014 22:13:40 +0100
Message-ID: <CAAeL0SR+XthyDWn0W6tHfuDJVc0T034SgWOjNr3Ldh5RpaCuGQ@HIDDEN>
Subject: Re: bug#16967: frame related race condition
To: martin rudalics <rudalics@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16967
Cc: 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Tue, Mar 11, 2014 at 9:07 AM, martin rudalics <rudalics@HIDDEN> wrote:

> ... so I was doubting that you really agreed with my judgment of this
> bug.

It would be hard to deny that there are nasty bugs related to frames
and the Windows wm. So yes, I agree with your judgment.

> BTW: The more I look into this, the more I'm convinced that implementing
> frame parameters on top of the old frame infrastructure was one of the
> worst design ideas ever.

:-)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 11 Mar 2014 08:07:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 04:07:46 2014
Received: from localhost ([127.0.0.1]:60835 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WNHj0-000690-1W
	for submit <at> debbugs.gnu.org; Tue, 11 Mar 2014 04:07:46 -0400
Received: from mout.gmx.net ([212.227.17.21]:54650)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1WNHiy-00068s-3Z
 for 16967 <at> debbugs.gnu.org; Tue, 11 Mar 2014 04:07:44 -0400
Received: from [62.47.255.54] ([62.47.255.54]) by mail.gmx.com (mrgmx002) with
 ESMTPSA (Nemesis) id 0LvENG-1XMA5E3D3C-010NY4;
 Tue, 11 Mar 2014 09:07:42 +0100
Message-ID: <531EC448.3050109@HIDDEN>
Date: Tue, 11 Mar 2014 09:07:36 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#16967: frame related race condition
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>	<531D8028.8020807@HIDDEN>
 <531D94CB.7020704@HIDDEN>	<CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>	<531DA5ED.6090601@HIDDEN>	<CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>	<531DB9F3.2030508@HIDDEN>
 <jwvr4697cjf.fsf-monnier+emacsbugs@HIDDEN>
In-Reply-To: <jwvr4697cjf.fsf-monnier+emacsbugs@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:yfL4eW13x1RkWq0yh8b3ut+sUWYskYo+e8sg9kWSPFFkNr4UyJU
 aduuGVLkRjD9VjiMpI3DaTUbnmPDXg7sSnV95YeykgdZjwTG4UNbClb+UbG/fRm9urYxdZH
 1D5YV/KygW8vGb4cxfhm/Thr3dya/xM5KARdr6DqgPN3CGpbdxAn/JBkKfnyUZmaxYRHbEe
 OKTpo8Wpg7Nt3gwoW5Psw==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 16967
Cc: Juanma Barranquero <lekktu@HIDDEN>, 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> Lately I frequently noticed that an Emacs frame that was for some time
 >> hidden by other applications and subsequently became exposed by deleting
 >> their windows was not redrawn and I would like to know whether this was
 >> the reason.  ISTR that others noted the same or a similar misbehavior.
 >
 > My "redisplay bit" changes of a few months back introduced such bugs.
 > I haven't seen such problems for a while now, so I think I've caught all
 > the problems, but maybe I still missed some.
 >
 > Part of the change is that previously iconified/invisible frames where
 > redisplayed right away (i.e. their glyph matrices were kept up-to-date),
 > whereas now they're not.  Which means that when they're uniconified or
 > made visible, we have to first set windows_or_buffers_changed to
 > REDISPLAY_SOME, to make sure that the subsequent redisplay doesn't
 > forget to look at them.

In all cases I observed this, the Emacs frame was neither invisible nor
iconified before, hence there was no uniconifying or making it visible
involved.  And since I don't recall observing this problem on GNU/Linux,
I'm quite convinced that it's merely Emacs mishandling frames obscured
for some time on Windows.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 11 Mar 2014 08:07:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 04:07:33 2014
Received: from localhost ([127.0.0.1]:60832 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WNHin-00068b-1w
	for submit <at> debbugs.gnu.org; Tue, 11 Mar 2014 04:07:33 -0400
Received: from mout.gmx.net ([212.227.15.18]:63580)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1WNHij-00068R-M1
 for 16967 <at> debbugs.gnu.org; Tue, 11 Mar 2014 04:07:30 -0400
Received: from [62.47.255.54] ([62.47.255.54]) by mail.gmx.com (mrgmx003) with
 ESMTPSA (Nemesis) id 0MRFwV-1Wk57R2TCZ-00UYKp;
 Tue, 11 Mar 2014 09:07:26 +0100
Message-ID: <531EC439.7050803@HIDDEN>
Date: Tue, 11 Mar 2014 09:07:21 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
Subject: Re: bug#16967: frame related race condition
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
 <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
 <531DA5ED.6090601@HIDDEN>
 <CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>
 <531DB9F3.2030508@HIDDEN>
 <CAAeL0STVxKir8gTaizHcfXAa-mUuoT0sJyJOxpbZM6q8MjyLyQ@HIDDEN>
 <531E0CB2.3070609@HIDDEN>
 <CAAeL0SR8ScHaM2OYt22Nn2Fs=wq_TjymNrRE-WZhgPKK7iMgDw@HIDDEN>
In-Reply-To: <CAAeL0SR8ScHaM2OYt22Nn2Fs=wq_TjymNrRE-WZhgPKK7iMgDw@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:1izUDTwO2fIlbWuKH4GeIJ553KgJVXYnOhp9iwzoIuteMFfVuiR
 azyvobf7DbTCC1GGBtkV7bsFZ5JCoanQKRYZYL+eqBRUsxYKCrrPZy2bXLu8DtWonR+Oxeh
 pj0W2OLEsw8NL0s1O0G+9TZjkkloUP79v+INh9KqNc1XFdfpHxRQtu/1dgZe0avsq0tJt4Z
 +pKL9Iv2Z0gFJ33HBuTqg==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 16967
Cc: 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> Really?  I was just starting to think otherwise.
 >
 > ?

Earlier in this thread I wrote that ...

 > The fact that this frame has its visibility set to zero at the time
 > you `delete-frame' c indicates that we have a pretty awful bug.

... and you agreed by saying ...

 >  The fact that this frame has
 > > its visibility set to zero at the time you `delete-frame' c indicates
 > > that we have a pretty awful bug.

 > Yes

... to which I replied ...

 > >> The fact that this frame has
 > >> its visibility set to zero at the time you `delete-frame' c indicates
 > >> that we have a pretty awful bug.
 > >
 > > Yes
 >
 > Really?  I was just starting to think otherwise.

... so I was doubting that you really agreed with my judgment of this
bug.

Anyway, the current state of things is IMHO just as bad as it was at the
time you started to write the report for bug 14841.  In particular, the
frame.h hack you mention in that thread

   /* Nonzero if the frame is currently displayed; we check
      it to see if we should bother updating the frame's contents.

      On ttys and on Windows NT/9X, to avoid wasting effort updating
      visible frames that are actually completely obscured by other
      windows on the display, we bend the meaning of visible slightly:
      if equal to 2, then the frame is obscured - we still consider
      it to be "visible" as seen from lisp, but we don't bother
      updating it.  */
   unsigned visible : 2;

is likely responsible for the fact that Emacs doesn't always redisplay a
frame when I remove the window of another application obscuring it.  I'm
still convinced that we should call SET_FRAME_VISIBLE, at least when
f->visible equals 2, in SIZE_RESTORED.  But I'm also convinced that
allowing a value of 2 was bad karma in the first place.  So I see no
other way but reconsidering this design from scratch :-(

BTW: The more I look into this, the more I'm convinced that implementing
frame parameters on top of the old frame infrastructure was one of the
worst design ideas ever.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 11 Mar 2014 01:34:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 21:34:36 2014
Received: from localhost ([127.0.0.1]:60716 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WNBaV-00033V-Pv
	for submit <at> debbugs.gnu.org; Mon, 10 Mar 2014 21:34:36 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:30587)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1WNBaT-00033N-3S
 for 16967 <at> debbugs.gnu.org; Mon, 10 Mar 2014 21:34:33 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM
X-IPAS-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="51261180"
Received: from 76-10-154-114.dsl.teksavvy.com (HELO pastel.home)
 ([76.10.154.114])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 10 Mar 2014 21:34:05 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id 9C49660178; Mon, 10 Mar 2014 21:33:55 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#16967: frame related race condition
Message-ID: <jwvr4697cjf.fsf-monnier+emacsbugs@HIDDEN>
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
 <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
 <531DA5ED.6090601@HIDDEN>
 <CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>
 <531DB9F3.2030508@HIDDEN>
Date: Mon, 10 Mar 2014 21:33:55 -0400
In-Reply-To: <531DB9F3.2030508@HIDDEN> (martin rudalics's message of "Mon, 10
 Mar 2014 14:11:15 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 16967
Cc: Juanma Barranquero <lekktu@HIDDEN>, 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

> Lately I frequently noticed that an Emacs frame that was for some time
> hidden by other applications and subsequently became exposed by deleting
> their windows was not redrawn and I would like to know whether this was
> the reason.  ISTR that others noted the same or a similar misbehavior.

My "redisplay bit" changes of a few months back introduced such bugs.
I haven't seen such problems for a while now, so I think I've caught all
the problems, but maybe I still missed some.

Part of the change is that previously iconified/invisible frames where
redisplayed right away (i.e. their glyph matrices were kept up-to-date),
whereas now they're not.  Which means that when they're uniconified or
made visible, we have to first set windows_or_buffers_changed to
REDISPLAY_SOME, to make sure that the subsequent redisplay doesn't
forget to look at them.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 10 Mar 2014 21:18:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 17:18:51 2014
Received: from localhost ([127.0.0.1]:60619 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WN7b0-00042d-Mo
	for submit <at> debbugs.gnu.org; Mon, 10 Mar 2014 17:18:51 -0400
Received: from mail-yh0-f52.google.com ([209.85.213.52]:47517)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <lekktu@HIDDEN>) id 1WN7ay-00042V-P4
 for 16967 <at> debbugs.gnu.org; Mon, 10 Mar 2014 17:18:49 -0400
Received: by mail-yh0-f52.google.com with SMTP id c41so1138404yho.25
 for <16967 <at> debbugs.gnu.org>; Mon, 10 Mar 2014 14:18:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc:content-type;
 bh=dGtbTJMbj44GiBSA/TwPl1Ntxr7PKwT75ik57C0+NwM=;
 b=kil4ZT2sSnTwiY9rfZ0wuM2Be5oRTkYMSC1M0L6Oy49B931sqzYbmnzzsd1iMjL8YT
 k60u6mPlIb2z+sOBcBDUKWxVWj+qHEKpmGHid74Dzj1HcVWtBhxdIjmQOQQrQD5Ftj+U
 AsPBXSRleg37KIbTQ/80GJuKkiWeCyCmzJS4YcTtiCwcX90wYKcfaGmbMs9EJlfMaeY5
 TjS7DPOAkiw6K4U+51uDYC7uJVah/ctyK1ipHWhMbuC1MROtVOXJ8/BFxMitewq0socD
 60WVYo8RLqc4Fe7HWpD7CDp0Y0G1IPism/DaicYtSppcs73u7foan9yXavqLGjxlkW6I
 xnRA==
X-Received: by 10.236.136.231 with SMTP id w67mr48188688yhi.53.1394486328176; 
 Mon, 10 Mar 2014 14:18:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.170.163.3 with HTTP; Mon, 10 Mar 2014 14:18:08 -0700 (PDT)
In-Reply-To: <531E0CB2.3070609@HIDDEN>
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
 <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
 <531DA5ED.6090601@HIDDEN>
 <CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>
 <531DB9F3.2030508@HIDDEN>
 <CAAeL0STVxKir8gTaizHcfXAa-mUuoT0sJyJOxpbZM6q8MjyLyQ@HIDDEN>
 <531E0CB2.3070609@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Mon, 10 Mar 2014 22:18:08 +0100
Message-ID: <CAAeL0SR8ScHaM2OYt22Nn2Fs=wq_TjymNrRE-WZhgPKK7iMgDw@HIDDEN>
Subject: Re: bug#16967: frame related race condition
To: martin rudalics <rudalics@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16967
Cc: 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Mon, Mar 10, 2014 at 8:04 PM, martin rudalics <rudalics@HIDDEN> wrote:

> Really?  I was just starting to think otherwise.

?

> Done.

Thanks.

> Sorry for the inconvenience.

Sorry if I was whiny, it was entirely unintentional. I'm grateful for
your effort fixing these hard bugs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 10 Mar 2014 19:04:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 15:04:30 2014
Received: from localhost ([127.0.0.1]:60580 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WN5Uz-0008Q9-GX
	for submit <at> debbugs.gnu.org; Mon, 10 Mar 2014 15:04:29 -0400
Received: from mout.gmx.net ([212.227.15.18]:60795)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1WN5Uv-0008Py-BH
 for 16967 <at> debbugs.gnu.org; Mon, 10 Mar 2014 15:04:26 -0400
Received: from [91.113.3.213] ([91.113.3.213]) by mail.gmx.com (mrgmx001) with
 ESMTPSA (Nemesis) id 0MY7ZA-1WjCsA4Bcm-00UuTT;
 Mon, 10 Mar 2014 20:04:23 +0100
Message-ID: <531E0CB2.3070609@HIDDEN>
Date: Mon, 10 Mar 2014 20:04:18 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
Subject: Re: bug#16967: frame related race condition
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
 <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
 <531DA5ED.6090601@HIDDEN>
 <CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>
 <531DB9F3.2030508@HIDDEN>
 <CAAeL0STVxKir8gTaizHcfXAa-mUuoT0sJyJOxpbZM6q8MjyLyQ@HIDDEN>
In-Reply-To: <CAAeL0STVxKir8gTaizHcfXAa-mUuoT0sJyJOxpbZM6q8MjyLyQ@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:b+Pb+ZHmInowC/gbyUh5awZ8OmzmjXvD9ifbgQFG7cfZyfa3ZVM
 7ffSxCwyvfuM1RTcNfam71TwxlckWFcLtWFeZ69lv1lK/vM2EoiY+foTR4uQXgABbH/OJ27
 O4IngMNYa9AA7BSimXNIAyLUWTJeR2cfs8+5TX2uDC2MJyhDkMBuScvnWVCnG5BJGURvQkA
 zR+zgV7d2q7Bt+9owiQDg==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 16967
Cc: 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> should create a normally visible frame f.  The fact that this frame has
 >> its visibility set to zero at the time you `delete-frame' c indicates
 >> that we have a pretty awful bug.
 >
 > Yes

Really?  I was just starting to think otherwise.

 >> The implications of this are
 >> substantial because SET_FRAME_VISIBLE has to redisplay_other_windows and
 >> if that is not done, the consequences are not restricted to the toy
 >> scenario you gave.
 >
 > I don't know what "toy scenario" are you refering to,

The one of this bug report which IIUC even you consider "an occasional
problem" ;-)

 > but certainly
 >
 >   emacs -Q
 >   M-: (make-frame '((visibility))) <RET>
 >
 > is not a toy scenario *at all*. For one, it will prevent
 > frameset-restore to restore invisible frames (I could work around it,
 > but it'll be a hack).

OK.  Then I have a motivation to revert it.

 >> No.  But we apparently have the problem that Emacs on Windows thinks
 >> that a frame is invisible although it isn't.  And we have to find out
 >> where this notion of invisibility gets introduced - maybe it's easy to
 >> spot it, maybe, likely it's part of my pixelwise changes, and we can
 >> withdraw my "fix" soon.
 >
 > I think bug#14841 is a clue that the visibility mismatch between Emacs
 > and the Windows wm predates your pixelwise changes.

I think that I misjudged the severity of the problem.  Drew's latest
reports hint at some mysterious behavior which I haven't been able to
understand yet so I'm suspecting potential culprits around every corner.

 > I would certainly prefer that you reverted your last change.

Done.

 > You're
 > fixing an occasional problem and introducing a perfectly repeatable
 > one.

Sorry for the inconvenience.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 10 Mar 2014 14:49:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 10:49:13 2014
Received: from localhost ([127.0.0.1]:60413 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WN1Vw-0007yO-UN
	for submit <at> debbugs.gnu.org; Mon, 10 Mar 2014 10:49:13 -0400
Received: from mail-yh0-f41.google.com ([209.85.213.41]:54530)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <lekktu@HIDDEN>) id 1WN1Vu-0007yF-BB
 for 16967 <at> debbugs.gnu.org; Mon, 10 Mar 2014 10:49:11 -0400
Received: by mail-yh0-f41.google.com with SMTP id v1so2512904yhn.0
 for <16967 <at> debbugs.gnu.org>; Mon, 10 Mar 2014 07:49:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc:content-type;
 bh=bCbx7WfbC4ExKt+3+nVIRtZK+l1Wh/87E301Q00Wo4U=;
 b=Xpu1ZQN2SjtLxH9GEOvDA3W8Nz3kyfV59gBI+wGwk2U8iRSCtJPzNObIaIJ7z6+WKo
 RYaAEgQCDO0NKDBC9/7enoy1p8kUiKqqyUAFQrk26/RzVblOARkB6rQ9t6W9cfW0+XC6
 zRWsvxJyYzSvLJJtQ8pS2la6h3uu5/SF+a1l6PqHmDyovBLa4geytdAk6W3DyQv9b6KT
 qBOmVq0nf4Fz2ot2Z0AbN08Woy0Nm2MW7wyyDX6odIiKRoB8BvcAX94bYbLFWY/D7Au7
 xW9O1W8GLQD4q6zifeIFt6lMfCLfKutJ3tmF0x+XjV9tpxE5Ah9ccr87Xm1PvAnWHDxQ
 +RIg==
X-Received: by 10.236.101.18 with SMTP id a18mr45306056yhg.65.1394462949529;
 Mon, 10 Mar 2014 07:49:09 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.170.163.3 with HTTP; Mon, 10 Mar 2014 07:48:29 -0700 (PDT)
In-Reply-To: <531DB9F3.2030508@HIDDEN>
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
 <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
 <531DA5ED.6090601@HIDDEN>
 <CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>
 <531DB9F3.2030508@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Mon, 10 Mar 2014 15:48:29 +0100
Message-ID: <CAAeL0STVxKir8gTaizHcfXAa-mUuoT0sJyJOxpbZM6q8MjyLyQ@HIDDEN>
Subject: Re: bug#16967: frame related race condition
To: martin rudalics <rudalics@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16967
Cc: 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Mon, Mar 10, 2014 at 2:11 PM, martin rudalics <rudalics@HIDDEN> wrote:

> should create a normally visible frame f.  The fact that this frame has
> its visibility set to zero at the time you `delete-frame' c indicates
> that we have a pretty awful bug.

Yes

> The implications of this are
> substantial because SET_FRAME_VISIBLE has to redisplay_other_windows and
> if that is not done, the consequences are not restricted to the toy
> scenario you gave.

I don't know what "toy scenario" are you refering to, but certainly

  emacs -Q
  M-: (make-frame '((visibility))) <RET>

is not a toy scenario *at all*. For one, it will prevent
frameset-restore to restore invisible frames (I could work around it,
but it'll be a hack).

> No.  But we apparently have the problem that Emacs on Windows thinks
> that a frame is invisible although it isn't.  And we have to find out
> where this notion of invisibility gets introduced - maybe it's easy to
> spot it, maybe, likely it's part of my pixelwise changes, and we can
> withdraw my "fix" soon.

I think bug#14841 is a clue that the visibility mismatch between Emacs
and the Windows wm predates your pixelwise changes.

>  But till then we have to live with the
> situation that on Windows invisible Emacs frames are visible :-(

I would certainly prefer that you reverted your last change. You're
fixing an occasional problem and introducing a perfectly repeatable
one.

   J




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 10 Mar 2014 13:11:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 09:11:27 2014
Received: from localhost ([127.0.0.1]:58784 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WMzzK-0004fh-Dc
	for submit <at> debbugs.gnu.org; Mon, 10 Mar 2014 09:11:27 -0400
Received: from mout.gmx.net ([212.227.15.18]:51665)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1WMzzG-0004fV-W0
 for 16967 <at> debbugs.gnu.org; Mon, 10 Mar 2014 09:11:24 -0400
Received: from [88.117.80.119] ([88.117.80.119]) by mail.gmx.com (mrgmx102)
 with ESMTPSA (Nemesis) id 0MPqtK-1WJ8Mk08Wo-0053qC; Mon, 10 Mar 2014 14:11:20
 +0100
Message-ID: <531DB9F3.2030508@HIDDEN>
Date: Mon, 10 Mar 2014 14:11:15 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
Subject: Re: bug#16967: frame related race condition
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
 <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
 <531DA5ED.6090601@HIDDEN>
 <CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>
In-Reply-To: <CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:QJCg8eM/Jfos9MgEfn1QZuFXcs3zIxMkqbGqLn6K8hFg4C9NxPR
 LaSLAKgdLWDEJvsQjc1jBRJRrAjaK2AS4v7dw+NOBhLmFFeGaDuHBxf+asAutlda7TmnSMM
 XLOL0Wh+Drjl2/ceIJuU9C8wFg7VbQDF2CfX03W2PeaZFsofzEfJs6/3CwJOz5ZM9rMzlQZ
 mYN3ublf/pQLIBPt2RFcQ==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 16967
Cc: 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> When we get a SIZE_RESTORED message we have to make the frame visible.
 >
 > Well, yeah, no. I don't know why an invisible frame gets a
 > SIZE_RESTORED message, but as long as Emacs thinks it's invisible, no,
 > it shouldn't be made visible. The WM is at the service of Emacs, not
 > the other way around.

No.  But the `make-frame' in

(let* ((c (selected-frame))
        (f (make-frame)))
   (sit-for 0)
   (select-frame-set-input-focus f)
   (sit-for 0)
   (delete-frame c))

should create a normally visible frame f.  The fact that this frame has
its visibility set to zero at the time you `delete-frame' c indicates
that we have a pretty awful bug.  The implications of this are
substantial because SET_FRAME_VISIBLE has to redisplay_other_windows and
if that is not done, the consequences are not restricted to the toy
scenario you gave.

Lately I frequently noticed that an Emacs frame that was for some time
hidden by other applications and subsequently became exposed by deleting
their windows was not redrawn and I would like to know whether this was
the reason.  ISTR that others noted the same or a similar misbehavior.

 > Or are you saying that you find acceptable being unable to make an
 > invisible frame?

No.  But we apparently have the problem that Emacs on Windows thinks
that a frame is invisible although it isn't.  And we have to find out
where this notion of invisibility gets introduced - maybe it's easy to
spot it, maybe, likely it's part of my pixelwise changes, and we can
withdraw my "fix" soon.  But till then we have to live with the
situation that on Windows invisible Emacs frames are visible :-(

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 10 Mar 2014 12:40:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 08:40:40 2014
Received: from localhost ([127.0.0.1]:58775 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WMzVX-0003jx-FC
	for submit <at> debbugs.gnu.org; Mon, 10 Mar 2014 08:40:39 -0400
Received: from mail-yh0-f43.google.com ([209.85.213.43]:40341)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <lekktu@HIDDEN>) id 1WMzVT-0003jn-Ho
 for 16967 <at> debbugs.gnu.org; Mon, 10 Mar 2014 08:40:36 -0400
Received: by mail-yh0-f43.google.com with SMTP id b6so6894245yha.16
 for <16967 <at> debbugs.gnu.org>; Mon, 10 Mar 2014 05:40:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc:content-type;
 bh=mephnLPO/c9RMOsyMEXiqyoldJ09Z9eyAi/JsIfMRwk=;
 b=w29rgZ1osIGQTpbB8h7ZM1zhWNnHrwVCxWDi5Oq5kxEXTpSDDISOxVVFlqdWUM4oa6
 1UslaXebxPtz+5/P7vp4g1iitqGqEpAOvZylPhC3q4c4t7pavTRDPwS7If/xqoNCFqM0
 BhCZl/0hLU5kBPC9AQvImMAGgXl8p7XoURnSJdOhGf8EasWyVBNLT4mALckaKeUi/hub
 tnbVL1OhllyAxfwKL1UDfOz6uXvsfiwxFigpiHrcPf8iuYorjKPDaLHnK4s1F7FwaBMt
 tq2YFqEuW7YxWjZppFZL8E8w7TTMwd8/YQmL8XjvYUJEBNgHMPbn3n9ikGi2EbuvkDIp
 iZDQ==
X-Received: by 10.236.23.71 with SMTP id u47mr261961yhu.143.1394455234915;
 Mon, 10 Mar 2014 05:40:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.170.163.3 with HTTP; Mon, 10 Mar 2014 05:39:54 -0700 (PDT)
In-Reply-To: <531DA5ED.6090601@HIDDEN>
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
 <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
 <531DA5ED.6090601@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Mon, 10 Mar 2014 13:39:54 +0100
Message-ID: <CAAeL0STxpC-QxL4AghUH0raJo-BoWcmXvocz1q7bq3HKrw7uxw@HIDDEN>
Subject: Re: bug#16967: frame related race condition
To: martin rudalics <rudalics@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16967
Cc: 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Mon, Mar 10, 2014 at 12:45 PM, martin rudalics <rudalics@HIDDEN> wrote:

> When we get a SIZE_RESTORED message we have to make the frame visible.

Well, yeah, no. I don't know why an invisible frame gets a
SIZE_RESTORED message, but as long as Emacs thinks it's invisible, no,
it shouldn't be made visible. The WM is at the service of Emacs, not
the other way around.

Or are you saying that you find acceptable being unable to make an
invisible frame?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 10 Mar 2014 11:45:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 07:45:58 2014
Received: from localhost ([127.0.0.1]:58751 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WMyeb-00027D-OJ
	for submit <at> debbugs.gnu.org; Mon, 10 Mar 2014 07:45:58 -0400
Received: from mout.gmx.net ([212.227.17.22]:59588)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1WMyeZ-000274-9W
 for 16967 <at> debbugs.gnu.org; Mon, 10 Mar 2014 07:45:56 -0400
Received: from [178.190.166.7] ([178.190.166.7]) by mail.gmx.com (mrgmx003)
 with ESMTPSA (Nemesis) id 0LqALY-1WredO0zdg-00dq37; Mon, 10 Mar 2014 12:45:54
 +0100
Message-ID: <531DA5ED.6090601@HIDDEN>
Date: Mon, 10 Mar 2014 12:45:49 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
Subject: Re: bug#16967: frame related race condition
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
 <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
In-Reply-To: <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:ts/I4/rKTG9KSK/4LxgBmq0KosDodpGn7aM0oksRWUtGHEzBLds
 ZgPMNrZ14AAe9+R//7FZ4oD2FprW66H222ui9L0HaKnfk2NhUQHmOwpt0d6rU9sXTT47nMu
 u74IAL/331WlVURiDBD5HFOyN27BtYVJ+8I54+mak+ncwJvTNCLz3j/MjRQXbaQo0vxVwSJ
 DRvjhAZdv8wUp5EPG67yw==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 16967
Cc: 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 >> I checked in a fix in revision 116716.  With that I can't see the
 >> problem any more.  Can you?
 >
 > No, but it has a much bigger problem:
 >
 >  emacs -Q --eval "(make-frame '((visibility . nil)))"
 >
 > and you end with two visible frames.
 >
 > I think we're rehashing part of bug#14841's thread.

When we get a SIZE_RESTORED message we have to make the frame visible.
Do you see another way?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 10 Mar 2014 11:09:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 07:09:42 2014
Received: from localhost ([127.0.0.1]:58741 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WMy5V-0008MG-Q2
	for submit <at> debbugs.gnu.org; Mon, 10 Mar 2014 07:09:42 -0400
Received: from mail-yk0-f176.google.com ([209.85.160.176]:44207)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <lekktu@HIDDEN>) id 1WMy5S-0008M8-Uu
 for 16967 <at> debbugs.gnu.org; Mon, 10 Mar 2014 07:09:39 -0400
Received: by mail-yk0-f176.google.com with SMTP id 19so18679760ykq.7
 for <16967 <at> debbugs.gnu.org>; Mon, 10 Mar 2014 04:09:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc:content-type;
 bh=QOYSWiAjNP5ZuJIlUR0Y7UcfjmlGIlSd9m/ofETDviw=;
 b=OzP8juMs/3C5Ii4VPeMfNVoBssrqY2bsP72V4yGhnVM8sAEgTowtzBzJXCSpcIu9LK
 qmhtnyfsI2PvUWlEq9qDQEfQAaxlbKJFjtaV1821VIMorVxOYQXZodoTeRIS/03LlMN2
 53oHUnHgpqkmbi2USUnlKVrStP6VFv2+rlbUMWnGAeGpqVazV1PJOjIEpTqxLMXtwaG3
 jfeqMxorbNjScu+wf7RAkJtCT1YjT+tjRWTPB6DojTwJ/Bb0pA7Q/sNm5nEoY4snTAV1
 qzORnWIoLiD3N/Cebxpx+1WK1fJ3RpMH5ng9EL59GROXBavv2YyIMMbUZtWCLlAYQNqT
 yvYQ==
X-Received: by 10.236.159.65 with SMTP id r41mr44235902yhk.20.1394449778368;
 Mon, 10 Mar 2014 04:09:38 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.170.163.3 with HTTP; Mon, 10 Mar 2014 04:08:58 -0700 (PDT)
In-Reply-To: <531D94CB.7020704@HIDDEN>
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN> <531D94CB.7020704@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Mon, 10 Mar 2014 12:08:58 +0100
Message-ID: <CAAeL0SQZpPwXbRcDsdUUdBGYuG9beDX0gBRZre9eQdXAgXuWTg@HIDDEN>
Subject: Re: bug#16967: frame related race condition
To: martin rudalics <rudalics@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 16967
Cc: 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Mon, Mar 10, 2014 at 11:32 AM, martin rudalics <rudalics@HIDDEN> wrote:

> I checked in a fix in revision 116716.  With that I can't see the
> problem any more.  Can you?

No, but it has a much bigger problem:

 emacs -Q --eval "(make-frame '((visibility . nil)))"

and you end with two visible frames.

I think we're rehashing part of bug#14841's thread.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 10 Mar 2014 10:32:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 06:32:54 2014
Received: from localhost ([127.0.0.1]:58725 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WMxVt-00066J-Fo
	for submit <at> debbugs.gnu.org; Mon, 10 Mar 2014 06:32:53 -0400
Received: from mout.gmx.net ([212.227.15.19]:63690)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1WMxVr-00066B-6s
 for 16967 <at> debbugs.gnu.org; Mon, 10 Mar 2014 06:32:52 -0400
Received: from [188.23.120.186] ([188.23.120.186]) by mail.gmx.com (mrgmx101)
 with ESMTPSA (Nemesis) id 0M5HZD-1X6Ffa05Nv-00zVbZ;
 Mon, 10 Mar 2014 11:32:49 +0100
Message-ID: <531D94CB.7020704@HIDDEN>
Date: Mon, 10 Mar 2014 11:32:43 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
Subject: Re: bug#16967: frame related race condition
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
 <531D8028.8020807@HIDDEN>
In-Reply-To: <531D8028.8020807@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:a0qdpHfokx1bDGHX6QYJACTAFt67pZCcJNP+v0PKPk88WVq7JjE
 df3GhBubKaW9vIH2QbhD6uOvmEbKFzN/K2ajMHOTYQ1YwtTMEKA8g+6NPkHc3S4R1idp4cu
 cXuktKpHNEhGfsN7nR5QzpXvYXjmzNWSikGyO3tayWOehgkHKro3ji7h3EnPj1x94rSeL+M
 pvUYybZEXD01ZRojjrNpg==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 16967
Cc: 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

I checked in a fix in revision 116716.  With that I can't see the
problem any more.  Can you?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at 16967 <at> debbugs.gnu.org:


Received: (at 16967) by debbugs.gnu.org; 10 Mar 2014 09:04:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 05:04:54 2014
Received: from localhost ([127.0.0.1]:58686 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WMw8k-0003W7-6u
	for submit <at> debbugs.gnu.org; Mon, 10 Mar 2014 05:04:54 -0400
Received: from mout.gmx.net ([212.227.17.20]:51029)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rudalics@HIDDEN>) id 1WMw8i-0003Vt-2y
 for 16967 <at> debbugs.gnu.org; Mon, 10 Mar 2014 05:04:52 -0400
Received: from [188.23.120.186] ([188.23.120.186]) by mail.gmx.com (mrgmx101)
 with ESMTPSA (Nemesis) id 0M5Z5A-1X75jt1M6K-00xa0F;
 Mon, 10 Mar 2014 10:04:50 +0100
Message-ID: <531D8028.8020807@HIDDEN>
Date: Mon, 10 Mar 2014 10:04:40 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>
Subject: Re: bug#16967: frame related race condition
References: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
In-Reply-To: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:blFwPUiAf2zN++mPxXnQuGOd8CUVBsGVVrj8yzWf4DR5HKY9Km9
 0ZFFQwnshUkck0j5DnByf6Av8JNM0W0/b/4Q2IqDTmLj/Gbi43QetVTE3jOxppQNmpNBP4n
 hc+iVl8F57UxVyt2bpK93Cd0D0yo5ujfs63nKvk8OlQnBXoI8XqgN5EMuHQNfzptLKfS4aj
 tZ79TpcwQrFkJWKW+qunw==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 16967
Cc: 16967 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

 > emacs -Q
 >
 > then type this in *scratch*
 >
 > (let* ((c (selected-frame))
 >        (f (make-frame)))
 >   (sit-for 0)
 >   (select-frame-set-input-focus f)
 >   (sit-for 0)
 >   (delete-frame c))
 >
 > then evaluate the let repeteadly. It's not hard to get "let*: Attempt
 > to delete the sole visible or iconified frame".

Confirmed.  But doing

(while t
   (let* ((c (selected-frame))
	 (f (make-frame)))
     (sit-for 0)
     (select-frame-set-input-focus f)
     (sit-for 0)
     (delete-frame c)))

here chokes only the first time around and proceeds without complaints
afterwards.  Is it that what you mean or are there additional problems?

And if possible, can you show the value of f->visible of the other
frame, that is the one that should be retained, at the time Emacs
complains that you want to delete its only visible or iconified frame?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Mar 2014 16:20:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 08 11:20:31 2014
Received: from localhost ([127.0.0.1]:56725 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WMJzD-0007IQ-08
	for submit <at> debbugs.gnu.org; Sat, 08 Mar 2014 11:20:31 -0500
Received: from eggs.gnu.org ([208.118.235.92]:34110)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <lekktu@HIDDEN>) id 1WMJzA-0007II-Ra
 for submit <at> debbugs.gnu.org; Sat, 08 Mar 2014 11:20:29 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <lekktu@HIDDEN>) id 1WMJz9-0007LL-Ct
 for submit <at> debbugs.gnu.org; Sat, 08 Mar 2014 11:20:28 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:38742)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <lekktu@HIDDEN>) id 1WMJz9-0007L3-8V
 for submit <at> debbugs.gnu.org; Sat, 08 Mar 2014 11:20:27 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35831)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <lekktu@HIDDEN>) id 1WMJz8-0008UB-5n
 for bug-gnu-emacs@HIDDEN; Sat, 08 Mar 2014 11:20:26 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <lekktu@HIDDEN>) id 1WMJz7-0007Kl-6v
 for bug-gnu-emacs@HIDDEN; Sat, 08 Mar 2014 11:20:26 -0500
Received: from mail-yk0-x22a.google.com ([2607:f8b0:4002:c07::22a]:47596)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <lekktu@HIDDEN>) id 1WMJz6-0007Ka-Ra
 for bug-gnu-emacs@HIDDEN; Sat, 08 Mar 2014 11:20:24 -0500
Received: by mail-yk0-f170.google.com with SMTP id 9so14336218ykp.1
 for <bug-gnu-emacs@HIDDEN>; Sat, 08 Mar 2014 08:20:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:from:date:message-id:subject:to:content-type;
 bh=Jh7opoKW4v+Qs7ZZi8EBeYcHBFw7MNVRAPatDRPr38c=;
 b=mpw8jn0oqqtQviGcp8DClx0OZ+B4aeMia+sX7JRD2Hpcet59TEkSRJYx9EHvQ5LcJK
 8uu4UdC+5D4nDaiWBUsC+Lav8YZOILmzkH+91qv+33ztUOtCtQ3OtQMvw+R8bXLXerR2
 DgCYuU2aYGFTANVMQMbMXHukhRFzpqJcIKul8xFncb3uMSsm49D2eky7V07XKZa1LR7V
 atyIsIpy1f3am9kCAFeeVho7L6bBepOVjcPjgz55KnmdDHrJV2ucxxUnudyULEWAhfbx
 JKvBarJBZDWz+iJMj6aiyScBCwwBVt8DZvvp2zJx7XJ/3AoWvVsGzlEth133kko7qV/5
 eyQA==
X-Received: by 10.236.36.16 with SMTP id v16mr41459yha.153.1394295624003; Sat,
 08 Mar 2014 08:20:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.170.163.3 with HTTP; Sat, 8 Mar 2014 08:19:43 -0800 (PST)
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Sat, 8 Mar 2014 17:19:43 +0100
Message-ID: <CAAeL0SQUPPxzc443mRP2itW0Z7TP_xuMCMyw83qUfY9t_1t+0A@HIDDEN>
Subject: frame related race condition
To: Bug-Gnu-Emacs <bug-gnu-emacs@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Package: emacs
Version: 24.3.50

emacs -Q

then type this in *scratch*

(let* ((c (selected-frame))
       (f (make-frame)))
  (sit-for 0)
  (select-frame-set-input-focus f)
  (sit-for 0)
  (delete-frame c))

then evaluate the let repeteadly. It's not hard to get "let*: Attempt
to delete the sole visible or iconified frame".




Acknowledgement sent to Juanma Barranquero <lekktu@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#16967; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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