Re: [CEDET-devel] [Nasty bug] in idle summary-mode and tag-highlight

>>> Damien Deville <damien.deville@...> seems to think that:
>Hi,
>
>Since a few days the two following modes are buggy
>global-semantic-idle-summary-mode
>global-semantic-idle-tag-highlight-mode
>
>Here is what i see:
>- open a foo.c file where function foo() is defined as a static function
>- navigate to any place where foo is called
>- point the cursor to the start of foo();
>- idle for a while
>- any of the two previously mention idle mode will fire and the buffer
>foo.c and *scratch* is displayed
>- buffer *Messages* contains
>Idle Service Error semantic-idle-summary-idle-function: "#<buffer
>*scratch*> - Wrong type argument: syntax-table-p, nil"
>
>I am using latest Emacs 23 from cvs and latest cedet from cvs.
[ ... ]
Hi Damien.
I can't seem to replicate this issue. If you get to a point where
that error occurs, you can run:
M-x semantic-debug-idle-function
and the stack should help shed some light on what is going on. I'm
worried that something unexpected is switching buffers, and that is
then messing up the summary function.
Eric
--
Eric Ludlam: eric@...
Siege: http://www.siege-engine.com Emacs: http://cedet.sourceforge.net

Thread view

Hi,
Since a few days the two following modes are buggy
global-semantic-idle-summary-mode
global-semantic-idle-tag-highlight-mode
Here is what i see:
- open a foo.c file where function foo() is defined as a static function
- navigate to any place where foo is called
- point the cursor to the start of foo();
- idle for a while
- any of the two previously mention idle mode will fire and the buffer
foo.c and *scratch* is displayed
- buffer *Messages* contains
Idle Service Error semantic-idle-summary-idle-function: "#<buffer
*scratch*> - Wrong type argument: syntax-table-p, nil"
I am using latest Emacs 23 from cvs and latest cedet from cvs.
Damien

>>> Damien Deville <damien.deville@...> seems to think that:
>Hi,
>
>Since a few days the two following modes are buggy
>global-semantic-idle-summary-mode
>global-semantic-idle-tag-highlight-mode
>
>Here is what i see:
>- open a foo.c file where function foo() is defined as a static function
>- navigate to any place where foo is called
>- point the cursor to the start of foo();
>- idle for a while
>- any of the two previously mention idle mode will fire and the buffer
>foo.c and *scratch* is displayed
>- buffer *Messages* contains
>Idle Service Error semantic-idle-summary-idle-function: "#<buffer
>*scratch*> - Wrong type argument: syntax-table-p, nil"
>
>I am using latest Emacs 23 from cvs and latest cedet from cvs.
[ ... ]
Hi Damien.
I can't seem to replicate this issue. If you get to a point where
that error occurs, you can run:
M-x semantic-debug-idle-function
and the stack should help shed some light on what is going on. I'm
worried that something unexpected is switching buffers, and that is
then messing up the summary function.
Eric
--
Eric Ludlam: eric@...
Siege: http://www.siege-engine.com Emacs: http://cedet.sourceforge.net

>>> Damien Deville <damien.deville@...> seems to think that:
>Hi,
>
>Since a few days the two following modes are buggy
>global-semantic-idle-summary-mode
>global-semantic-idle-tag-highlight-mode
>
>Here is what i see:
>- open a foo.c file where function foo() is defined as a static function
>- navigate to any place where foo is called
>- point the cursor to the start of foo();
>- idle for a while
>- any of the two previously mention idle mode will fire and the buffer
>foo.c and *scratch* is displayed
>- buffer *Messages* contains
>Idle Service Error semantic-idle-summary-idle-function: "#<buffer
>*scratch*> - Wrong type argument: syntax-table-p, nil"
[ ... ]
Hi again.
I changed my mind. I saw that in the idle timer it said (roughly)
(save-excursion
(dolist (a b)
;; call an idle function
))
so I changed it to:
(dolist (a b)
(save-excursion
;; Call an idle function
))
and I'll take a wild guess that should fix this issue.
I checked it into CVS. Let me know how it goes.
Thanks
Eric
--
Eric Ludlam: eric@...
Siege: http://www.siege-engine.com Emacs: http://cedet.sourceforge.net

