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

Oops, something went wrong... #244

Closed
mdamjanic7 opened this Issue Aug 27, 2012 · 7 comments

Comments

Projects
None yet
5 participants

I've just started the appledoc for the first time, and after a lot of warnings this is what I got:

Oops, something went wrong...
NSInternalInconsistencyException: Invalid parameter not satisfying: [arguments count] >= 1
  @ 0   CoreFoundation                      0x00007fff8f7a9716 __exceptionPreprocess + 198
  @ 1   libobjc.A.dylib                     0x00007fff97efe470 objc_exception_throw + 43
  @ 2   CoreFoundation                      0x00007fff8f7a9558 +[NSException raise:format:arguments:] + 104
  @ 3   Foundation                          0x00007fff9a1af962 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
  @ 4   appledoc                            0x0000000106a6755f appledoc + 91487
  @ 5   appledoc                            0x0000000106a5fbcd appledoc + 60365
  @ 6   appledoc                            0x0000000106a62b8f appledoc + 72591
  @ 7   appledoc                            0x0000000106a5f80a appledoc + 59402
  @ 8   appledoc                            0x0000000106a5f123 appledoc + 57635
  @ 9   appledoc                            0x0000000106a5f030 appledoc + 57392
  @ 10  appledoc                            0x0000000106a62b8f appledoc + 72591
  @ 11  appledoc                            0x0000000106a5eff4 appledoc + 57332
  @ 12  appledoc                            0x0000000106a5ed39 appledoc + 56633
  @ 13  appledoc                            0x0000000106a5f51c appledoc + 58652
  @ 14  appledoc                            0x0000000106a5f2bf appledoc + 58047
  @ 15  appledoc                            0x0000000106a5d27f appledoc + 49791
  @ 16  appledoc                            0x0000000106a5b831 appledoc + 43057
  @ 17  appledoc                            0x0000000106a5c67d appledoc + 46717
  @ 18  appledoc                            0x0000000106a5c7c2 appledoc + 47042
  @ 19  appledoc                            0x0000000106a5c7c2 appledoc + 47042
  @ 20  appledoc                            0x0000000106a5c7c2 appledoc + 47042
  @ 21  appledoc                            0x0000000106a5c7c2 appledoc + 47042
  @ 22  appledoc                            0x0000000106a5b5af appledoc + 42415
  @ 23  appledoc                            0x0000000106a5485b appledoc + 14427
  @ 24  appledoc                            0x0000000106a534da appledoc + 9434
  @ 25  appledoc                            0x0000000106a53638 appledoc + 9784
  @ 26  appledoc                            0x0000000106a52b24 appledoc + 6948
Showing first 200 warnings only
Command /bin/sh failed with exit code 250

Any ideas?

Owner

tomaz commented Aug 27, 2012

This indicates an issue with source code passed to appledoc. Specifically, it's about unsupported objc syntax (likely you're using method with argument but not giving type or variable name). To pinpoint, slowly increase verbosity (--verbose) until you find the file, class and method in question (take a look at log lines just before the assertion).

3.0 will be more relaxed about this, but 2.0 requires stricter syntax (which yields better code readability IMHO, which was why I decided to go with it).

@tomaz tomaz closed this Aug 27, 2012

Owner

tomaz commented Jul 21, 2014

Weird, using the same example file properly generates html for me...

On 21 Jul 2014, at 0:09, Lukas Kovar wrote:

This is funny, I tried it with an empty project, everything
works...but if I add code like this (its from your project "appledoc"
itself) it crashes:

//
//  GBGenerator.h
//  appledoc
//
//  Created by Tomaz Kragelj on 29.9.10.
//  Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import <Foundation/Foundation.h>

/** Handles generating of parsed and processed data from any given 
`GBStore`.

Generating phase is where output is generated from parsed and 
processed data - in other words, this is where the work previous 
phases has done becomes visible and therefore usable for the users. As 
such, this class is the engine for generating output, but doesn't do 
actual generation itself. Instead, it serves as an single and simple 
entry point for the rest of the application. Internally it delegates 
actual generation tasks to various lower-level objects, based on 
user's choices.
*/
@interface GBGenerator : NSObject

///---------------------------------------------------------------------------------------
/// @name Initialization & disposal
///---------------------------------------------------------------------------------------

