SIGABRT (app is self terminating) after stopping a music player

174 views Asked by At

So the iOS app my start up acquired is under our development now. It's basically a Music Artist/Content Aggregation set up.

The first bug we have come across is a typical uncaught exception termination. And it is happening specifically after a song is started on the "Music" tab and then if the user returns to the "Home" tab and back to the "Music" tab to stop the song...boom terminated.

I have included the log below because I am asking for help from anyone willing to point me in the right direction on how to solve this issue! I am fairly new to objective-c and xcode, so any help at all is greatly appreciated and I will owe you one! (Please feel free to ask me for any more information you may need to further assist, and I will gladly comply.)

Thanks!

EDITED: inside the curly braces of the @autoreleasepool is where I am being directed to the cause of the SIGABRT. Please let me know if you need more!

#import <UIKit/UIKit.h>

#import "AppDelegate.h"

int main(int argc, char * argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}

Original Log Message Below

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
0

There are 0 answers