Hi,
I currently suspect this may be related to a patch I made to
semantic-symref-result-get-tags a little while ago. This function is
now cleaning up files it opens after normalizing the tags that it
finds.
Do you find that a buffer you have open gets deleted? If that were
the case, then having other files pop open would make sense. What I
don't understand is how the code in this function could let an already
open buffer get killed.
If you use
M-x debug-on-entry RET semantic-symref-result-get-tags RET
and then do your repro steps, then the first hit will show entering
the function. Hit "c" to continue. If on the second hit the buffers
get rearranged, then this would be the problem function.
Use
M-x cancel-debug-on-entry RET RET
to clear that up.
A quick fix for you would to be to go to line 399 and comment out the
little block that delets buffers.
Eric
>>> Damien Deville <damien.deville@...> seems to think that:
>Hi Eric,
>
>i tried your fix with only idle-summary-mode on and it does not seem to
>fix the issue, when the bug arise running semantic-debug-idle-function
>function does not provide any information at all in *scratch* nor
>*Messages* buffer
>
>Here is the way i intialize cedet in case it could be linked to my
>config. I also use various packages that rely on cedet i tried without
>them (company-mode, ca2, ...) and the issue is still there.
>
>;;--------------------- Load CEDET
>(load-file "~/.emacs.d/lib/cedet-cvs/common/cedet.elc")
>
>;; use EDE project system
>(global-ede-mode t)
>
>; minimal + custom (only activate what we need and use)
>(semantic-load-enable-minimum-features)
>(global-semantic-idle-scheduler-mode 1)
>(global-semantic-idle-summary-mode 1)
>(global-semantic-idle-tag-highlight-mode 0)
>(global-senator-minor-mode 1)
>(global-semantic-decoration-mode 1)
>(require 'semantic-decorate-include)
>(global-semantic-show-unmatched-syntax-mode 1)
>(if (fboundp #'which-func-mode)
> (add-hook 'semantic-init-hooks (lambda ()
> (which-func-mode 1))))
>
>; Options
>(enable-visual-studio-bookmarks)
>(global-semantic-tag-folding-mode 1)
>
>; useful decoration for tags / symbols
>(require 'semantic-ia)
>
>; highlight compilation errors
>(require 'lmcompile)
>(add-hook 'compilation-finish-functions 'vj-compilation-finish-highlight)
>(defun vj-compilation-finish-highlight (buffer result-str)
> (interactive)
> (lmcompile-do-highlight)
> )
>
>; ask gcc for config for cedet
>(require 'semantic-gcc)
>(semantic-gcc-setup "gcc")
>
>; semanticdb
>(require 'semanticdb)
>(global-semanticdb-minor-mode 1)
>; semanticdb + global
>(require 'semanticdb-global)
>(semanticdb-enable-gnu-global-databases 'c-mode)
>(semanticdb-enable-gnu-global-databases 'c++-mode)
>
>; srecode
>(require 'srecode)
>(global-srecode-minor-mode 1)
>
>;;--------------------- End of Load of CEDET
>
>Damien
>
>Eric M. Ludlam wrote:
>>>>> Damien Deville <damien.deville@...> seems to think that:
>>> Hi,
>>>
>>> Since a few days the two following modes are buggy
>>> global-semantic-idle-summary-mode
>>> global-semantic-idle-tag-highlight-mode
>>>
>>> Here is what i see:
>>> - open a foo.c file where function foo() is defined as a static function
>>> - navigate to any place where foo is called
>>> - point the cursor to the start of foo();
>>> - idle for a while
>>> - any of the two previously mention idle mode will fire and the buffer
>>> foo.c and *scratch* is displayed
>>> - buffer *Messages* contains
>>> Idle Service Error semantic-idle-summary-idle-function: "#<buffer
>>> *scratch*> - Wrong type argument: syntax-table-p, nil"
>> [ ... ]
>>
>> Hi again.
>>
>> I changed my mind. I saw that in the idle timer it said (roughly)
>>
>> (save-excursion
>> (dolist (a b)
>> ;; call an idle function
>> ))
>>
>> so I changed it to:
>>
>> (dolist (a b)
>> (save-excursion
>> ;; Call an idle function
>> ))
>>
>> and I'll take a wild guess that should fix this issue.
>>
>> I checked it into CVS. Let me know how it goes.
>>
>> Thanks
>> Eric
>>
>