Yggdroot / LeaderF

An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
Apache License 2.0
2.14k stars 180 forks source link

gtags error! when I tried to update database manually as it can't update automatically when I switch git branch. #1040

Closed JaminYoung closed 11 months ago

JaminYoung commented 11 months ago

Describe your question, feature request, or bug.

I switch to another git branch, but gtags database didn't update automatically, so I tried to update manually. The first several times were susccesful, but then went wrong, showing gtags error, type :mess showed bellow. image I deleted the gtags database, and tried the same procedure, and it happened again.

Steps to reproduce

0.gtags --version 6.6.10

  1. cd to a repository,( I git cloned uboot repository)
  2. start vim, auto generate database successfully
  3. exit vim
  4. git checkout to another branch
  5. start vim
  6. type :Leaderf gtags --update (first time maybe success, by switch back former branch, try update gtags database again ,it will go wrong)

Actual behaviour

Leaderf gtags --update showing gtags error!

Expected behaviour

gatags database should update automatically after switch to another branch, and should not go wrong by update manually?

JaminYoung commented 11 months ago

update: I found out each time I tried to update to gtags database by :Leaderf gtags --update, the size of gtags database will increased abnormaly, see below image and :mess, first time went error actually showed malloc(): corrupted top size, image

And I could reproduce it by just type gtags -i --skip-symlink --gtagslabel native-pygments in terminal. But by removing the param -i will runs fine. I looked up the help file of gtags, -i stands for increased, still not know why.

Yggdroot commented 11 months ago

I don't know either. Maybe it's gtags' bug.