hari-rangarajan / CCTree

Vim CCTree plugin
GNU General Public License v3.0
64 stars 23 forks source link

XRefDB is corrupted #16

Open shahar3000 opened 5 years ago

shahar3000 commented 5 years ago

hey, I create a cscope database of a C project using: $ cscope -Rbq then in vim I load the database with: :CCTreeLoadDB cscope.out at this point everything is working great

I create the xref DB using CCTreeSaveXRefDB cctree.out

then I close vim, reopen and load the db with CCTreeLoadXRefDB cctree.out

but then when I try to use it (with :CCTreeTraceReverse) I get Error detected while processing function 20_CCTreeTraceTreeForSymbol[19]..191[7]..186[2]..187[10]..112[9]..98: line 1: E716: Key not present in Dictionary: 7929

and I get garbage in the result

any idea what am I missing?

qais-yousef commented 1 year ago

FWIW, I have a PR that makes things better for me - but I must use CCTreeLoadXRefDBFromDisk.

The issue you have might be to the way taglist() builtin function in vim is expecting the file to be sorted. This caused cctree to fail to find some items and throw these errors. If you click through them you might actually find a result rendered. I did fix throwing this random errors - but not the failure to find some IDs sometimes..