GNU bug report logs -
#670
23.0.60; x-create-frame gives wrong-type-argument error
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Thu, 7 Aug 2008 22:35:04 UTC
Severity: normal
Tags: moreinfo
Merged with 1077
Done: Eli Zaretskii <eliz <at> gnu.org>
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 670 in the body.
You can then email your comments to 670 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#670
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Drew Adams" <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Can't really give a precise recipe for this. I have a special-display
function that when called can lead to this:
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>(nil 0)
x-create-frame(((visibility) (width . 100) (width . 80) (height . 14)
(menu-bar-lines . 1) (top . 0) (left . 0) (unsplittable . t) (user-position . t)
(vertical-scroll-bars . right) (height . 14) (width . 80) (unsplittable . t)))
x-create-frame-with-faces(((background-color . "LavenderBlush2") (mouse-color
. "VioletRed") (cursor-color . "VioletRed") (width . 100) (font . "-*-Lucida
Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1") (width . 80) (height . 14)
(mouse-color . "Yellow") (cursor-color . "Yellow") (menu-bar-lines . 1)
(foreground-color . "Black") (background-color . "LightSteelBlue") (top . 0)
(left . 0) (unsplittable . t) (user-position . t) (vertical-scroll-bars . right)
(height . 14) (width . 80) (unsplittable . t)))
make-frame(((background-color . "LavenderBlush2") (mouse-color . "VioletRed")
(cursor-color . "VioletRed") (width . 100) (font . "-*-Lucida
Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1") (width . 80) (height . 14)
(mouse-color . "Yellow") (cursor-color . "Yellow") (menu-bar-lines . 1)
(foreground-color . "Black") (background-color . "LightSteelBlue") (top . 0)
(left . 0) (unsplittable . t) (user-position . t) (vertical-scroll-bars . right)
(height . 14) (width . 80) (unsplittable . t)))
special-display-popup-frame(#<buffer *Completions*> ((background-color .
"LavenderBlush2") (mouse-color . "VioletRed") (cursor-color . "VioletRed")
(width . 100)))
1on1-display-*Completions*-frame(#<buffer *Completions*> ((background-color .
"LavenderBlush2") (mouse-color . "VioletRed") (cursor-color . "VioletRed")
(width . 100)))
apply(1on1-display-*Completions*-frame #<buffer *Completions*>
((background-color . "LavenderBlush2") (mouse-color . "VioletRed") (cursor-color
. "VioletRed") (width . 100)))
special-display-popup-frame(#<buffer *Completions*>
(1on1-display-*Completions*-frame ((background-color . "LavenderBlush2")
(mouse-color . "VioletRed") (cursor-color . "VioletRed") (width . 100))))
...
I can't trace `x-create-frame', so I don't know what `>' test it is
doing here, but perhaps someone else can figure it out. Presumably,
what is happening is that `x-create-frame-with-faces' adds a null
`visibility' frame parameter, and then something in `x-create-frame'
tries to compare that nil value with 0 using `>'.
HTH.
In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
of 2008-08-01 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include
-fno-crossjumping'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ENU
value of $XMODIFIERS: nil
locale-coding-system: cp1252
default-enable-multibyte-characters: t
Major mode: Dired by name
Minor modes in effect:
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <menu-bar> <help-menu> <send-emacs-bug
-report>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Tags added: moreinfo
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Tue, 12 Aug 2008 06:50:10 GMT)
Full text and
rfc822 format available.
Merged 670 1077.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Fri, 03 Oct 2008 18:55:04 GMT)
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#670
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #14 received at 670 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Can't really give a precise recipe for this. I have a special-display
> function that when called can lead to this:
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
> >(nil 0)
Please run Emacs under a debugger, set a breakpoint at `error', trigger
the error, and get a backtrace.
Thanks.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#670
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Drew Adams" <drew.adams <at> oracle.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #19 received at 670 <at> emacsbugs.donarmstrong.com (full text, mbox):
I don't think I received Yidong's reply of 2008-10-15 for some reason, but I see
it now in the bug database:
> Please run Emacs under a debugger, set a breakpoint at `error',
> trigger the error, and get a backtrace.
I don't know how to do that, and I do not have the C source code anyway, in
general.
I looked at the latest w32fns.c in CVS, however, trying to find a `>' test in
x-create-frame, but I didn't make any progress. I even tried diffing with the
Emacs 22 version of w32fns.c (which works), but there were too many diffs to see
what might be the problem.
Can't someone please check the x-create-frame code and see where the problem
might be? I'm afraid that the Lisp backtrace I sent is all I can offer. This is
happening in a call to special-display-popup-frame.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#670
; Package
emacs
.
(Wed, 18 Feb 2009 06:50:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 06 Oct 2009 16:25:16 GMT)
Full text and
rfc822 format available.
Message #24 received at 670 <at> emacsbugs.donarmstrong.com (full text, mbox):
> From: Drew Adams Sent: Saturday, November 22, 2008 8:47 AM
> I don't think I received Yidong's reply of 2008-10-15 for
> some reason, but I see it now in the bug database:
>
> > Please run Emacs under a debugger, set a breakpoint at `error',
> > trigger the error, and get a backtrace.
>
> I don't know how to do that, and I do not have the C source
> code anyway, in general.
>
> I looked at the latest w32fns.c in CVS, however, trying to
> find a `>' test in x-create-frame, but I didn't make any
> progress. I even tried diffing with the Emacs 22 version of
> w32fns.c (which works), but there were too many diffs to see
> what might be the problem.
>
> Can't someone please check the x-create-frame code and see
> where the problem might be? I'm afraid that the Lisp
> backtrace I sent is all I can offer. This is
> happening in a call to special-display-popup-frame.
I am still seeing this in 23.1 (the release):
In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
of 2009-07-29 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>(nil 0)
x-create-frame(((visibility) (width . 80) (height . 14) (menu-bar-lines . 1)
(top . 0) (left . 0) (unsplittable . t) (user-position . t)
(vertical-scroll-bars . right) (height . 14) (width . 80) (unsplittable . t)))
x-create-frame-with-faces(((font . "-*-Lucida
Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1") (width . 80) (height . 14)
(mouse-color . "Yellow") (cursor-color . "Yellow") (menu-bar-lines . 1)
(foreground-color . "Black") (background-color . "LightSteelBlue") (top . 0)
(left . 0) (unsplittable . t) (user-position . t) (vertical-scroll-bars . right)
(height . 14) (width . 80) (unsplittable . t)))
make-frame(((font . "-*-Lucida
Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1") (width . 80) (height . 14)
(mouse-color . "Yellow") (cursor-color . "Yellow") (menu-bar-lines . 1)
(foreground-color . "Black") (background-color . "LightSteelBlue") (top . 0)
(left . 0) (unsplittable . t) (user-position . t) (vertical-scroll-bars . right)
(height . 14) (width . 80) (unsplittable . t)))
special-display-popup-frame(#<buffer *Messages*> nil)
display-buffer(#<buffer *Messages*>)
mouse-drag-region((down-mouse-1 (#<window 6 on *Minibuf-0*> 1 (391 . 18)
-136706397 nil 1 (43 . 0) nil (391 . 18) (9 . 15))))
call-interactively(mouse-drag-region nil nil)
Can no one check the x-create-frame code to see what the problem might be?
I'm using a standalone minibuffer frame.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#670
; Package
emacs
.
(Sat, 27 Nov 2010 02:47:04 GMT)
Full text and
rfc822 format available.
Message #27 received at 670 <at> debbugs.gnu.org (full text, mbox):
I am still seeing this systematically, including in the latest dev version,
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2010-11-22 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
Below is a backtrace from this current version.
One scenario that provokes the error:
I have a standalone minibuffer frame. I bind a key in `completion-list-mode-map'
during minibuffer completion to call `describe-function' on a command name
candidate in *Completions* that is clicked with mouse-2. *Help*, like
*Completions* is a special-display buffer that appears in its own frame. Input
from *Completions* is redirected to the minibuffer.
I do C-h f and get some candidates in *Completions*. I click one with mouse-2.
*Help* shows its doc. I click the file-name link in *Help* to see the source
library for the function. That's when I get the error.
Same thing if I use a key bound in `minibuffer-must-match-map' and type a
candidate then hit that key. Either way I see the function doc in *Help*, and
when I click the file-name link I get the error.
There are other ways to reproduce it. They all involve an action during
minibuffer completion.
Another clue, perhaps: I get this error when I do something in the minibuffer
(invoke some function) that tries to create a frame. For example, if the *Help*
frame doesn't already exist when I hit the key mentioned above to show the
output from `describe-function' (for some completion candidate) in *Help*, then
I get the error when it tries to create the *Help* frame.
I tried to follow `display-buffer' in the debugger. I can't get further than
the C-code call to x-create-frame. If you look at the date when I originally
filed this bug you should be able to see when some change was made to the
x-create-frame C-code that introduced this regression. At least you should be
able to see some code in x-create-frame or called from it that tries to test (>
SOMETHING1 SOMETHING2), which ends up calling (> nil 0), raising the error. I
tried ediffing the Emacs 22.1 C code for x-create-frame against the current C
code for it, but I couldn't guess anything (that single function definition
alone is over 12,000 chars!).
It's been this way since Emacs 23 (even pretests for 23). No one has tried to
look into this.
-----------------------
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>(nil 0)
x-create-frame(((visibility) (tool-bar-lines . 0) (fringe . 0) (right-fringe .
0) (left-fringe . 0) (icon-type) (vertical-scroll-bars . right) (user-position .
t) (minibuffer) (height . 35) (width . 80) (left . 0) (top . 0) (menu-bar-lines
. 1) (cursor-type . bar)))
x-create-frame-with-faces(((tool-bar-lines . 0) (fringe . 0) (right-fringe .
0) (left-fringe . 0) (icon-type) (vertical-scroll-bars . right) (user-position .
t) (minibuffer) (height . 35) (width . 80) (left . 0) (top . 0) (menu-bar-lines
. 1) (cursor-type . bar) (cursor-color . "Red") (mouse-color . "Red") (font .
"-*-Lucida Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1") (background-color .
"LightBlue") (foreground-color . "Black")))
make-frame(nil)
(lambda nil (make-frame pop-up-frame-alist))()
funcall((lambda nil (make-frame pop-up-frame-alist)))
(frame-selected-window (funcall pop-up-frame-function))
(let ((win (frame-selected-window (funcall pop-up-frame-function))))
(window--display-buffer-2 buffer win display-buffer-mark-dedicated))
(cond ((not (buffer-live-p buffer)) (error "No such buffer %s" buffer))
(display-buffer-function (funcall display-buffer-function buffer
not-this-window)) ((and (not not-this-window) (eq (window-buffer
(selected-window)) buffer)) (window--display-buffer-1 (selected-window))) ((and
can-use-selected-window (same-window-p name-of-buffer))
(window--display-buffer-2 buffer (selected-window))) ((let ((frames (or frame
(and (or use-pop-up-frames display-buffer-reuse-frames ...) 0)
(last-nonminibuffer-frame)))) (setq window-to-use (catch (quote found) (dolist
(window (get-buffer-window-list buffer ... frames)) (when (or
can-use-selected-window ...) (throw ... window)))))) (window--display-buffer-1
window-to-use)) ((and special-display-function (let ((pars (special-display-p
name-of-buffer))) (when pars (funcall special-display-function buffer (if (listp
pars) pars)))))) ((or use-pop-up-frames (not frame-to-use)) (let ((win
(frame-selected-window (funcall pop-up-frame-function))))
(window--display-buffer-2 buffer win display-buffer-mark-dedicated))) ((and
pop-up-windows (or (not (frame-parameter frame-to-use (quote unsplittable)))
(and (eq frame-to-use (selected-frame)) (setq frame-to-use
(last-nonminibuffer-frame)) (window--frame-usable-p frame-to-use) (not
(frame-parameter frame-to-use (quote unsplittable))))) (setq window-to-use (or
(window--try-to-split-window (get-largest-window frame-to-use t))
(window--try-to-split-window (get-lru-window frame-to-use t)))))
(window--display-buffer-2 buffer window-to-use display-buffer-mark-dedicated))
((let ((window-to-undedicate (and not-this-window (not (window-dedicated-p))
(set-window-dedicated-p (selected-window) t) (selected-window))))
(unwind-protect (setq window-to-use (or (get-lru-window frame-to-use) (let (...)
(unless ... window)) (get-largest-window (quote visible)) (let (...) (unless ...
window)) (get-largest-window 0) (frame-selected-window (funcall
pop-up-frame-function)))) (when (window-live-p window-to-undedicate)
(set-window-dedicated-p window-to-undedicate nil))))
(window--even-window-heights window-to-use) (window--display-buffer-2 buffer
window-to-use)))
(let* ((can-use-selected-window (not (or not-this-window (window-dedicated-p
(selected-window)) (window-minibuffer-p)))) (buffer (if (bufferp buffer-or-name)
buffer-or-name (get-buffer buffer-or-name))) (name-of-buffer (buffer-name
buffer)) (use-pop-up-frames (if (eq pop-up-frames (quote graphic-only))
(display-graphic-p) pop-up-frames)) (frame-to-use (or (window--frame-usable-p
(selected-frame)) (window--frame-usable-p (last-nonminibuffer-frame))))
window-to-use) (cond ((not (buffer-live-p buffer)) (error "No such buffer %s"
buffer)) (display-buffer-function (funcall display-buffer-function buffer
not-this-window)) ((and (not not-this-window) (eq (window-buffer
(selected-window)) buffer)) (window--display-buffer-1 (selected-window))) ((and
can-use-selected-window (same-window-p name-of-buffer))
(window--display-buffer-2 buffer (selected-window))) ((let ((frames (or frame
(and ... 0) (last-nonminibuffer-frame)))) (setq window-to-use (catch (quote
found) (dolist (window ...) (when ... ...))))) (window--display-buffer-1
window-to-use)) ((and special-display-function (let ((pars (special-display-p
name-of-buffer))) (when pars (funcall special-display-function buffer (if ...
pars)))))) ((or use-pop-up-frames (not frame-to-use)) (let ((win
(frame-selected-window (funcall pop-up-frame-function))))
(window--display-buffer-2 buffer win display-buffer-mark-dedicated))) ((and
pop-up-windows (or (not (frame-parameter frame-to-use (quote unsplittable)))
(and (eq frame-to-use (selected-frame)) (setq frame-to-use
(last-nonminibuffer-frame)) (window--frame-usable-p frame-to-use) (not
(frame-parameter frame-to-use ...)))) (setq window-to-use (or
(window--try-to-split-window (get-largest-window frame-to-use t))
(window--try-to-split-window (get-lru-window frame-to-use t)))))
(window--display-buffer-2 buffer window-to-use display-buffer-mark-dedicated))
((let ((window-to-undedicate (and not-this-window (not ...)
(set-window-dedicated-p ... t) (selected-window)))) (unwind-protect (setq
window-to-use (or (get-lru-window frame-to-use) (let ... ...)
(get-largest-window ...) (let ... ...) (get-largest-window 0)
(frame-selected-window ...))) (when (window-live-p window-to-undedicate)
(set-window-dedicated-p window-to-undedicate nil))))
(window--even-window-heights window-to-use) (window--display-buffer-2 buffer
window-to-use))))
display-buffer(#<buffer delim-col.el> nil)
pop-to-buffer(#<buffer delim-col.el>)
Merged 670 1077.
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 27 Nov 2010 08:16:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 07 Jan 2011 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 225 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.