Tags Update fails for long filenames

If reporting a bug with the Zeus IDE please post the details here. Please do not post questions here.
Post Reply
mikeh
Posts: 5
Joined: Sat Sep 18, 2004 1:27 am

Tags Update fails for long filenames

Post by mikeh »

If I add a file to my Workspace which is 24 or more characters long, I get an error message "Unexpected Error Spawning xTags Executable".

The error message shows the command line attempted for the specific file. If I enter that same command line in a DOS window, the command works properly and creates a tag file.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

I could not replicate this error on a Windows XP and a Windows Me machines.

To recreate the bug I created a 'Test' workspace in the temp directory and then add this 50 character file for the worksace:

c:\temp\file_1234567890123456789012345678901234567890.java

For me the tagger ran without error and the tags information was added to the classes window.

Which operation system are you using?

Can you tell me the full command line displayed in the error dilaog?

I am thinking that the entire command line might be longer that 128 characters and is getting truncated.
mikeh
Posts: 5
Joined: Sat Sep 18, 2004 1:27 am

Post by mikeh »

I'm using Win98SE.

For a filename of file_12345678901234.java the command line in the error message reads:
xtags.exe --c-types=+fp --excmd=p --fields=+afmikKlnsSz --sort=no -f file_12345678901234.java.tag file_12345678901234.java

This does appear dangerously close to 128 characters. This command line is 122 characters and does work in a DOS window if I enter it manually. However, if I increase the filename to 27 or more characters it exceeds 128 chars and I can't even enter it in a DOS window.

Just thinking of a workaround: If I define the ctags options using an environment variable, is there a way to tell Zeus not to add all the ctags options on the command line?
Guest

Post by Guest »

This does appear dangerously close to 128 characters.
I am pretty sure this is why the tag build is failing to run.
Just thinking of a workaround: If I define the ctags options using an environment variable, is there a way to tell Zeus not to add all the ctags options on the command line?
First up, I had a very similar idea :)

But unfortunately to make this work requires a change to xtags.exe. The xtags.exe is nothing more than Exuberant CTAGS renamed and I really do not think such Zeus specific changes would be accepted back into the official Exuberant CTAGS branch :(

So rather that messing with the official ctags, I think I have come up with a better solution :)

One of the main reason the command is overrunning the 128 limit is the -f file_12345678901234.java.tag option. The file name in this option is nothing more than a temp file and is created by appending tag to the name of the source file being tagged. Instead of using such a long file name, the xtags.dll has been changed to to run the command using a shorter 8.3 format temporary file instead. This should mean the maximum file length is now something like 36 characters.

You can get this new xtags.dll from here:

http://www.zeusedit.com/z300/xtags.zip

Jussi
mikeh
Posts: 5
Joined: Sat Sep 18, 2004 1:27 am

Post by mikeh »

The suggested fix of using a new xtags.dll which uses an 8.3 filename sounds like a good solution. However, the current file at http://www.zeusedit.com/z300/xtags.zip
does not appear to change this. The xtags.dll file is dated July 9. I had already downloaded this file (and overwritten the existing xtags.dll, as instructed) before submitting this bug report (I also just downloaded it again to confirm, no difference). Perhaps the file just hasn't been updated yet?

The workaround that I am now using is to edit the .zpi file manually and change any filenames over 23 characters to the 8.3 truncated DOS filename. This seems to work fine.

Also, regarding the environment variable solution,
But unfortunately to make this work requires a change to xtags.exe.
Do you mean a change to allow xtags.exe to accept an environment variable? According to the Exuberant Ctags manpage:
http://ctags.sourceforge.net/ctags.html
it appears that ctags can already accept either a CTAGS environment variable or a ctags.cnf configuration file to define default parameters. Doesn't this imply that the only change required would be to Zeus?
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

The suggested fix of using a new xtags.dll which uses an 8.3 filename sounds like a good solution. However, the current file at http://www.zeusedit.com/z300/xtags.zip does not appear to change this.


The xtags.dll was changed but, after some more research into the bug it turns out the changes made work for Windows XP, but do not work for Windows Me :(

A new xtags.dll has been uploaded that should fix the problem on Windows Me. This new version uses an approach similar to your suggested work around, in that it takes the source file to be tagged, converts the file name to the short 8.3 equivalent and uses this short file name in the command line. In theory this means any length of file name can now be used :)

Jussi
mikeh
Posts: 5
Joined: Sat Sep 18, 2004 1:27 am

Post by mikeh »

Thanks for the fix. Works great on Win98. :D
Post Reply