GNU bug report logs - #16738
Errors while resizing vertically

Previous Next

Package: emacs;

Reported by: E Sabof <esabof <at> gmail.com>

Date: Thu, 13 Feb 2014 10:07:02 UTC

Severity: normal

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16738 in the body.
You can then email your comments to 16738 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Thu, 13 Feb 2014 10:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to E Sabof <esabof <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 13 Feb 2014 10:07:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: E Sabof <esabof <at> gmail.com>
To: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org>
Subject: Errors while resizing vertically
Date: Thu, 13 Feb 2014 10:06:13 +0000
Another one without a clear recipe. I am using the following function on a fairly regular basis:

(defun es-maximize-window-vertically (&optional window)
    (interactive)
    (cl-callf window-normalize-window window)
    (unless (eq window (frame-root-window))
      (window-resize window (window-max-delta window))))

In combination with:

(setq window-min-height 1)

Sometimes it causes errors such as the ones below. In this state a) I can't resize any windows, using the above function. b) I can still resize using the mouse. c) Once I do, I usually can resize once with this function, but then I get a similar error again.

Evgeni

BACKTRACE1:

Debugger entered--Lisp error: (error "Cannot resize window #<window 128 on *Ack-and-a-half*>")
  signal(error ("Cannot resize window #<window 128 on *Ack-and-a-half*>"))
  error("Cannot resize window %s" #<window 128 on *Backtrace*>)
  window-resize(#<window 128 on *Backtrace*> 28)
  (if (eq window (frame-root-window)) nil (window-resize window (window-max-delta window)))
  es-maximize-window-vertically()
  call-interactively(es-maximize-window-vertically nil nil)
  command-execute(es-maximize-window-vertically)

BACKTRACE2

Debugger entered--Lisp error: (args-out-of-range -17 0 2147483647)
  set-window-new-pixel(#<window 299 on *mu4e-headers*> -17 t)
  window--resize-child-windows(#<window 301> -595 nil #<window 303 on *Backtrace*> nil nil nil nil)
  window--resize-siblings(#<window 303 on *Backtrace*> 595 nil nil)
  window-resize(#<window 303 on *Backtrace*> 35)
  (if (eq window (frame-root-window)) nil (window-resize window (window-max-delta window)))
  es-maximize-window-vertically()
  call-interactively(es-maximize-window-vertically nil nil)
  command-execute(es-maximize-window-vertically)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Fri, 14 Feb 2014 11:41:02 GMT) Full text and rfc822 format available.

Message #8 received at 16738 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: E Sabof <esabof <at> gmail.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 16738 <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Fri, 14 Feb 2014 12:39:58 +0100
> Debugger entered--Lisp error: (error "Cannot resize window #<window 128 on *Ack-and-a-half*>")
>   signal(error ("Cannot resize window #<window 128 on *Ack-and-a-half*>"))
>   error("Cannot resize window %s" #<window 128 on *Backtrace*>)
>   window-resize(#<window 128 on *Backtrace*> 28)
>   (if (eq window (frame-root-window)) nil (window-resize window (window-max-delta window)))
>   es-maximize-window-vertically()
>   call-interactively(es-maximize-window-vertically nil nil)
>   command-execute(es-maximize-window-vertically)

I can easily reproduce such an error here.  Do you have a boxed mode- or
header-line, or anything that makes these lines higher or lower than an
average normal line?

I'll check in a fix for this soon, but I still see a related bug whose
cause I wasn't able to identify yet.

> BACKTRACE2
>
> Debugger entered--Lisp error: (args-out-of-range -17 0 2147483647)
>   set-window-new-pixel(#<window 299 on *mu4e-headers*> -17 t)
>   window--resize-child-windows(#<window 301> -595 nil #<window 303 on *Backtrace*> nil nil nil nil)
>   window--resize-siblings(#<window 303 on *Backtrace*> 595 nil nil)
>   window-resize(#<window 303 on *Backtrace*> 35)
>   (if (eq window (frame-root-window)) nil (window-resize window (window-max-delta window)))
>   es-maximize-window-vertically()
>   call-interactively(es-maximize-window-vertically nil nil)
>   command-execute(es-maximize-window-vertically)

This sounds strange.  Paul, how can such a thing happen?

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Sat, 15 Feb 2014 02:09:02 GMT) Full text and rfc822 format available.

Message #11 received at 16738 <at> debbugs.gnu.org (full text, mbox):

From: E Sabof <esabof <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 16738 <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Sat, 15 Feb 2014 02:08:50 +0000
> I can easily reproduce such an error here.  Do you have a boxed mode- or
> header-line, or anything that makes these lines higher or lower than an
> average normal line?

My header-line has an overline + underline, which apparently make the face 2 pixels higher. I might also have been using non-standard size font-lock faces.

Evgeni




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Sun, 16 Feb 2014 10:33:02 GMT) Full text and rfc822 format available.

Message #14 received at 16738 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: E Sabof <esabof <at> gmail.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 16738 <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Sun, 16 Feb 2014 11:32:36 +0100
> My header-line has an overline + underline, which apparently make the face 2 pixels higher. I might also have been using non-standard size font-lock faces.

This explains it.  You shouldn't see the bug with "normal" header-
and mode-lines.

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Fri, 21 Feb 2014 13:08:03 GMT) Full text and rfc822 format available.

Message #17 received at 16738 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: E Sabof <esabof <at> gmail.com>
Cc: 16738 <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Fri, 21 Feb 2014 14:07:32 +0100
> Another one without a clear recipe. I am using the following function on a fairly regular basis:
> 
> (defun es-maximize-window-vertically (&optional window)
>     (interactive)
>     (cl-callf window-normalize-window window)
>     (unless (eq window (frame-root-window))
>       (window-resize window (window-max-delta window))))
> 
> In combination with:
> 
> (setq window-min-height 1)
> 
> Sometimes it causes errors such as the ones below. In this state a) I can't resize any windows, using the above function. b) I can still resize using the mouse. c) Once I do, I usually can resize once with this function, but then I get a similar error again.
> 
> Evgeni
> 
> BACKTRACE1:
> 
> Debugger entered--Lisp error: (error "Cannot resize window #<window 128 on *Ack-and-a-half*>")
>   signal(error ("Cannot resize window #<window 128 on *Ack-and-a-half*>"))
>   error("Cannot resize window %s" #<window 128 on *Backtrace*>)
>   window-resize(#<window 128 on *Backtrace*> 28)
>   (if (eq window (frame-root-window)) nil (window-resize window (window-max-delta window)))
>   es-maximize-window-vertically()
>   call-interactively(es-maximize-window-vertically nil nil)
>   command-execute(es-maximize-window-vertically)

Hopefully fixed with revision 116504 on trunk.  Please try again.

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Fri, 21 Feb 2014 13:09:01 GMT) Full text and rfc822 format available.

Message #20 received at 16738 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: E Sabof <esabof <at> gmail.com>, 16738 <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Fri, 21 Feb 2014 14:07:58 +0100
>  > Debugger entered--Lisp error: (args-out-of-range -17 0 2147483647)
>  >   set-window-new-pixel(#<window 299 on *mu4e-headers*> -17 t)
>  >   window--resize-child-windows(#<window 301> -595 nil #<window 303 on
> *Backtrace*> nil nil nil nil)
>  >   window--resize-siblings(#<window 303 on *Backtrace*> 595 nil nil)
>  >   window-resize(#<window 303 on *Backtrace*> 35)
>  >   (if (eq window (frame-root-window)) nil (window-resize window
> (window-max-delta window)))
>  >   es-maximize-window-vertically()
>  >   call-interactively(es-maximize-window-vertically nil nil)
>  >   command-execute(es-maximize-window-vertically)
>
> This sounds strange.  Paul, how can such a thing happen?

Paul Eggert - this was your change:

	Minor integer overflow fixes (Bug#16033).
	* window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
	This improves on the previous fix to this function.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Fri, 21 Feb 2014 20:30:03 GMT) Full text and rfc822 format available.

Message #23 received at 16738 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: martin rudalics <rudalics <at> gmx.at>
Cc: E Sabof <esabof <at> gmail.com>, 16738 <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Fri, 21 Feb 2014 12:29:31 -0800
[Message part 1 (text/plain, inline)]
My change adjusted set-window-new-pixel so that it rejects attempts to 
set the new pixel size to a negative value. Here, new-pixel is currently 
0, so (set-window-new-pixel window-17 t) is attempting to change 
new-pixel to be -17.

Are negative new-pixel values allowed?  If so, the attached patch should 
fix the problem.  If not, the problem's probably in the caller.


[newpixel.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Fri, 21 Feb 2014 21:30:04 GMT) Full text and rfc822 format available.

Message #26 received at 16738 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: E Sabof <esabof <at> gmail.com>, 16738 <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Fri, 21 Feb 2014 22:29:30 +0100
> My change adjusted set-window-new-pixel so that it rejects attempts to
> set the new pixel size to a negative value. Here, new-pixel is currently
> 0, so (set-window-new-pixel window-17 t) is attempting to change
> new-pixel to be -17.

Indeed.  Storing a negative pixel value is an error.

> Are negative new-pixel values allowed?  If so, the attached patch should
> fix the problem.  If not, the problem's probably in the caller.

There was a bug in the caller - hopefully fixed now.  No further action
needed from your side.

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Mon, 24 Feb 2014 00:04:01 GMT) Full text and rfc822 format available.

Message #29 received at 16738 <at> debbugs.gnu.org (full text, mbox):

From: E Sabof <esabof <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 16738 <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Mon, 24 Feb 2014 00:03:23 +0000
I've tried the new code. With the following:

(setq window-min-height 1)
(set-face-attribute 'mode-line nil :overline "black")

,I'm unable to make windows any shorter than 2.

Evgeni




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Mon, 24 Feb 2014 07:41:04 GMT) Full text and rfc822 format available.

Message #32 received at 16738 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: E Sabof <esabof <at> gmail.com>
Cc: 16738 <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Mon, 24 Feb 2014 08:40:04 +0100
> I've tried the new code. With the following:
>
> (setq window-min-height 1)
> (set-face-attribute 'mode-line nil :overline "black")
>
> ,I'm unable to make windows any shorter than 2.

2 canonical lines.  But this is to be expected?  Otherwise, Emacs would
truncate the text line by the extra pixels needed for the mode line.

Whenever using a non-standard sized mode- or header-line _and_ a small
window-min-height/-width I recommend setting `window-resize-pixelwise'
to t.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Mon, 24 Feb 2014 13:07:01 GMT) Full text and rfc822 format available.

Message #35 received at 16738 <at> debbugs.gnu.org (full text, mbox):

From: E Sabof <esabof <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 16738 <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Mon, 24 Feb 2014 13:06:47 +0000
martin rudalics <rudalics <at> gmx.at> writes:

> 2 canonical lines.  But this is to be expected?  Otherwise, Emacs would
> truncate the text line by the extra pixels needed for the mode line.

The finer details of pixel and character coexistence on graphical frames tend escape me. If I encounter any more errors, I will report them.

Evgeni




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16738; Package emacs. (Wed, 26 Feb 2014 10:17:02 GMT) Full text and rfc822 format available.

Message #38 received at 16738 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: E Sabof <esabof <at> gmail.com>
Cc: 16738 <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Wed, 26 Feb 2014 11:15:48 +0100
>> 2 canonical lines.  But this is to be expected?  Otherwise, Emacs would
>> truncate the text line by the extra pixels needed for the mode line.
>
> The finer details of pixel and character coexistence on graphical frames tend escape me. If I encounter any more errors, I will report them.

Suppose you have a canonical character height of 8 pixels and a header
and a mode line with 2 additional pixels each.  If you now set
`window-min-height' to 1, Emacs will display a text line of 4 pixels
height if we do not round appropriately.  That wouldn't look good.

martin




Reply sent to martin rudalics <rudalics <at> gmx.at>:
You have taken responsibility. (Fri, 19 Sep 2014 08:19:07 GMT) Full text and rfc822 format available.

Notification sent to E Sabof <esabof <at> gmail.com>:
bug acknowledged by developer. (Fri, 19 Sep 2014 08:19:08 GMT) Full text and rfc822 format available.

Message #43 received at 16738-done <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: E Sabof <esabof <at> gmail.com>
Cc: 16738-done <at> debbugs.gnu.org
Subject: Re: bug#16738: Errors while resizing vertically
Date: Fri, 19 Sep 2014 10:18:50 +0200
> Hopefully fixed with revision 116504 on trunk.  Please try again.

Closing.

martin






bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 17 Oct 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 308 days ago.

Previous Next


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