2012-01-18 5 views
1

Xcode를 사용하여 Objective-C, cocoa, mac app을 만듭니다. 영화를 업로드 한 QuickTime Movie View 있습니다. 달리기를 누르면 작동하지 않고 창문이 보이지 않고 영화가 재생되지 않습니다!QuickTime Movie View를 사용할 때 크래시가 발생했습니다.

엑스 코드 나에게 알려줍니다이 :

Thread 1: Program received signal: "SIGABRT"

가 어떻게 내 영화 응용 프로그램이 작동받을 수 있나요?

나는 엑스 코드의 이전 버전에서 만든 유튜브 튜토리얼을 따라, 그래서 나는이 콘솔 코드 4.2

엑스 코드에서 작동하는 방법을 모르는 : 당신이

 
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011) 
Copyright 2004 Free Software Foundation, Inc. 
GDB is free software, covered by the GNU General Public License, and you are 
welcome to change it and/or distribute copies of it under certain conditions. 
Type "show copying" to see the conditions. 
There is absolutely no warranty for GDB. Type "show warranty" for details. 
This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys000 
[Switching to process 12270 thread 0x0] 
2012-01-18 13:59:44.191 TestMovie[12270:707] An uncaught exception was raised 
2012-01-18 13:59:44.192 TestMovie[12270:707] *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (QTMovieView) 
2012-01-18 13:59:44.194 TestMovie[12270:707] (
    0 CoreFoundation      0x00007fff8b3da286 __exceptionPreprocess + 198 
    1 libobjc.A.dylib      0x00007fff8ee9ed5e objc_exception_throw + 43 
    2 CoreFoundation      0x00007fff8b3da0ba +[NSException raise:format:arguments:] + 106 
    3 CoreFoundation      0x00007fff8b3da044 +[NSException raise:format:] + 116 
    4 Foundation       0x00007fff8b6aa7d9 _decodeObjectBinary + 2714 
    5 Foundation       0x00007fff8b6aba4a -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193 
    6 Foundation       0x00007fff8b682530 -[NSArray(NSArray) initWithCoder:] + 486 
    7 Foundation       0x00007fff8b6aa86b _decodeObjectBinary + 2860 
    8 Foundation       0x00007fff8b6a9b86 _decodeObject + 201 
    9 AppKit        0x00007fff8a455679 -[NSView initWithCoder:] + 1051 
    10 Foundation       0x00007fff8b6aa86b _decodeObjectBinary + 2860 
    11 Foundation       0x00007fff8b6a9b86 _decodeObject + 201 
    12 AppKit        0x00007fff8a546cac -[NSWindowTemplate initWithCoder:] + 3998 
    13 Foundation       0x00007fff8b6aa86b _decodeObjectBinary + 2860 
    14 Foundation       0x00007fff8b6aba4a -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193 
    15 Foundation       0x00007fff8b6ab44b -[NSSet(NSSet) initWithCoder:] + 519 
    16 Foundation       0x00007fff8b6aa86b _decodeObjectBinary + 2860 
    17 Foundation       0x00007fff8b6a9b86 _decodeObject + 201 
    18 AppKit        0x00007fff8a357e2d -[NSIBObjectData initWithCoder:] + 2099 
    19 Foundation       0x00007fff8b6aa86b _decodeObjectBinary + 2860 
    20 Foundation       0x00007fff8b6a9b86 _decodeObject + 201 
    21 AppKit        0x00007fff8a3574d8 loadNib + 235 
    22 AppKit        0x00007fff8a356a28 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217 
    23 AppKit        0x00007fff8a356943 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141 
    24 AppKit        0x00007fff8a356886 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364 
    25 AppKit        0x00007fff8a5ca637 NSApplicationMain + 398 
    26 TestMovie       0x0000000100001792 main + 34 
    27 TestMovie       0x0000000100001764 start + 52 
) 
2012-01-18 13:59:44.240 TestMovie[12270:707] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (QTMovieView)' 
*** First throw call stack: 
(
    0 CoreFoundation      0x00007fff8b3da286 __exceptionPreprocess + 198 
    1 libobjc.A.dylib      0x00007fff8ee9ed5e objc_exception_throw + 43 
    2 CoreFoundation      0x00007fff8b3da0ba +[NSException raise:format:arguments:] + 106 
    3 CoreFoundation      0x00007fff8b3da044 +[NSException raise:format:] + 116 
    4 Foundation       0x00007fff8b6aa7d9 _decodeObjectBinary + 2714 
    5 Foundation       0x00007fff8b6aba4a -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193 
    6 Foundation       0x00007fff8b682530 -[NSArray(NSArray) initWithCoder:] + 486 
    7 Foundation       0x00007fff8b6aa86b _decodeObjectBinary + 2860 
    8 Foundation       0x00007fff8b6a9b86 _decodeObject + 201 
    9 AppKit        0x00007fff8a455679 -[NSView initWithCoder:] + 1051 
    10 Foundation       0x00007fff8b6aa86b _decodeObjectBinary + 2860 
    11 Foundation       0x00007fff8b6a9b86 _decodeObject + 201 
    12 AppKit        0x00007fff8a546cac -[NSWindowTemplate initWithCoder:] + 3998 
    13 Foundation       0x00007fff8b6aa86b _decodeObjectBinary + 2860 
    14 Foundation       0x00007fff8b6aba4a -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193 
    15 Foundation       0x00007fff8b6ab44b -[NSSet(NSSet) initWithCoder:] + 519 
    16 Foundation       0x00007fff8b6aa86b _decodeObjectBinary + 2860 
    17 Foundation       0x00007fff8b6a9b86 _decodeObject + 201 
    18 AppKit        0x00007fff8a357e2d -[NSIBObjectData initWithCoder:] + 2099 
    19 Foundation       0x00007fff8b6aa86b _decodeObjectBinary + 2860 
    20 Foundation       0x00007fff8b6a9b86 _decodeObject + 201 
    21 AppKit        0x00007fff8a3574d8 loadNib + 235 
    22 AppKit        0x00007fff8a356a28 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217 
    23 AppKit        0x00007fff8a356943 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141 
    24 AppKit        0x00007fff8a356886 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364 
    25 AppKit        0x00007fff8a5ca637 NSApplicationMain + 398 
    26 TestMovie       0x0000000100001792 main + 34 
    27 TestMovie       0x0000000100001764 start + 52 
) 

답변

2

있습니까 QTKit에 연결 하시겠습니까? 프로젝트가 QTKit.framework을 참조하지 않더라도 Interface Builder를 사용하면 QTMovieView을 추가 할 수 있습니다.

QTMovieView를 사용하려면 QTKit에 링크해야합니다. Xcode 4는 링크 된 라이브러리 목록을 다른 위치로 이동시킵니다. Xcode 설명서에서 어디서 찾을 수 있는지 확인하십시오.