我相信你們大多數人都遇到過類似的問題。那麼,事實證明我試圖用解析來運行這個簡單的程序,但是我遇到了一個與程序的程序集有關的有趣問題,它是線程組合。運行時錯誤Xcode運行PARSE
程序沒有發現編譯錯誤
<!-- language: «lang-c» -->
«#import "PCommonsAppDelegate.h"
@implementation PCommonsDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[Parse setApplicationId:@"100000000pUgmUXDRT64dF6mTT8mY"
clientKey:@"aLT1itwGri41wZ5Nva8WBb6hWGVBGkjk5aWvmDTm"];
return YES;
} »
主要看起來像這樣。
<!-- language: «lang-c» -->
«// main.m
//PCommons using PARSE
//
//
#import <UIKit/UIKit.h>
#import "PCommonsAppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([PCommonsAppDelegate class]));
}
}
»
日誌輸出看起來是這樣的:
<!-- language: «lang-bsh» -->
«2013-07-30 13:52:48.930 ParseTask[691:c07]
*** Assertion failure in -[UITableView_configureCellForDisplay:forIndexPath:],
/SourceCache/UIKit_Sim/UIKit-2380.17/UITableView.m:5471
2013-07-30 13:52:48.931 ParseExample[691:c07] *** Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'UITableView dataSource
must return a cell from tableView:cellForRowAtIndexPath:'
*** First throw call stack:
(0x213d012 0x1f62e7e 0x213ce78 0x1c21665
0x1185c1b 0x111a40c 0x1185a7b 0x118a919
0x118a9cf 0x11731bb 0x1183b4b 0x11202dd
0x1f766b0 0x565fc0 0x55a33c 0x55a150
0x4d80bc 0x4d9227 0x4d98e2 0x2105afe
0x2105a3d 0x20e37c2 0x20e2f44 0x20e2e1b
0x2b6a7e3 0x2b6a668 0x10cfffc 0x2b3d 0x2a65)
libc++abi.dylib: terminate called throwing an exception»
而且,考慮看看線程結構的時候,我注意到有一個線程1:信號SIGBRT「斷點「影響堆棧。例如:
我意識到
0x93e0ea72的:MOVL 26027(%EDX),EDX%
上UIApplicationMain。
線程1(主線程):: 0__pthread_kill
«libsystem_kernel.dylib`__pthread_kill:
0x93e0ea60: movl $524616, %eax
0x93e0ea65: calll 0x93e104c2 ; _sysenter_trap
0x93e0ea6a: jae 0x93e0ea7a ; __pthread_kill + 26
0x93e0ea6c: calll 0x93e0ea71 ; __pthread_kill + 17
0x93e0ea71: popl %edx
0x93e0ea72: movl 26027(%edx), %edx
0x93e0ea78: jmpl *%edx
0x93e0ea7a: ret
0x93e0ea7b: nop
»
斷點還就線程2,線程3,線程4 ......直到線程13這讓我懷疑如果這是套接字的問題。
如何有效地進行編譯?
希望的applicationID和clientKey您發佈不實值.... – danielbeard
他們都沒有;) –