开发者

odatagen terminating app due to uncaught exception 'NSRangeException'

开发者 https://www.devze.com 2023-03-07 15:16 出处:网络
Please help me to fix the following odatagen issue: Command line: ./odatagen /uri=http://odata.netflix.com/v1/Catalog/ /out=/Users/sontmai/Desktop/ODatagenApp

Please help me to fix the following odatagen issue:

Command line: ./odatagen /uri=http://odata.netflix.com/v1/Catalog/ /out=/Users/sontmai/Desktop/ODatagenApp

Exception:

2011-05-20 14:14:14.056 odatagen[3356:903] * Terminating app due to uncaught exception 'NSRangeException', reason: ' -[NSPathStore2 substringToIndex:]: Range or index out of bounds' ** Call stack at first throw: ( 0 CoreFoundation 0x900da6ba __raiseError + 410 1 libobjc.A.dylib 0x99836509 objc_exception_throw + 56 2 CoreFoundation 0x900da3e8 +[NSExc开发者_Python百科eption raise:format:arguments:] + 136 3 CoreFoundation 0x900da35a +[NSException raise:format:] + 58 4 Foundation 0x99411120 -[NSString substringToIndex:] + 133 5 odatagen 0x00002f39 getFileName + 176 6 odatagen 0x00003742 main + 347 7 odatagen 0x00001d75 start + 53 8 ??? 0x00000003 0x0 + 3 ) Trace/BPT trap


It seems that the odatagen was not written with Mac users in mind.

odatagen relies on files that exist in

.../ProjectFiles/Framework/src/odatagen/ 

directory. Thus if open .../ProjectFiles/Framework/src/odatagen/odatagen.xcodeproj in XCode and compile, navigate to the new odatagen executable it should work.

However, if you are like me and do not compile to the default location then it still will not work. The odatagen requires the its path include

.../ProjectFiles/Framework/src/odatagen/build/... 

You can either revert to build to the default location or set a custom build directory or move the odatagen executable to the necessary location.

0

精彩评论

暂无评论...
验证码 换一张
取 消