* selected-frame and selected-window [not found] ` <837gpgvz81.fsf@gnu.org> @ 2012-11-20 20:37 ` Stefan Monnier 2012-11-21 17:05 ` Stefan Monnier 2012-12-08 12:24 ` Eli Zaretskii 0 siblings, 2 replies; 7+ messages in thread From: Stefan Monnier @ 2012-11-20 20:37 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel > This is assertion violation in redisplay_internal, here: > eassert (EQ (XFRAME (selected_frame)->selected_window, > selected_window)); > This crash is probably of the kind you reported in the past, related > to the selected-frame/selected-window issues. I'm not sure is that assertion is actually right. 99% of the time the (frame-selected-window) is the same as the (selected-window), but there are some exceptions. So far I found two: - one in the redisplay, where we change selected-frame (without changing selected-window) just to get the frame-local variables. As soon as we drop frame-local variables, this one will disappear (e.g. it's gone in my local branch). - one in the mode-line computation. This one is nasty because it is visible to lisp: while running an (:eval <form>) element, we change selected-window (without changing frame-selected-window) to the window being redisplayed. So in <form>, it is not always true that (eq (selected-window) (frame-selected-window)). To some extent this could be a feature (lets you return different data for the mode-line depending on whether it's selected or not), but I'd rather get this information differently since it is so easy to assume that (eq (selected-window) (frame-selected-window)) without being aware of it. There might be more cases: I added a whole bunch of `eassert's where the assertion is refined to try and take the above discrepancies into account, and those get caught occasionally. I haven't managed to track down their cause yet. It might just be a bug in the assertions. Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: selected-frame and selected-window 2012-11-20 20:37 ` selected-frame and selected-window Stefan Monnier @ 2012-11-21 17:05 ` Stefan Monnier 2012-12-08 12:24 ` Eli Zaretskii 1 sibling, 0 replies; 7+ messages in thread From: Stefan Monnier @ 2012-11-21 17:05 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel > 99% of the time the (frame-selected-window) is the same as the > (selected-window), but there are some exceptions. So far I found two: I just found and corrected (on trunk) a third case (in update_tool_bar). Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: selected-frame and selected-window 2012-11-20 20:37 ` selected-frame and selected-window Stefan Monnier 2012-11-21 17:05 ` Stefan Monnier @ 2012-12-08 12:24 ` Eli Zaretskii 2012-12-08 23:51 ` Stefan Monnier 1 sibling, 1 reply; 7+ messages in thread From: Eli Zaretskii @ 2012-12-08 12:24 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel > From: Stefan Monnier <monnier@IRO.UMontreal.CA> > Cc: emacs-devel@gnu.org > Date: Tue, 20 Nov 2012 15:37:05 -0500 > > > This is assertion violation in redisplay_internal, here: > > eassert (EQ (XFRAME (selected_frame)->selected_window, > > selected_window)); > > This crash is probably of the kind you reported in the past, related > > to the selected-frame/selected-window issues. > > I'm not sure is that assertion is actually right. Well, "bzr annotate" says you added it ;-) Should we just go ahead and remove it? Inaccurate assertions are a maintenance headache, to say nothing of user aggravation. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: selected-frame and selected-window 2012-12-08 12:24 ` Eli Zaretskii @ 2012-12-08 23:51 ` Stefan Monnier 2012-12-09 3:50 ` Eli Zaretskii 0 siblings, 1 reply; 7+ messages in thread From: Stefan Monnier @ 2012-12-08 23:51 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel >> > This is assertion violation in redisplay_internal, here: >> > eassert (EQ (XFRAME (selected_frame)->selected_window, >> > selected_window)); >> > This crash is probably of the kind you reported in the past, related >> > to the selected-frame/selected-window issues. >> I'm not sure is that assertion is actually right. > Well, "bzr annotate" says you added it ;-) > Should we just go ahead and remove it? Inaccurate assertions are a > maintenance headache, to say nothing of user aggravation. The rest of my message mentioned reasons why the equality is sometimes broken. Now, I tend to consider that those cases should be considered bugs, because IIRC there are cases where we do rely on this equality. More specifically, I added such easserts in an effort to track the origin of an error. But to fix these bugs we need to figure out how to handle the "mode-line :eval" case. Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: selected-frame and selected-window 2012-12-08 23:51 ` Stefan Monnier @ 2012-12-09 3:50 ` Eli Zaretskii 2012-12-14 15:53 ` Stefan Monnier 0 siblings, 1 reply; 7+ messages in thread From: Eli Zaretskii @ 2012-12-09 3:50 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel > From: Stefan Monnier <monnier@iro.umontreal.ca> > Cc: emacs-devel@gnu.org > Date: Sat, 08 Dec 2012 18:51:40 -0500 > > >> > This is assertion violation in redisplay_internal, here: > >> > eassert (EQ (XFRAME (selected_frame)->selected_window, > >> > selected_window)); > >> > This crash is probably of the kind you reported in the past, related > >> > to the selected-frame/selected-window issues. > >> I'm not sure is that assertion is actually right. > > Well, "bzr annotate" says you added it ;-) > > Should we just go ahead and remove it? Inaccurate assertions are a > > maintenance headache, to say nothing of user aggravation. > > The rest of my message mentioned reasons why the equality is > sometimes broken. Yes, I know. But a broken assertion is a candidate for removal, IMO. > Now, I tend to consider that those cases should be considered bugs, > because IIRC there are cases where we do rely on this equality. If you or someone else can describe those cases, we could use that knowledge to modify the assertion or fix the bugs which violate it. > More specifically, I added such easserts in an effort to track the > origin of an error. We are evidently unable to do that in a long time. All we do is cause user aggravation and add to maintenance load. > But to fix these bugs we need to figure out how to handle the "mode-line > :eval" case. Do you have any practical suggestions for that? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: selected-frame and selected-window 2012-12-09 3:50 ` Eli Zaretskii @ 2012-12-14 15:53 ` Stefan Monnier 2012-12-14 16:04 ` Eli Zaretskii 0 siblings, 1 reply; 7+ messages in thread From: Stefan Monnier @ 2012-12-14 15:53 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel >> The rest of my message mentioned reasons why the equality is >> sometimes broken. > Yes, I know. But a broken assertion is a candidate for removal, IMO. Agreed. >> Now, I tend to consider that those cases should be considered bugs, >> because IIRC there are cases where we do rely on this equality. > If you or someone else can describe those cases, we could use that > knowledge to modify the assertion or fix the bugs which violate it. I did describe them. I actually just installed a tentative fix for those problems. Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: selected-frame and selected-window 2012-12-14 15:53 ` Stefan Monnier @ 2012-12-14 16:04 ` Eli Zaretskii 0 siblings, 0 replies; 7+ messages in thread From: Eli Zaretskii @ 2012-12-14 16:04 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel > From: Stefan Monnier <monnier@iro.umontreal.ca> > Cc: emacs-devel@gnu.org > Date: Fri, 14 Dec 2012 10:53:32 -0500 > > I actually just installed a tentative fix for those problems. Great, thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-12-14 16:04 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <E434CEB9297E432AA3570AF8C351C084@us.oracle.com> [not found] ` <jwvlidynywq.fsf-monnier+emacs@gnu.org> [not found] ` <83y5hyxnb1.fsf@gnu.org> [not found] ` <jwvsj86me1m.fsf-monnier+emacs@gnu.org> [not found] ` <83wqxhy4ha.fsf@gnu.org> [not found] ` <jwv62513216.fsf-monnier+emacs@gnu.org> [not found] ` <83fw45xxzk.fsf@gnu.org> [not found] ` <jwv39051lyw.fsf-monnier+emacs@gnu.org> [not found] ` <83ehjpxwqd.fsf@gnu.org> [not found] ` <jwvr4npz8az.fsf-monnier+emacs@gnu.org> [not found] ` <838v9xxss8.fsf@gnu.org> [not found] ` <jwvy5hxxpv3.fsf-monnier+emacs@gnu.org> [not found] ` <83zk2dvsba.fsf@gnu.org> [not found] ` <jwvd2z8na6f.fsf-monnier+emacs@gnu.org> [not found] ` <CAAeL0STTFjDRCjWUbQJOc1=YdF+M9JG6_BypOfr1X9_vQN+yeg@mail.gmail.com> [not found] ` <A5B77C60B99D463D8B4818431132BD6F@us.oracle.com> [not found] ` <83ip90w48g.fsf@gnu.org> [not found] ` <4AB1E6AB8BB448AAB037D70CBECBFD9D@us.oracle.com> [not found] ` <83d2z8w2na.fsf@gnu.org> [not found] ` <CAH8Pv0j-ZFs1xSpsSFy3QW9MP3zDO6nzaNGvUtYr8-UTJ3ifWw@mail.gmail.com> [not found] ` <837gpgvz81.fsf@gnu.org> 2012-11-20 20:37 ` selected-frame and selected-window Stefan Monnier 2012-11-21 17:05 ` Stefan Monnier 2012-12-08 12:24 ` Eli Zaretskii 2012-12-08 23:51 ` Stefan Monnier 2012-12-09 3:50 ` Eli Zaretskii 2012-12-14 15:53 ` Stefan Monnier 2012-12-14 16:04 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).