unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11105: 24.0.94; (wrong-type-argument strinp (eval.c))
@ 2012-03-27 23:41 Drew Adams
  2012-03-28 16:00 ` Stefan Monnier
  2012-10-02 23:04 ` Drew Adams
  0 siblings, 2 replies; 6+ messages in thread
From: Drew Adams @ 2012-03-27 23:41 UTC (permalink / raw)
  To: 11105

I get this error message from time to time - have to go to *Messages* to
find it, so something must be preventing it from surfacing:
 
Error in post-command-hook (#[nil \300\301!\207 [run-hooks
icomplete-post-command-hook] 2]): (wrong-type-argument stringp (eval.c))
 
Sorry, but I have no more info than that.  I tried looking at
`icomplete-exhibit', which is the only function on
`icomplete-post-command-hook', to see if I could guess what the problem
is, but I didn't succeed.  Feel free to close this, if it doesn't help
you find a problem.

In GNU Emacs 24.0.94.1 (i386-mingw-nt5.1.2600)
 of 2012-03-19 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include'
 






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11105: 24.0.94; (wrong-type-argument strinp (eval.c))
  2012-03-27 23:41 bug#11105: 24.0.94; (wrong-type-argument strinp (eval.c)) Drew Adams
@ 2012-03-28 16:00 ` Stefan Monnier
  2012-03-28 16:07   ` Drew Adams
  2012-10-02 23:04 ` Drew Adams
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2012-03-28 16:00 UTC (permalink / raw)
  To: Drew Adams; +Cc: 11105

> I get this error message from time to time - have to go to *Messages* to
> find it, so something must be preventing it from surfacing:
 
> Error in post-command-hook (#[nil \300\301!\207 [run-hooks
> icomplete-post-command-hook] 2]): (wrong-type-argument stringp (eval.c))
 
> Sorry, but I have no more info than that.  I tried looking at
> `icomplete-exhibit', which is the only function on
> `icomplete-post-command-hook', to see if I could guess what the problem
> is, but I didn't succeed.  Feel free to close this, if it doesn't help
> you find a problem.

If you can figure out how to trigger it, or at least describe the
circumstance where it happens, maybe we can track it down, but without
that info it doesn't seem easy to figure out what's going on.


        Stefan





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11105: 24.0.94; (wrong-type-argument strinp (eval.c))
  2012-03-28 16:00 ` Stefan Monnier
@ 2012-03-28 16:07   ` Drew Adams
  2012-03-28 18:54     ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2012-03-28 16:07 UTC (permalink / raw)
  To: 'Stefan Monnier'; +Cc: 11105

> If you can figure out how to trigger it, or at least describe the
> circumstance where it happens, maybe we can track it down, but without
> that info it doesn't seem easy to figure out what's going on.

Yes, I know.  This has been happening for a while (in Emacs 24), and I've tried
to find out what leads to it, but no success so far.  I was hoping that perhaps
someone would notice something in the code that might be suspect.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11105: 24.0.94; (wrong-type-argument strinp (eval.c))
  2012-03-28 16:07   ` Drew Adams
@ 2012-03-28 18:54     ` Stefan Monnier
  2012-03-28 21:11       ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2012-03-28 18:54 UTC (permalink / raw)
  To: Drew Adams; +Cc: 11105

>> If you can figure out how to trigger it, or at least describe the
>> circumstance where it happens, maybe we can track it down, but without
>> that info it doesn't seem easy to figure out what's going on.

> Yes, I know.  This has been happening for a while (in Emacs 24), and
> I've tried to find out what leads to it, but no success so far.  I was
> hoping that perhaps someone would notice something in the code that
> might be suspect.

My crystal ball told me it could be a mis-applied completion predicate
(depending on the kind of completion-table (list of strings, alist,
obarray, hashtable), the predicate is either passed a string,
a cons-cell, or even two arguments), but I didn't notice any obvious
risky uses of the predicate in icomplete, so the problem might be
elsewhere (and just happens to show up in icomplete because icomplete
calls completion more often).


        Stefan





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11105: 24.0.94; (wrong-type-argument strinp (eval.c))
  2012-03-28 18:54     ` Stefan Monnier
@ 2012-03-28 21:11       ` Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2012-03-28 21:11 UTC (permalink / raw)
  To: 'Stefan Monnier'; +Cc: 11105

> My crystal ball told me it could be a mis-applied completion predicate
> (depending on the kind of completion-table (list of strings, alist,
> obarray, hashtable), the predicate is either passed a string,
> a cons-cell, or even two arguments), but I didn't notice any obvious
> risky uses of the predicate in icomplete, so the problem might be
> elsewhere (and just happens to show up in icomplete because icomplete
> calls completion more often).

My thinking too.  Anyway, I'll keep an eye out.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11105: 24.0.94; (wrong-type-argument strinp (eval.c))
  2012-03-27 23:41 bug#11105: 24.0.94; (wrong-type-argument strinp (eval.c)) Drew Adams
  2012-03-28 16:00 ` Stefan Monnier
@ 2012-10-02 23:04 ` Drew Adams
  1 sibling, 0 replies; 6+ messages in thread
From: Drew Adams @ 2012-10-02 23:04 UTC (permalink / raw)
  To: 11105

d> I get this error message from time to time - have to go to 
d> *Messages* to find it, so something must be preventing it
d> from surfacing:
d>  
d> Error in post-command-hook (#[nil \300\301!\207 [run-hooks
d> icomplete-post-command-hook] 2]): (wrong-type-argument 
d> stringp (eval.c))
d>  
d> Sorry, but I have no more info than that.  I tried looking at
d> `icomplete-exhibit', which is the only function on
d> `icomplete-post-command-hook', to see if I could guess what 
d> the problem is, but I didn't succeed.  Feel free to close this,
d> if it doesn't help you find a problem.

sm> My crystal ball told me it could be a mis-applied completion
sm> predicate (depending on the kind of completion-table (list of
sm> strings, alist, obarray, hashtable), the predicate is either
sm> passed a string, a cons-cell, or even two arguments), but I
sm> didn't notice any obvious risky uses of the predicate in
sm> icomplete, so the problem might be elsewhere (and just happens
sm> to show up in icomplete because icomplete calls completion more
sm> often).

How right you were, Stefan.

I finally located the problem, which was in my code.

What the problem was, FYI:

I have a modified version of icomplete-completions, which does not use
`completion--field-metadata', `completion-all-sorted-completions', LAST, or
BASE-SIZE.

The second `if' clause, which calls `completion-try-completions', raised an
error when its COMPS arg was a function (not sure why), so I changed the code to
use `try-completion' instead.

The bug was not here, but this is why I was seeing the problem from icomplete:
because icomplete was the only function that actually used `try-completion' with
the code that was bugged.

That other, bugged code was calling `completing-read' with a function-valued
COLLECTION arg, and the final act of that function called `try-completion' on a
string, a collection of singleton string lists, and the original predicate arg.
The predicate here should however expect a singleton list as arg, not a string.
The fix was to change the predicate.

That code never used the `try-completion' case (COMPLETION-MODE = nil), so I
never saw the bug except from icomplete (which in my version calls
`try-completion').

I will close this bug.






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-02 23:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-27 23:41 bug#11105: 24.0.94; (wrong-type-argument strinp (eval.c)) Drew Adams
2012-03-28 16:00 ` Stefan Monnier
2012-03-28 16:07   ` Drew Adams
2012-03-28 18:54     ` Stefan Monnier
2012-03-28 21:11       ` Drew Adams
2012-10-02 23:04 ` Drew Adams

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