Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Crash when parsing c function #265

Closed
mdamjanic7 opened this Issue Oct 25, 2012 · 1 comment

Comments

Projects
None yet
2 participants

I've tried running appledoc on our project, and it kept crashing with the following message:

Oops, something went wrong...
NSInternalInconsistencyException: Invalid parameter not satisfying: [arguments count] >= 1
@ 0 CoreFoundation 0x00007fff8eecf0a6 __exceptionPreprocess + 198
@ 1 libobjc.A.dylib 0x00007fff93b0e3f0 objc_exception_throw + 43
@ 2 CoreFoundation 0x00007fff8eeceee8 +[NSException raise:format:arguments:] + 104
@ 3 Foundation 0x00007fff910c76a2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
@ 4 appledoc 0x0000000100024f6d +[GBMethodData methodDataWithType:result:arguments:] + 253
@ 5 appledoc 0x00000001000181d6 __81-[GBObjectiveCParser(CommonParsing) matchMethodDataForProvider:from:to:required:]_block_invoke_0 + 1574
@ 6 appledoc 0x000000010001cfaa -[GBTokenizer consumeFrom:to:usingBlock:] + 426
@ 7 appledoc 0x0000000100017b85 -[GBObjectiveCParser(CommonParsing) matchMethodDataForProvider:from:to:required:] + 1157
@ 8 appledoc 0x0000000100016fcd -[GBObjectiveCParser(DeclarationsParsing) matchMethodDeclarationForProvider:required:] + 205
@ 9 appledoc 0x0000000100016e07 __95-[GBObjectiveCParser(DeclarationsParsing) matchMethodDeclarationsForProvider:defaultsRequired:]_block_invoke_0 + 87
@ 10 appledoc 0x000000010001cfaa -[GBTokenizer consumeFrom:to:usingBlock:] + 426
@ 11 appledoc 0x000000010001cdf8 -[GBTokenizer consumeTo:usingBlock:] + 72
@ 12 appledoc 0x0000000100016d9c -[GBObjectiveCParser(DeclarationsParsing) matchMethodDeclarationsForProvider:defaultsRequired:] + 332
@ 13 appledoc 0x00000001000168de -[GBObjectiveCParser(DeclarationsParsing) matchClassDeclaration] + 638
@ 14 appledoc 0x00000001000176da -[GBObjectiveCParser(CommonParsing) matchObjectDeclaration] + 266
@ 15 appledoc 0x000000010001727f -[GBObjectiveCParser(CommonParsing) matchNextObject] + 79
@ 16 appledoc 0x0000000100013c70 -[GBObjectiveCParser parseObjectsFromString:sourceFile:toStore:] + 2336
@ 17 appledoc 0x0000000100010d6a __42-[GBParser parseObjectsFromPaths:toStore:]_block_invoke_0 + 618
@ 18 appledoc 0x0000000100012a00 -[GBParser parseFile:usingBlock:] + 384
@ 19 appledoc 0x00000001000120e1 -[GBParser parsePath:usingBlock:] + 337
@ 20 appledoc 0x000000010001094d -[GBParser parseObjectsFromPaths:toStore:] + 1325
@ 21 appledoc 0x0000000100004dbe -[GBAppledocApplication application:runWithArguments:] + 1070
@ 22 appledoc 0x0000000100002a25 -[DDCliApplication runWithClass:] + 357
@ 23 appledoc 0x0000000100002d67 DDCliAppRunWithClass + 103
@ 24 appledoc 0x0000000100001bd8 main + 56
@ 25 appledoc 0x0000000100001b94 start + 52

After trying to figure out what causes it, I've located the responsible code (this is the simplified version):

@implementation CrashClass

int32_t crash() {
return -(6);
}

@EnD

Owner

tomaz commented Oct 25, 2012

It's probably due to appledoc thinking it found objc method (it might be from minus followed by parenthesis in return). 2.0 is quite obsessive about what it expects, this should be much better in 3.0 - I've designed it from ground up to be as permissive as possible. But it'll take some time until it's ready...

@tomaz tomaz closed this Oct 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment