所以我开始获得的iOS应用程序现在正在我们的开发中。它基本上是一个音乐艺术家/内容聚合设置。
我们遇到的第一个错误是典型的未捕获异常终止。特别是在“音乐”标签上开始播放歌曲之后,如果用户返回“主页”标签并返回“音乐”标签以停止播放歌曲,则播放终止。
我已经包含了下面的日志,因为我正在向任何愿意指出我如何解决这个问题的人提出帮助!我对objective-c和xcode相当新,所以任何帮助都非常感谢,我将欠你一个! (请随时向我询问您可能需要进一步协助的更多信息,我很乐意遵守。)
谢谢!
EDITED:在@autoreleasepool的大括号里面是我被引导到SIGABRT的原因。如果您需要更多,请告诉我们!
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
下面的原始日志消息
2013-12-02 01:04:46.971 The Deep North[10640:70b] AVPlayerStatusReadyToPlay
2013-12-02 01:04:48.896 The Deep North[10640:70b] Now playing: Broken Clocks
2013-12-02 01:04:49.951 The Deep North[10640:70b] *** Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer <MusicViewController 0x10d037390> for the key path "status" from <AVPlayer 0x10d01ebb0> because it is not registered as an observer.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001019b7795 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010171a991 objc_exception_throw + 43
2 CoreFoundation 0x00000001019b75ad +[NSException raise:format:] + 205
3 Foundation 0x000000010131a109 -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:] + 500
4 Foundation 0x0000000101319eb3 -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:] + 95
5 The Deep North 0x00000001000036ea -[MusicViewController playSong:] + 442
6 UIKit 0x000000010037e096 -[UIApplication sendAction:to:from:forEvent:] + 80
7 UIKit 0x000000010037e044 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 17
8 UIKit 0x0000000100452450 -[UIControl _sendActionsForEvents:withEvent:] + 203
9 UIKit 0x00000001004519c0 -[UIControl touchesEnded:withEvent:] + 530
10 UIKit 0x0000000100682c3d _UIGestureRecognizerUpdate + 5149
11 UIKit 0x00000001003b2925 -[UIWindow _sendGesturesForEvent:] + 928
12 UIKit 0x00000001003b35e5 -[UIWindow sendEvent:] + 910
13 UIKit 0x000000010038cfa2 -[UIApplication sendEvent:] + 211
14 UIKit 0x000000010037ad7f _UIApplicationHandleEventQueue + 9549
15 CoreFoundation 0x0000000101946ec1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
16 CoreFoundation 0x0000000101946792 __CFRunLoopDoSources0 + 242
17 CoreFoundation 0x000000010196261f __CFRunLoopRun + 767
18 CoreFoundation 0x0000000101961f33 CFRunLoopRunSpecific + 467
19 GraphicsServices 0x0000000101ec93a0 GSEventRunModal + 161
20 UIKit 0x000000010037d043 UIApplicationMain + 1010
21 The Deep North 0x0000000100009bc3 main + 115
22 libdyld.dylib 0x00000001052ec5fd start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException