#541316 exuberant-ctags: tags file is corrupted

Package:
exuberant-ctags
Source:
exuberant-ctags
Description:
build tag file indexes of source code definitions
Submitter:
Sergey Yanovich
Date:
2023-09-28 13:06:04 UTC
Severity:
normal
#541316#5
Date:
2009-08-13 09:45:47 UTC
From:
To:
After upgrading from 5.7-4 to 5.8-1 ctags produces tags file for
mozilla source tree that vim considers corrupted:

1. get mozilla tree
 hg clone http://hg.mozilla.org/releases/mozilla-1.9.1/ mozilla
 cd mozilla

2. create tags file
 ctags -R

3. open vim
 vim

4. find LoadImageWithChannel definition
 :tag LoadImageWithChannel

5. try to see all definitions of LoadImageWithChannel
 <point to> LoadImageWithChannel, and
 g]

vim gives this error message:
E431: Format error in tags file "tags"
Before byte 24245178
Press ENTER or type command to continue

Tested with vim 7.2.245-2 and 7.1.314-3

#541316#10
Date:
2009-08-13 09:56:05 UTC
From:
To:
#541316#15
Date:
2009-11-23 20:54:42 UTC
From:
To:
Can you provide a smaller test case, please? My Internet connection is
rather slow, and I don't want to download a large package like this if I
can avoid it.

Thanks,

#541316#20
Date:
2009-11-23 23:03:44 UTC
From:
To:
Vim says corruption happens at byte 24245178. It points to a file
content/canvas/test/test_2d.line.cross.html. If I run ctags on a
subfolder 'content', corruption is not present.

In addtion, when I opened the tags file in vim, I noticed that vim
converts it to display. When I save the converted file, corruption is
not present either.

So, it looks like it takes the whole tree to reproduce the bug.

#541316#27
Date:
2011-12-07 18:01:44 UTC
From:
To:
Le Tuesday 24 November 2009, à 02:03:44AM +0300, Сергей a écrit :

Hi,
I can reproduce the bug with mozilla tree.
I investigated more, and I discovered the bug comes probably from vim not
being able to read long ctag lines (ctags 5.8 now parses javascript objects
properties, which result in long lines being produced for mozilla tree)

Here is a copy of the mail I sent to bugs@vim.org

#541316#32
Date:
2013-04-18 14:19:33 UTC
From:
To:

#541316#37
Date:
2013-07-10 18:45:37 UTC
From:
To:
Hi Guys!

I've got the same problem with the sources that are in my office and
are close to public — sorry.

The very fast cure I've designed is to produce temporary tags file and
the filter the lines not containing tab character.
I used awk '!/\t/{next};{print $0}' for example.

Our sources does contain some JavaScript but the 'broken' lines seemed
to not look like long ones. They seemed to look like a random
fragments from the indexed tree.

Will report tomorrow the version of ctags in our office development
environment. vim was compiled by myself 7.3 and 7.4beta2.

I suppose that there may be a problem with locales.
In our environment it is
LANG=pl_PL.ISO-8859-2
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
and the indexed files are encoded in ISO-8859-2 and UTF8 partially.
Not mixed within one file.

KAcper

#541316#42
Date:
2015-08-17 12:35:20 UTC
From:
To:
Hi,

I am tagging the Intel IA Android OS project from
https://github.com/android-ia/

After creating the tag file using:
    ctags -R --langmap=Java:+.aidl  <all relevant folders>

I get the same error on my vim:

E431: Format error in tags file "/path-to-my/tags"
Before byte <byte-number>
E426: tag not found: <tag-name>
Press ENTER or type command to continue


When I open the tags file I see that the "!_TAG_FILE_FORMAT" is not on the
first line.
Using hex-dump I see that the <byte-number> is before the location of the
 "!_TAG_FILE_FORMAT" line.

After deleting the lines *before* the "!_TAG_FILE_FORMAT", the vim accept
the tag file and work normally. (I find tags!)

I guess the vim expect the "!_TAG_.." lines to be on the begin.

