[CEDET-devel] error: Method semantic-analyze-type-constraint called on nil
Brought to you by:
zappo
From: Daniel C. <dcl...@ya...> - 2009-01-31 18:06:51
|
Hi. I follow an old thread where I sent some backtraces. > > Same here. With the new code, I get the no-method-definition at some places (see below), but not where it was failing when I wrote the first message (e.g.: semanticdb-save-all-dbs). > Now I get it for instance if I do „F10 s a S“ (Senator smart completion dump) at the start of a file (e.g. Emacs' font.c): > > ------------- > Debugger entered--Lisp error: (no-method-definition semantic-analyze-type-constraint (nil)) > signal(no-method-definition (semantic-analyze-type-constraint (nil))) > eieio-generic-call(semantic-analyze-type-constraint (nil)) > semantic-analyze-type-constraint(nil) > semantic-analyze-possible-completions-default(nil) > semantic-analyze-possible-completions(218) > call-interactively(semantic-analyze-possible-completions) > ------------- > If, with latest CEDET and Emacs, I open font.c (from Emacs) and press „F10 s a S“ (Senator smart completion dump), I get the following error: Debugger entered--Lisp error: (error "Method semantic-analyze-type-constraint called on nil") signal(error ("Method semantic-analyze-type-constraint called on nil")) error("Method %s called on nil" semantic-analyze-type-constraint) eieio-generic-call-primary-only(semantic-analyze-type-constraint (nil)) semantic-analyze-type-constraint(nil) semantic-analyze-possible-completions-default(nil) semantic-analyze-possible-completions(1) call-interactively(semantic-analyze-possible-completions) tmm-prompt(………………………………………………) tmm-prompt(……………………………) tmm-prompt(………………) tmm-menubar() x-menu-bar-open(nil) menu-bar-open() call-interactively(menu-bar-open nil nil) I saw that in semantic-analyze-complete.el, in the (define-overloadable-function semantic-analyze-possible-completions (context) … ), in following code: (with-syntax-table semantic-lex-syntax-table (let* ((context (if (semantic-analyze-context-child-p context) context (semantic-analyze-current-context context))) (ans (:override))) … context is set to nil because the if fails and (semantic-analyze-current-context 1) is nil. If I eval this in the buffer, I also get nil. Other data: - at position 1, (semantic-get-cache-data 'current-context) returns nil - (semantic-analyze-current-context-default 1) → nil - (semantic-ctxt-current-symbol-and-bounds 1) → (nil nil nil) - ... Well, at this point I realized that that the problem is that I in position 1 of the buffer there was no symbol (and therefore no smart completion), just a comment: /* font.c -- "Font" primitives. Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. … In other places, „F10 s a S“ works: it displays some info. The error and the stack traces had confused me. Can we get a friendlier error message if there is no smart completion available? Like „no smart completion information available at this point“. Thanks, Daniel |