unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <1077@debbugs.gnu.org>, <1077@emacsbugs.donarmstrong.com>,
	<emacs-pretest-bug@gnu.org>, <670@emacsbugs.donarmstrong.com>
Subject: bug#670: bug#1077: 23.0.60; x-create-frame: (wrong-type-argument number-or-marker-p nil)
Date: Fri, 26 Nov 2010 18:52:09 -0800	[thread overview]
Message-ID: <96BC00F728B94AC18A15EA95B66C5248@us.oracle.com> (raw)
In-Reply-To: <8F1F8998D60341099C4204B7BDD8AD4F@us.oracle.com>

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>)






  reply	other threads:[~2010-11-27  2:52 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-03 17:22 bug#1077: 23.0.60; x-create-frame: (wrong-type-argument number-or-marker-p nil) Drew Adams
2008-10-04 16:38 ` Drew Adams
2008-11-22 16:46   ` bug#670: " Drew Adams
2009-10-06 16:19     ` Drew Adams
2010-11-27  2:52       ` Drew Adams [this message]
2010-11-27  8:22         ` bug#1077: " Eli Zaretskii
2010-11-27 16:15           ` Drew Adams
2010-11-27 20:10             ` Eli Zaretskii
2010-11-27 23:32               ` Drew Adams
2010-11-28  7:21                 ` Eli Zaretskii
2010-11-28  9:50                   ` martin rudalics
2010-11-28 13:41                     ` Eli Zaretskii
2010-11-28 14:12                       ` martin rudalics
2010-11-28 17:29                         ` Drew Adams
2010-11-28 17:26                   ` Drew Adams
2010-11-28 17:50                     ` Eli Zaretskii
2010-11-28 18:42                       ` Drew Adams
2010-11-28 19:54                         ` Eli Zaretskii
2010-11-28 22:38                           ` Drew Adams
2010-11-28 20:43                         ` Stefan Monnier
2010-11-28 19:40                     ` Eli Zaretskii
2010-11-28 19:46                       ` Drew Adams
2010-11-28 20:23                         ` Eli Zaretskii
2010-11-29 10:56                       ` martin rudalics
2010-11-29 18:58                         ` Eli Zaretskii
2010-11-29 20:14                           ` martin rudalics
2010-11-29 21:18                             ` Eli Zaretskii
2010-11-29 21:33                               ` Drew Adams
2010-11-30  4:05                                 ` Eli Zaretskii
2010-11-30  7:56                                   ` martin rudalics
2010-11-30 11:23                                     ` Eli Zaretskii
2010-11-30 14:01                                       ` martin rudalics
2010-11-30 15:11                                         ` Eli Zaretskii
2010-11-30 15:56                                           ` Drew Adams
2010-11-30 17:07                                             ` martin rudalics
2010-11-30 17:57                                               ` Drew Adams
2010-11-30 19:49                                                 ` martin rudalics
2010-11-30 20:16                                                   ` Drew Adams
2010-11-30 18:20                                               ` Eli Zaretskii
2010-11-30 18:16                                             ` Eli Zaretskii
2010-11-30 19:16                                               ` Drew Adams
2010-11-30 17:05                                           ` martin rudalics
2010-11-30 17:57                                             ` Drew Adams
2010-11-30 18:27                                               ` Eli Zaretskii
2010-11-30 19:50                                                 ` martin rudalics
2010-11-30 20:18                                                   ` Drew Adams
2010-12-01  9:58                                                     ` martin rudalics
2010-12-01 15:13                                                       ` Drew Adams
2010-12-01 17:28                                                         ` martin rudalics
2010-12-01 18:19                                                           ` Drew Adams
2010-11-30 19:49                                               ` martin rudalics
2010-11-30 20:17                                                 ` Drew Adams
2010-11-30 18:18                                             ` Eli Zaretskii
2010-12-01  9:58                                               ` martin rudalics
2010-12-01 17:21                                                 ` Eli Zaretskii
2010-12-01 15:05                                       ` Lennart Borgman
2010-11-30 11:42                                     ` Eli Zaretskii
2010-11-30 15:42                                       ` Drew Adams
2010-11-30 18:12                                         ` Eli Zaretskii
2010-11-30 19:16                                           ` Drew Adams
2010-12-09 19:11                                           ` Eli Zaretskii
2010-12-01 15:48                                     ` Stefan Monnier
2010-12-01 17:27                                       ` martin rudalics
2010-11-30 20:21 ` Drew Adams
2010-11-30 21:28   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96BC00F728B94AC18A15EA95B66C5248@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=1077@debbugs.gnu.org \
    --cc=1077@emacsbugs.donarmstrong.com \
    --cc=670@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).