2010-11-17 97 views
0

我玩的是電影的MPMoviePlayerController。後來,應用程序「重新啓動」(意思是一個僞重置,其中所有viewController被刪除,用戶返回到主屏幕),並再次播放相同的電影。[AVPlaybackItem fpItem]:消息發送到釋放實例

這會導致iPad上的iOS中3.2.2崩潰:

[AVPlaybackItem fpItem]:消息發送給 釋放實例

我不知道在哪裏是從何而來。似乎是私人的東西。有沒有人經歷過並可能解決同樣的問題?

該特定地址的堆棧跟蹤:

(gdb) info malloc 0x11471400 
Alloc: Block address: 0x11471400 length: 76 
Stack - pthread: 0xa0630500 number of frames: 34 
    0: 0x9534e0c3 in malloc_zone_calloc 
    1: 0x9534e01a in calloc 
    2: 0x343edc9 in _internal_class_createInstanceFromZone 
    3: 0x344b5c9 in _class_createInstanceFromZone 
    4: 0x344b5ef in class_createInstance 
    5: 0x3326b57 in +[NSObject allocWithZone:] 
    6: 0x332583a in +[NSObject alloc] 
    7: 0x536ab67 in -[AVPlaybackQueue queueItemWasAddedNotification:] 
    8: 0x27f586 in _nsnote_callback 
    9: 0x328d165 in _CFXNotificationPostNotification 
    10: 0x2762ca in -[NSNotificationCenter postNotificationName:object:userInfo:] 
    11: 0x5354982 in -[AVQueue itemWasAdded:atIndex:] 
    12: 0x5354801 in -[AVQueue insertItem:atIndex:error:] 
    13: 0x53549d8 in -[AVQueue appendItem:error:] 
    14: 0x535c3be in -[AVController addNextFeederItemToQueue] 
    15: 0x535b06f in -[AVController checkQueueSpace] 
    16: 0x5359f46 in -[AVController setQueue:] 
    17: 0x535ac62 in -[AVController setQueueFeeder:withIndex:] 
    18: 0x30eee20 in -[MPAVController reloadFeederWithStartIndex:] 
    19: 0x30deed7 in -[MPMoviePlayerControllerNew _prepareToPlayWithStartIndex:] 
    20: 0x30dc686 in -[MPMoviePlayerControllerNew prepareToPlay] 
    21: 0x27f586 in _nsnote_callback 
    22: 0x328d165 in _CFXNotificationPostNotification 
    23: 0x2762ca in -[NSNotificationCenter postNotificationName:object:userInfo:] 
    24: 0x281238 in -[NSNotificationCenter postNotificationName:object:] 
    25: 0x31596d1 in -[MPMovie _determineMediaType] 
    26: 0x291b87 in __NSFireDelayedPerform 
    27: 0x32747dc in CFRunLoopRunSpecific 
    28: 0x32738a8 in CFRunLoopRunInMode 
    29: 0x3aaf89d in GSEventRunModal 
    30: 0x3aaf962 in GSEventRun 
    31: 0x52b372 in UIApplicationMain 
    32: 0x27be in main at /blablabla 
    33: 0x2735 in start 

回答

1

這聽起來像你打電話release超過您所呼叫retain

是否錯誤消息不包含在最後一個十六進制地址?如果是這樣,請按照下列步驟追捕違規對象:

  1. 導航到項目 - >編輯活動的可執行(或按下Command-Option鍵-X)。選擇參數選項卡。設置環境變量,如下圖所示: alt text

  2. 運行程序,重複重現錯誤所需的步驟。

  3. 複製在錯誤的結束十六進制地址。然後,在調試器控制檯中輸入以下命令:(gdb) info malloc-history <paste-address-here>
  4. 檢查輸出追捕違規對象。

P.S.完成後不要忘記禁用環境變量。

+0

我真的不認爲這是我的問題編號。 AVPlaybackItem甚至不是我可以實例化的東西。 MPMoviePlayerController在UIViewController中實例化。該viewController在某個地方被釋放。然後創建一個UIViewController的新實例。只有這樣,錯誤纔會發生。我認爲一些負責處理播放隊列的私有API會導致問題。我添加堆棧跟蹤到我的問題,也許有人可以拉出他們的水晶球,並幫助... – 2010-11-17 19:47:59

+0

嗨約瑟夫圖拉,請張貼您解決上述問題的方式。 – Hanuman 2011-04-27 11:52:36

1

也許你打電話準備玩一次以上的同一部電影,我認爲這是問題,它之前的4.3存在於所有iOS我猜(不知道雖然)所以剛旗的電影,如果準備發揮得叫一次,然後不記得它在同一個文件

相關問題