I do not know why, but I can say that my tags file is sorted!

Another hint: During the running of the ctags application, I see that the
"!_TAG_FILE_FORMAT" is on the first line.

I uses:
$ dpkg -l | grep ctags
ii  exuberant-ctags           1:5.9~svn20110310-8   amd64    build tag file
indexes of source code definitions

$ dpkg -l | grep vim
ii  vim-common                2:7.4.488-7           amd64    Vi IMproved -
Common files
ii  vim-gnome                 2:7.4.488-7           amd64    Vi IMproved -
enhanced vi editor - with GNOME2 GUI
ii  vim-gtk                   2:7.4.488-7           amd64    Vi IMproved -
enhanced vi editor - with GTK2 GUI
ii  vim-gui-common            2:7.4.488-7           all      Vi IMproved -
Common GUI files
ii  vim-runtime               2:7.4.488-7           all      Vi IMproved -
Runtime files
ii  vim-tiny                  2:7.4.488-7           amd64    Vi IMproved -
enhanced vi editor - compact version

The tags file as created by the ctags application:
$ head -20 tags


external/chromium_org/third_party/WebKit/PerformanceTests/SunSpider/tests/parse-only/mootools-1.2.2-core-nc.js
/^Selectors.Getters
= {$/;" m class:Selectors.Getters

external/chromium_org/third_party/WebKit/Source/devtools/front_end/jsdifflib.js
/^__whitespace
= {" ":true, "\\t":true, "\\n":true, "\\f":true, "\\r":true};$/;" p
class:__whitespace
                                int  hash_idx,
                                int  iteration_count,
                      unsigned char *out,
                      unsigned long  password_len,
                      unsigned long *outlen)
                const unsigned char *salt,
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to
lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.9~svn20110310 //
"
external/chromium_org/third_party/WebKit/PerformanceTests/SunSpider/tests/sunspider-0.9.1/string-tagcloud.js
/^
           '\\r': '\\\\r',$/;" p
"
external/chromium_org/third_party/WebKit/PerformanceTests/SunSpider/tests/sunspider-0.9/string-tagcloud.js
/^
           '\\r': '\\\\r',$/;" p
"
external/chromium_org/third_party/WebKit/PerformanceTests/SunSpider/tests/sunspider-1.0/string-tagcloud.js
/^
           '\\r': '\\\\r',$/;" p
" external/chromium_org/v8/src/d8.js /^  '\\r': '\\\\r',$/;" p
class:ctrlCharMap_
" external/v8/src/d8.js /^  '\\r': '\\\\r',$/;" p class:ctrlCharMap_

After edit the file changing (works with vim):
$ head -10 tags
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to
lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.9~svn20110310 //
"
external/chromium_org/third_party/WebKit/PerformanceTests/SunSpider/tests/sunspider-0.9.1/string-tagcloud.js
/^
           '\\r': '\\\\r',$/;" p
"
external/chromium_org/third_party/WebKit/PerformanceTests/SunSpider/tests/sunspider-0.9/string-tagcloud.js
/^
           '\\r': '\\\\r',$/;" p
"
external/chromium_org/third_party/WebKit/PerformanceTests/SunSpider/tests/sunspider-1.0/string-tagcloud.js
/^
           '\\r': '\\\\r',$/;" p
" external/chromium_org/v8/src/d8.js /^  '\\r': '\\\\r',$/;" p
class:ctrlCharMap_


Erez

#541316#47
Date:
2021-07-07 01:41:50 UTC
From:
To:
💲👍Usted ha estado sin duda tratando de encontrar algo similar a esto http://feedproxy.google.com/~r/78860f/~3/RPQTNe5pL7I



 Jasmine wamah


Muy sinceramente suyo❗

#541316#52
Date:
2023-02-24 11:50:58 UTC
From:
To:
#541316#57
Date:
2023-09-28 13:03:47 UTC
From:
To:
Estoy alucinando con esto
https://admin.jjjbros.com.au/predilection





Tuyo atentamente con sincera gratitud☝,Jasmine wamah