How to understand and fixed this error?

0
2011-04-20 18:38:41.347 RIE[1683:607] -[UICGColor _shouldContinuePlaybackInBackground]: unrecognized selector sent to instance 0x28db10
2011-04-20 18:38:41.417 RIE[1683:607] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UICGColor _shouldContinuePlaybackInBackground]: unrecognized selector sent to instance 0x28db10'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x342ed64f __exceptionPreprocess + 114
    1   libobjc.A.dylib                     0x35570c5d objc_exception_throw + 24
    2   CoreFoundation                      0x342f11bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
    3   CoreFoundation                      0x342f0649 ___forwarding___ + 508
    4   CoreFoundation                      0x34267180 _CF_forwarding_prep_0 + 48
    5   MediaPlayer                         0x344628b7 -[MPMoviePlayerViewController _moviePlayerViewController_applicationDidEnterBackgroundNotification:] + 42
    6   Foundation                          0x333b5183 _nsnote_callback + 142
    7   CoreFoundation                      0x342bc20f __CFXNotificationPost_old + 402
    8   CoreFoundation                      0x34256eeb _CFXNotificationPostNotification + 118
    9   Foundation                          0x333b25d3 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
    10  UIKit                               0x36364d01 -[UIApplication _handleApplicationSuspend:eventInfo:] + 500
    11  UIKit                               0x362feaf9 -[UIApplication handleEvent:withNewEvent:] + 1916
    12  UIKit                               0x362fe215 -[UIApplication sendEvent:] + 44
    13  UIKit                               0x362fdc53 _UIApplicationHandleEvent + 5090
    14  GraphicsServices                    0x33e58e77 PurpleEventCallback + 666
    15  CoreFoundation                      0x342c4a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
    16  CoreFoundation                      0x342c683f __CFRunLoopDoSource1 + 166
    17  CoreFoundation                      0x342c760d __CFRunLoopRun + 520
    18  CoreFoundation                      0x34257ec3 CFRunLoopRunSpecific + 230
    19  CoreFoundation                      0x34257dcb CFRunLoopRunInMode + 58
    20  GraphicsServices                    0x33e5841f GSEventRunModal + 114
    21  GraphicsServices                    0x33e584cb GSEventRun + 62
    22  UIKit                               0x36328d69 -[UIApplication _run] + 404
    23  UIKit                               0x36326807 UIApplicationMain + 670
    24  Motor Show                          0x0000219b main + 70
    25  Motor Show                          0x00002150 start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal:  “SIGABRT”.
ios
crash
asked on Stack Overflow Apr 20, 2011 by RAGOpoR

1 Answer

1

Hard to say given just the stack trace, but I would suggest the following:

  1. Implement applicationWillResignActive: in your UIApplicationDelegate to ensure that video playback is paused or stopped before the application enters the background.

  2. Create a custom UIApplication subclass to use in your app, and override the _handleApplicationSuspend:eventInfo: method so that it returns without propagating the event to other classes further down the chain.

  3. Figure out how to unregister your MPMoviePlayerViewController component from the notification center so that it does not receive the 'ApplicationDidEnterBackgroundNotification'.

answered on Stack Overflow Apr 20, 2011 by aroth

User contributions licensed under CC BY-SA 3.0