/** Returns autoreleased generator that work with the given 
`GBApplicationSettingsProvider` implementor.

@param settingsProvider Application-wide settings provider to use for 
checking parameters.
@return Returns initialized instance or `nil` if initialization fails.
@exception NSException Thrown if the given application is `nil`.
*/
+ (id)generatorWithSettingsProvider:(id)settingsProvider;

/** Initializes the generator to work with the given 
`GBApplicationSettingsProvider` implementor.

This is the designated initializer.

@param settingsProvider Application-wide settings provider to use for 
checking parameters.
@return Returns initialized instance or `nil` if initialization fails.
@exception NSException Thrown if the given application is `nil`.
*/
- (id)initWithSettingsProvider:(id)settingsProvider;

///---------------------------------------------------------------------------------------
/// @name Generation handling
///---------------------------------------------------------------------------------------

/** Generates all required output from objects registered within the 
given store.

This is the main generating method. It is intended to be invoked from 
the top level application code. It accepts a `GBStore` with parsed and 
processed objects and generates output for all registered objects. All 
object's and their data is recursively descended so every object that 
needs to be generated is handled properly!

If any kind of inconsistency is detected in the store, a warning is 
logged and processing continues. This allows us to generate as much 
information as possible, while ignoring problems.

@param store The store that contains all parsed and processed objects.
@exception NSException Thrown if a serious problem is detected which 
prevents us from processing.
*/
- (void)generateOutputFromStore:(id)store;

@end

Crashlog:

2014-07-21 00:00:49.263 appledoc[11092:507] *** Assertion failure in 
+[GBMethodData methodDataWithType:result:arguments:], 
/Users/XXX/Downloads/appledoc-master/Model/GBMethodData.m:44
appledoc version: 2.2 (build 963)

Initializing...
Parsing source files...
Initializing parser with settings provider 
GBApplicationSettingsProvider...
Initializing objective-c parser with settings provider 
GBApplicationSettingsProvider...
Parsing objects from 1 paths...
Parsing '/Users/XXX/Desktop/Demo'...
Parsing path '/Users/XXX/Desktop/Demo'...
Parsing file '/Users/XXX/Desktop/Demo/Readme.markdown'...
Parsing path '/Users/XXX/Desktop/Demo/Demo'...
Parsing file '/Users/XXX/Desktop/Demo/Demo/Demo-Info.plist'...
Parsing file '/Users/XXX/Desktop/Demo/Demo/Demo-Prefix.pch'...
Parsing file '/Users/XXX/Desktop/Demo/Demo/GBGenerator.h'...
Parsing source code from 
'/Users/XXX/Desktop/Demo/Demo/GBGenerator.h'...
Parsing objective-c objects...
Initializing tokenizer...
Initializing class with name GBGenerator...
Initializing adopted protocols provider for GBGenerator...
Initializing ivars provider for GBGenerator...
Initializing methods provider for GBGenerator...
Matched GBGenerator class definition at line 15.
Assigned comment 'Handles generatin…on user's choices' to 
'GBGenerator'...
Resetting comments...
Matched superclass NSObject.
Resetting comments...
Oops, something went wrong...
NSInternalInconsistencyException: Invalid parameter not satisfying: 
[arguments count] >= 1
@ 0   CoreFoundation                      0x00007fff8c27425c 
__exceptionPreprocess + 172
@ 1   libobjc.A.dylib                     0x00007fff91b4be75 
objc_exception_throw + 43
@ 2   CoreFoundation                      0x00007fff8c274038 
+[NSException raise:format:arguments:] + 104
@ 3   Foundation                          0x00007fff8f4e1d41 
-[NSAssertionHandler 
handleFailureInMethod:object:file:lineNumber:description:] + 189
@ 4   appledoc                            0x000000010c6c6300 appledoc 
+ 152320
@ 5   appledoc                            0x000000010c6ba13d appledoc 
+ 102717
@ 6   appledoc                            0x000000010c6bf753 appledoc 
+ 124755
@ 7   appledoc                            0x000000010c6b9af4 appledoc 
+ 101108
@ 8   appledoc                            0x000000010c6b5936 appledoc 
+ 84278
@ 9   appledoc                            0x000000010c6b5821 appledoc 
+ 84001
@ 10  appledoc                            0x000000010c6bf753 appledoc 
+ 124755
@ 11  appledoc                            0x000000010c6bf58b appledoc 
+ 124299
@ 12  appledoc                            0x000000010c6b5730 appledoc 
+ 83760
@ 13  appledoc                            0x000000010c6b4921 appledoc 
+ 80161
@ 14  appledoc                            0x000000010c6b9411 appledoc 
+ 99345
@ 15  appledoc                            0x000000010c6b719a appledoc 
+ 90522
@ 16  appledoc                            0x000000010c6b4304 appledoc 
+ 78596
@ 17  appledoc                            0x000000010c6b2023 appledoc 
+ 69667
@ 18  appledoc                            0x000000010c6b3631 appledoc 
+ 75313
@ 19  appledoc                            0x000000010c6b32da appledoc 
+ 74458
@ 20  appledoc                            0x000000010c6b3484 appledoc 
+ 74884
@ 21  appledoc                            0x000000010c6b2f11 appledoc 
+ 73489
@ 22  appledoc                            0x000000010c6b1cd0 appledoc 
+ 68816
@ 23  appledoc                            0x000000010c6a55f0 appledoc 
+ 17904
@ 24  appledoc                            0x000000010c6a3cf6 appledoc 
+ 11510
@ 25  appledoc                            0x000000010c6a3e5f appledoc 
+ 11871
@ 26  appledoc                            0x000000010c6a3fea appledoc 
+ 12266
@ 27  appledoc                            0x000000010c6a2e74 appledoc 
+ 7796
@ 28  ???                                 0x000000000000001e 0x0 + 30
Command /bin/sh failed with exit code 25

