2012-09-09 37 views
10

Xin chào Tôi đang cố gắng xây dựng một trình duyệt web đơn giản và khi tôi cố gắng để chạy chương trình bên trong xây dựng xcode nó nói xây dựng suceded và sau đó throughs một lỗi và dừng tảiMac OS App sẽ không chạy

Lỗi:

argv char ** 0x00007fff5fbff7b8 
*argv char * 0x00007fff5fbff940 
**argv char '/(My Directory>>>>)' 

Output:

2012-09-09 09:59:52.917 Snow Storm[29121:403] An uncaught exception was raised 
2012-09-09 09:59:52.919 Snow Storm[29121:403] *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (WebView) 
2012-09-09 09:59:52.924 Snow Storm[29121:403] (
    0 CoreFoundation      0x00007fff85f6ef56 __exceptionPreprocess + 198 
    1 libobjc.A.dylib      0x00007fff8cb2bd5e objc_exception_throw + 43 
    2 CoreFoundation      0x00007fff85f6ed8a +[NSException raise:format:arguments:] + 106 
    3 CoreFoundation      0x00007fff85f6ed14 +[NSException raise:format:] + 116 
    4 Foundation       0x00007fff8d8bb705 _decodeObjectBinary + 2714 
    5 Foundation       0x00007fff8d8bc976 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193 
    6 Foundation       0x00007fff8d89345c -[NSArray(NSArray) initWithCoder:] + 486 
    7 Foundation       0x00007fff8d8bb797 _decodeObjectBinary + 2860 
    8 Foundation       0x00007fff8d8baab2 _decodeObject + 201 
    9 AppKit        0x00007fff8365cee6 -[NSView initWithCoder:] + 1051 
    10 Foundation       0x00007fff8d8bb797 _decodeObjectBinary + 2860 
    11 Foundation       0x00007fff8d8baab2 _decodeObject + 201 
    12 AppKit        0x00007fff8374dd1a -[NSWindowTemplate initWithCoder:] + 3998 
    13 Foundation       0x00007fff8d8bb797 _decodeObjectBinary + 2860 
    14 Foundation       0x00007fff8d8bc976 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193 
    15 Foundation       0x00007fff8d8bc377 -[NSSet(NSSet) initWithCoder:] + 519 
    16 Foundation       0x00007fff8d8bb797 _decodeObjectBinary + 2860 
    17 Foundation       0x00007fff8d8baab2 _decodeObject + 201 
    18 AppKit        0x00007fff83561871 -[NSIBObjectData initWithCoder:] + 2099 
    19 Foundation       0x00007fff8d8bb797 _decodeObjectBinary + 2860 
    20 Foundation       0x00007fff8d8baab2 _decodeObject + 201 
    21 AppKit        0x00007fff83560f1c loadNib + 235 
    22 AppKit        0x00007fff83560470 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217 
    23 AppKit        0x00007fff8356038b +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141 
    24 AppKit        0x00007fff835602ce +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364 
    25 AppKit        0x00007fff837d106f NSApplicationMain + 398 
    26 Snow Storm       0x0000000100001472 main + 34 
    27 Snow Storm       0x0000000100001444 start + 52 
) 
2012-09-09 09:59:53.026 Snow Storm[29121:403] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (WebView)' 
*** First throw call stack: 
(
    0 CoreFoundation      0x00007fff85f6ef56 __exceptionPreprocess + 198 
    1 libobjc.A.dylib      0x00007fff8cb2bd5e objc_exception_throw + 43 
    2 CoreFoundation      0x00007fff85f6ed8a +[NSException raise:format:arguments:] + 106 
    3 CoreFoundation      0x00007fff85f6ed14 +[NSException raise:format:] + 116 
    4 Foundation       0x00007fff8d8bb705 _decodeObjectBinary + 2714 
    5 Foundation       0x00007fff8d8bc976 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193 
    6 Foundation       0x00007fff8d89345c -[NSArray(NSArray) initWithCoder:] + 486 
    7 Foundation       0x00007fff8d8bb797 _decodeObjectBinary + 2860 
    8 Foundation       0x00007fff8d8baab2 _decodeObject + 201 
    9 AppKit        0x00007fff8365cee6 -[NSView initWithCoder:] + 1051 
    10 Foundation       0x00007fff8d8bb797 _decodeObjectBinary + 2860 
    11 Foundation       0x00007fff8d8baab2 _decodeObject + 201 
    12 AppKit        0x00007fff8374dd1a -[NSWindowTemplate initWithCoder:] + 3998 
    13 Foundation       0x00007fff8d8bb797 _decodeObjectBinary + 2860 
    14 Foundation       0x00007fff8d8bc976 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193 
    15 Foundation       0x00007fff8d8bc377 -[NSSet(NSSet) initWithCoder:] + 519 
    16 Foundation       0x00007fff8d8bb797 _decodeObjectBinary + 2860 
    17 Foundation       0x00007fff8d8baab2 _decodeObject + 201 
    18 AppKit        0x00007fff83561871 -[NSIBObjectData initWithCoder:] + 2099 
    19 Foundation       0x00007fff8d8bb797 _decodeObjectBinary + 2860 
    20 Foundation       0x00007fff8d8baab2 _decodeObject + 201 
    21 AppKit        0x00007fff83560f1c loadNib + 235 
    22 AppKit        0x00007fff83560470 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217 
    23 AppKit        0x00007fff8356038b +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141 
    24 AppKit        0x00007fff835602ce +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364 
    25 AppKit        0x00007fff837d106f NSApplicationMain + 398 
    26 Snow Storm       0x0000000100001472 main + 34 
    27 Snow Storm       0x0000000100001444 start + 52 
) 
terminate called throwing an exception(lldb) 

Heres những gì mình đề cập đến:

int main(int argc, char *argv[]) 
{ 
    return NSApplicationMain(argc, (const char **)argv); 
} 

Hy vọng ai đó có thể giúp

Denver

Trả lời

37

Bạn nên thêm WebKit.framework để dự án của bạn.

+0

durr, cảm ơn !!!! –

+0

Bạn được chào đón. –

Các vấn đề liên quan