Subject: bug#13359: 23.4; bad text pointer cursor: BadValue (integer parameter out of range for operation)

From: micah <[email-masked]>
Date: Fri, 04 Jan 2013 11:14:48 -0500

Hi,

I have a simple function defined that makes a frame and calls
'org-capture' when it is invoked:

(defun make-capture-frame ()
  "Create a new frame and run org-capture."
  (interactive)
  (make-frame '((name . "capture") (width . 80 ) (height . 10)))
  (select-frame-by-name "capture")
  (org-capture)
  (delete-other-windows)
)

I do M-x server-start, and then I use emacsclient to call this function
(so I can bind a key in my window manager to call it and have a window
pop up anywhere). 

Everything works great! Except... at some point it stops working at all.

So, when it stops, I go to a shell and execute the emacsclient line to
see if I can figure out what is going on:

$ emacsclient --eval '(make-capture-frame)'
*ERROR*: bad text pointer cursor: BadValue (integer parameter out of range for operation)
$

I have no idea what this means, or how to debug it. I can still run M-x
org-capture, so that seems to still work, but otherwise I'm puzzled...

At the moment, I'm getting that *ERROR* and so am running M-x
report-emacs-bug. If I restart emacs, it will go away, for a while. 

Any debugging or additional information I can offer will be gladly
provided!

Thanks,
Micah

In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-09-08 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
configured using `configure  '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: C
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  global-undo-tree-mode: t
  undo-tree-mode: t
  diff-auto-refine-mode: t
  desktop-save-mode: t
  ido-everywhere: t
  shell-dirtrack-mode: t
  icomplete-mode: t
  display-battery-mode: t
  display-time-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  minibuffer-depth-indicate-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
q s C-g <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> s 
d k g <return> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <up> 
<up> <up> <up> <up> <up> <up> <return> <C-down> <C-down> 
<C-down> <down> C-SPC <C-down> <C-down> <C-down> <C-down> 
ESC w C-x b <return> q C-x b <return> C-x b <return> 
C-x k <return> C-x b <return> C-y <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
M-d H e r e SPC i s SPC w h a t SPC w e SPC s a i d 
SPC w e SPC w o u l d SPC d o : M-d <delete> C-c <return> 
C-e C-c C-c = M-< <down> <return> q a <return> n n 
n q a <return> q a <return> q d <return> q a a <return> 
q a = M-x s e r v e r - s t a r t <return> <return> 
C-x C-f <backspace> <backspace> / e , a <backspace> 
<backspace> <backspace> <backspace> C-g C-g C-x C-f 
<backspace> <backspace> . e m a c s . d / o r g C-s 
<return> <next> <next> C-x C-d C-g C-x C-f <backspace> 
. c o n f i g / a w e s <return> r c C-r <return> M-x 
C-g C-x b C-s <return> M-x r e p o r t - e m a c s 
- b u g <return> C-x o <down> M-f M-f M-f M-b C-SPC 
C-e ESC w C-x o C-y <return> C-x o C-x o M-< C-x k 
<return> y q M-x <return>

Recent messages:
Checking 26 files in /usr/share/emacs/23.4/lisp/emulation...
Checking 70 files in /usr/share/emacs/23.4/lisp/emacs-lisp...
Checking 12 files in /usr/share/emacs/23.4/lisp/cedet...
Checking 30 files in /usr/share/emacs/23.4/lisp/calendar...
Checking 44 files in /usr/share/emacs/23.4/lisp/calc...
Checking 22 files in /usr/share/emacs/23.4/lisp/obsolete...
Checking 1 files in /usr/share/emacs/23.4/leim...
Checking for load-path shadows...done
Mark set
Buffer *mail to [email-masked]* modified; kill anyway? (y or n) 

Load-path shadows:
/home/micah/.emacs.d/plugins/rinari/jump hides ~/.emacs.d/plugins/rinari/jump.el/jump
/home/micah/.emacs.d/plugins/rinari/util/inf-ruby hides ~/.emacs.d/plugins/ruby/inf-ruby
/home/micah/.emacs.d/plugins/rinari/util/ruby-mode hides ~/.emacs.d/plugins/ruby/ruby-mode
/home/micah/.emacs.d/plugins/post hides /home/micah/.emacs.d/post
~/.emacs.d/plugins/puppet-syntax-emacs/puppet-mode hides /usr/share/emacs/23.4/site-lisp/puppet-el/puppet-mode
~/.emacs.d/plugins/puppet-syntax-emacs/puppet-mode hides /usr/share/emacs/site-lisp/puppet-mode
/usr/share/emacs23/site-lisp/flim/md4 hides /usr/share/emacs/23.4/lisp/md4
/usr/share/emacs23/site-lisp/flim/hex-util hides /usr/share/emacs/23.4/lisp/hex-util
/home/micah/.emacs.d/custom hides /usr/share/emacs/23.4/lisp/custom
/usr/share/emacs23/site-lisp/flim/sha1 hides /usr/share/emacs/23.4/lisp/sha1
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/23.4/lisp/textmodes/rst
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.4/lisp/textmodes/flyspell
/home/micah/.emacs.d/plugins/rinari/util/ruby-mode hides /usr/share/emacs/23.4/lisp/progmodes/ruby-mode
~/.emacs.d/plugins/rinari/jump.el/which-func hides /usr/share/emacs/23.4/lisp/progmodes/which-func
/usr/share/emacs23/site-lisp/org-mode/org-info hides /usr/share/emacs/23.4/lisp/org/org-info
/usr/share/emacs23/site-lisp/org-mode/org-jsinfo hides /usr/share/emacs/23.4/lisp/org/org-jsinfo
/usr/share/emacs23/site-lisp/org-mode/org-mouse hides /usr/share/emacs/23.4/lisp/org/org-mouse
/usr/share/emacs23/site-lisp/org-mode/org-docbook hides /usr/share/emacs/23.4/lisp/org/org-docbook
/usr/share/emacs23/site-lisp/org-mode/org-clock hides /usr/share/emacs/23.4/lisp/org/org-clock
/usr/share/emacs23/site-lisp/org-mode/org-macs hides /usr/share/emacs/23.4/lisp/org/org-macs
/usr/share/emacs23/site-lisp/org-mode/org-exp-blocks hides /usr/share/emacs/23.4/lisp/org/org-exp-blocks
/usr/share/emacs23/site-lisp/org-mode/org-timer hides /usr/share/emacs/23.4/lisp/org/org-timer
/usr/share/emacs23/site-lisp/org-mode/org-attach hides /usr/share/emacs/23.4/lisp/org/org-attach
/usr/share/emacs23/site-lisp/org-mode/org-protocol hides /usr/share/emacs/23.4/lisp/org/org-protocol
/usr/share/emacs23/site-lisp/org-mode/org-bibtex hides /usr/share/emacs/23.4/lisp/org/org-bibtex
/usr/share/emacs23/site-lisp/org-mode/org-mhe hides /usr/share/emacs/23.4/lisp/org/org-mhe
/usr/share/emacs23/site-lisp/org-mode/org-bbdb hides /usr/share/emacs/23.4/lisp/org/org-bbdb
/usr/share/emacs23/site-lisp/org-mode/org-inlinetask hides /usr/share/emacs/23.4/lisp/org/org-inlinetask
/usr/share/emacs23/site-lisp/org-mode/org-agenda hides /usr/share/emacs/23.4/lisp/org/org-agenda
/usr/share/emacs23/site-lisp/org-mode/org-faces hides /usr/share/emacs/23.4/lisp/org/org-faces
/usr/share/emacs23/site-lisp/org-mode/org-indent hides /usr/share/emacs/23.4/lisp/org/org-indent
/usr/share/emacs23/site-lisp/org-mode/org-habit hides /usr/share/emacs/23.4/lisp/org/org-habit
/usr/share/emacs23/site-lisp/org-mode/org-vm hides /usr/share/emacs/23.4/lisp/org/org-vm
/usr/share/emacs23/site-lisp/org-mode/org-mobile hides /usr/share/emacs/23.4/lisp/org/org-mobile
/usr/share/emacs23/site-lisp/org-mode/org hides /usr/share/emacs/23.4/lisp/org/org
/usr/share/emacs23/site-lisp/org-mode/org-w3m hides /usr/share/emacs/23.4/lisp/org/org-w3m
/usr/share/emacs23/site-lisp/org-mode/org-archive hides /usr/share/emacs/23.4/lisp/org/org-archive
/usr/share/emacs23/site-lisp/org-mode/org-xoxo hides /usr/share/emacs/23.4/lisp/org/org-xoxo
/usr/share/emacs23/site-lisp/org-mode/org-rmail hides /usr/share/emacs/23.4/lisp/org/org-rmail
/usr/share/emacs23/site-lisp/org-mode/org-ascii hides /usr/share/emacs/23.4/lisp/org/org-ascii
/usr/share/emacs23/site-lisp/org-mode/org-src hides /usr/share/emacs/23.4/lisp/org/org-src
/usr/share/emacs23/site-lisp/org-mode/org-html hides /usr/share/emacs/23.4/lisp/org/org-html
/usr/share/emacs23/site-lisp/org-mode/org-footnote hides /usr/share/emacs/23.4/lisp/org/org-footnote
/usr/share/emacs23/site-lisp/org-mode/org-list hides /usr/share/emacs/23.4/lisp/org/org-list
/usr/share/emacs23/site-lisp/org-mode/org-mew hides /usr/share/emacs/23.4/lisp/org/org-mew
/usr/share/emacs23/site-lisp/org-mode/org-latex hides /usr/share/emacs/23.4/lisp/org/org-latex
/usr/share/emacs23/site-lisp/org-mode/org-colview hides /usr/share/emacs/23.4/lisp/org/org-colview
/usr/share/emacs23/site-lisp/org-mode/org-exp hides /usr/share/emacs/23.4/lisp/org/org-exp
/usr/share/emacs23/site-lisp/org-mode/org-crypt hides /usr/share/emacs/23.4/lisp/org/org-crypt
/usr/share/emacs23/site-lisp/org-mode/org-gnus hides /usr/share/emacs/23.4/lisp/org/org-gnus
/usr/share/emacs23/site-lisp/org-mode/org-freemind hides /usr/share/emacs/23.4/lisp/org/org-freemind
/usr/share/emacs23/site-lisp/org-mode/org-publish hides /usr/share/emacs/23.4/lisp/org/org-publish
/usr/share/emacs23/site-lisp/org-mode/org-icalendar hides /usr/share/emacs/23.4/lisp/org/org-icalendar
/usr/share/emacs23/site-lisp/org-mode/org-mac-message hides /usr/share/emacs/23.4/lisp/org/org-mac-message
/usr/share/emacs23/site-lisp/org-mode/org-wl hides /usr/share/emacs/23.4/lisp/org/org-wl
/usr/share/emacs23/site-lisp/org-mode/org-irc hides /usr/share/emacs/23.4/lisp/org/org-irc
/usr/share/emacs23/site-lisp/org-mode/org-table hides /usr/share/emacs/23.4/lisp/org/org-table
/usr/share/emacs23/site-lisp/org-mode/org-id hides /usr/share/emacs/23.4/lisp/org/org-id
/usr/share/emacs23/site-lisp/org-mode/org-plot hides /usr/share/emacs/23.4/lisp/org/org-plot
/usr/share/emacs23/site-lisp/org-mode/org-feed hides /usr/share/emacs/23.4/lisp/org/org-feed
/usr/share/emacs23/site-lisp/org-mode/org-remember hides /usr/share/emacs/23.4/lisp/org/org-remember
/usr/share/emacs23/site-lisp/org-mode/org-datetree hides /usr/share/emacs/23.4/lisp/org/org-datetree
/usr/share/emacs23/site-lisp/org-mode/org-compat hides /usr/share/emacs/23.4/lisp/org/org-compat
/usr/share/emacs23/site-lisp/org-mode/org-install hides /usr/share/emacs/23.4/lisp/org/org-install
/usr/share/emacs23/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/23.4/lisp/net/sasl-ntlm
/usr/share/emacs23/site-lisp/flim/hmac-def hides /usr/share/emacs/23.4/lisp/net/hmac-def
/usr/share/emacs23/site-lisp/flim/sasl hides /usr/share/emacs/23.4/lisp/net/sasl
/usr/share/emacs23/site-lisp/flim/ntlm hides /usr/share/emacs/23.4/lisp/net/ntlm
/usr/share/emacs23/site-lisp/flim/hmac-md5 hides /usr/share/emacs/23.4/lisp/net/hmac-md5
/usr/share/emacs23/site-lisp/flim/sasl-cram hides /usr/share/emacs/23.4/lisp/net/sasl-cram
/usr/share/emacs23/site-lisp/flim/sasl-digest hides /usr/share/emacs/23.4/lisp/net/sasl-digest
/home/micah/.emacs.d/plugins/avl-tree hides /usr/share/emacs/23.4/lisp/emacs-lisp/avl-tree

Features:
(shadow emacsbug jka-compr gnus-msg gnus-art mm-uu mml2015 gnus-sum nnoo
gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int
gnus-range gnus-win gnus gnus-ems mail-extr sort find-dired grep
multi-isearch help-mode w3m-form w3m-symbol mule-util nxml-uchnm rng-xsd
xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse
nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode
nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok org-indent
org-habit org-id org-w3m org-irc org-jsinfo org-infojs org-html org-info
org-gnus org-bbdb dns-mode conf-mode newcomment flyspell ispell epa-file
vc-git puppet-doc puppet-mode my-puppet flymake-puppet flymake my-popwin
popwin-w3m w3m timezone w3m-hist w3m-e23 w3m-ccl ccl w3m-fsf w3m-favicon
w3m-image w3m-proc w3m-util browse-url popwin my-nyan nyan-mode my-ediff
my-sgeps sgeps my-offlineimap offlineimap my-twit twittering-mode epa
epg epg-config my-identica identica-mode url-http tls url-auth url-gw
url url-proxy url-privacy url-expand url-methods url-history url-cookie
url-util url-parse url-vars longlines parse-time xml dired+ dired-x
dired-aux dired my-magit magit-bisect magit-key-mode magit server
esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc esh-groups eshell
esh-module esh-mode esh-util ediff-merg ediff-diff ediff-wind ediff-help
ediff-util ediff-mult ediff-init ediff iswitchb view log-edit pcvs-util
add-log my-undotree undo-tree my-notmuch eudc cus-edit eudc-vars notmuch
hl-line notmuch-message notmuch-maildir-fcc notmuch-hello notmuch-show
notmuch-print notmuch-crypto notmuch-mua notmuch-address notmuch-wash
diff-mode coolj notmuch-query json goto-addr thingatpt icalendar
notmuch-tag crm notmuch-lib message sendmail ecomplete rfc822 mml
mml-sec mailabbrev nnheader gmm-utils wid-edit mailheader canlock sha1
sha1-el hex-util hashcash mail-utils mm-view smime dig mm-decode
mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp
ietf-drums mm-util mail-prsvr my-uniquify uniquify my-ibuffer ibuffer
my-terminal my-html rhtml-mode rhtml-navigation derived rhtml-sgml-hacks
rhtml-ruby-hook sgml-mode rhtml-erb rhtml-fonts my-ruby rinari
ruby-compilation ansi-color inf-ruby compile jump inflections findr
which-func imenu ruby-electric ruby-mode my-w3m my-smex smex cl cl-19
my-desktop desktop my-org org-clock org-exp ob-exp org-exp-blocks
org-agenda org byte-opt warnings bytecomp byte-compile ob-tangle ob-ref
ob-lob ob-table org-footnote org-src ob-comint ob-keys org-pcomplete
pcomplete org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob org-compat org-macs ob-eval find-func my-ido ido
my-elscreen my-diary cal-china lunar solar cal-dst cal-bahai cal-islam
cal-hebrew cal-julian holidays hol-loaddefs appt diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs my-tramp tramp-imap
tramp-gw tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp
regexp-opt auth-source gnus-util netrc time-date shell comint ring
password-cache format-spec tramp-compat trampver my-shell advice
help-fns advice-preload my-generickeys my-generic speedbar sb-image
ezimage dframe easymenu assoc icomplete saveplace windmove edmacro
kmacro battery time delsel avoid paren mb-depth cus-start cus-load
debian-el debian-el-loaddefs w3m-load org-install emacs-goodies-el
emacs-goodies-custom emacs-goodies-loaddefs easy-mmode dpkg-dev-el
dpkg-dev-el-loaddefs tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)

--