What could be the problem?


Reply to this email directly or view it on GitHub:
#244 (comment)

Well, I use Xcode Run Script

#appledoc Xcode script
# Start constants
company="XXX";
companyID="com.XXX";
companyURL="http://XXX.com";
target="iphoneos";
outputPath="~/Help";
# End constants
/usr/bin/appledoc \
--project-name "${PROJECT_NAME}" \
--project-company "${company}" \
--company-id "${companyID}" \
--docset-atom-filename "${company}.atom" \
--docset-feed-url "${companyURL}/${company}/%DOCSETATOMFILENAME" \
--docset-package-url "${companyURL}/${company}/%DOCSETPACKAGEFILENAME" \
--docset-fallback-url "${companyURL}/${company}" \
--output "${outputPath}" \
--ignore "Pods" \
--publish-docset \
--docset-platform-family "${target}" \
--logformat xcode \
--keep-intermediate-files \
--no-repeat-first-par \
--no-warn-invalid-crossref \
--exit-threshold 2 \
--verbose 6 \
"${PROJECT_DIR}"

What do you use to generate the html?

Owner

tomaz commented Jul 23, 2014

Nothing much different, except I just tried running appledoc from sources in Xcode and only through the example file provided. As said the error probably comes from another file; either take a look at log output to see which one it is (I'd recommend lowering --verbose level a bit), or progressively add files to appledoc until you hit the one that's causing the issue. Then isolate on that single file and see what exactly causes it. Note that it'll probably be simpler to use appledoc straight from Terminal than from Xcode build script.

I'm sorry but you maybe send to a wrong email. This is a personal mail-box, has nothing to do with apple....

------------------ 原始邮件 ------------------
发件人: "tomaz";notifications@github.com;
发送时间: 2014年7月24日(星期四) 凌晨2:30
收件人: "tomaz/appledoc"appledoc@noreply.github.com;
抄送: "风萧萧"wooin@qq.com;
主题: Re: [appledoc] Oops, something went wrong... (#244)

Nothing much different, except I just tried running appledoc from sources in Xcode and only through the example file provided. As said the error probably comes from another file; either take a look at log output to see which one it is (I'd recommend lowering --verbose level a bit), or progressively add files to appledoc until you hit the one that's causing the issue. Then isolate on that single file and see what exactly causes it. Note that it'll probably be simpler to use appledoc straight from Terminal than from Xcode build script.


Reply to this email directly or view it on GitHub.

Litome commented Jul 30, 2014

Just left a comment on #211 with log from console.
I've got the same issue including when parsing the standard AppDelegate.h files generated by xCode on creation of a clean new project as single App from scratch.
Please help...

Owner

tomaz commented Jul 30, 2014

Answered on #211 :)

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