Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Error parsing XML file (appledoc crash) #228

Open
drewcrawford opened this Issue · 3 comments

2 participants

@drewcrawford

I've got this down to a minimum test case for you.

I create a file test.h:

/**<id> */

@interface FastBag : NSObject
@end

Then I run appledoc. I've built the version from master on Lion with production XCode.

$ /usr/local/bin/appledoc --project-name Test --project-company Test .
appledoc version: 2.0.5 (build 789)

WARN: --output argument or global setting not given, will output to current dir '/Volumes/y/drew/Dropbox/Code/Gistory/gistory'!
WARN: --company-id argument or global setting not given, but creating DocSet is enabled, will use 'com.test.test'!
ERROR | !> 2012-07-04 05:59:52.232 docsetutil[81570:60b] Error parsing XML file from /Volumes/y/drew/Dropbox/Code/Gistory/gistory/docset/Contents/Resources/Tokens1.xml: Error Domain=NSXMLParserErrorDomain Code=76 "Line 7: Opening and ending tag mismatch: id line 0 and Abstract
ERROR | !> " UserInfo=0x7ff5fc9308b0 {NSLocalizedDescription=Line 7: Opening and ending tag mismatch: id line 0 and Abstract
ERROR | !> }
WARN | docsetutil failed to index the documentation set, continuing with what was indexed...

And then I check the return value...

$ echo $?
2

Not quite what I expected. By trial and error, I am pretty sure appledoc is dying because I've enclosed <id> in angle brackets, although I fail to see how that is invalid input...

@drewcrawford

I'd like to document that I'm able to reproduce this issue where id in the sample header is any text. It seems to be an issue with angle brackets in general.

@drewcrawford

I ran into a similar, but non-identical crash, when using the left anglebracket (less than) in a comment that is not trying to be an explicit crossref. Swapping the anglebracket with &lt; worked around that issue for me.

I am pretty sure at this point there is something wrong with how angle brackets are escaped.

@tomaz
Owner

This is docsetutil issue in that it takes any bracketed word as HTML/XML tag and fails if the tag is not recognized. I do some measures in order to prevent it and if it fails, appledoc at least continues with other files.

Probably in this case, id is checked for cross reference by appledoc and as it isn't found, it leaves it as it is.

Will take closer look when I get to this part on experimental branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.