gpt4 book ai didi

iphone - [AVPlaybackItem fpItem] : message sent to deallocated instance

转载 作者:行者123 更新时间:2023-12-03 16:38:32 24 4
gpt4 key购买 nike

我用 MPMoviePlayerController 播放电影。稍后,应用程序被“重新启动”(意味着伪重置,所有 viewController 被移除,用户返回主屏幕),再次播放同一部电影。

这会导致 iPad 上的 iOS 3.2.2 崩溃:

[AVPlaybackItem fpItem]: message sent to deallocated instance



我不知道那是从哪里来的。似乎是私有(private)的东西。有没有人经历过并可能解决了同样的问题?

该特定地址的堆栈跟踪:
(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

最佳答案

听起来你在打电话 release比你打电话的更多retain .

错误消息末尾是否不包含十六进制地址?如果是这样,请按照以下步骤查找有问题的对象:

  • 导航到 Project->Edit Active Executable(或按 Command-Option-X)。选择参数选项卡。设置环境变量如下图:
    alt text
  • 运行程序并重复重现错误所需的步骤。
  • 复制错误末尾的十六进制地址。然后,在调试器控制台中输入以下命令:(gdb) info malloc-history <paste-address-here> .
  • 检查输出以寻找有问题的对象。

  • 附言完成后不要忘记禁用环境变量。

    关于iphone - [AVPlaybackItem fpItem] : message sent to deallocated instance,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4206147/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com