gpt4 book ai didi

iphone - 向项目添加新的源文件会更改主应用程序中的调用堆栈

转载 作者:行者123 更新时间:2023-11-29 05:02:42 25 4
gpt4 key购买 nike

我有自己的插件 - 链接到我的项目的静态库。当我添加 Twitter+OAuth 源并编译它们时,它更改了我的主应用程序中的调用堆栈,导致 EXC_BAD_ACCESS 失败。

没有 Twitter 源文件(工作正常):

#0  0x0051fc32 in registerMyOwnPluginCallback at MyPlugin.c:19
#1 0x00019b54 in -[AppController applicationDidFinishLaunching:] at AppController.mm:1058
#2 0x308f15a4 in -[UIApplication _performInitializationWithURL:sourceBundleID:]
#3 0x308f117c in -[UIApplication _runWithURL:sourceBundleID:]
#4 0x309374b0 in -[UIApplication handleEvent:withNewEvent:]
#5 0x30936cf0 in -[UIApplication sendEvent:]
#6 0x3093687c in _UIApplicationHandleEvent
#7 0x3204696c in PurpleEventCallback
#8 0x30254a76 in CFRunLoopRunSpecific
#9 0x3025416a in CFRunLoopRunInMode
#10 0x308f0354 in -[UIApplication _run]
#11 0x308eea94 in UIApplicationMain

使用 Twitter 源文件(抛出 EXC_BAD_ACESS):

#0  0x00533b8c in registerMyOwnPluginCallback at MyPlugin.c:17
#1 0x308f15a4 in -[UIApplication _performInitializationWithURL:sourceBundleID:]
#2 0x308f117c in -[UIApplication _runWithURL:sourceBundleID:]
#3 0x309374b0 in -[UIApplication handleEvent:withNewEvent:]
#4 0x30936cf0 in -[UIApplication sendEvent:]
#5 0x3093687c in _UIApplicationHandleEvent
#6 0x3204696c in PurpleEventCallback
#7 0x30254a76 in CFRunLoopRunSpecific
#8 0x3025416a in CFRunLoopRunInMode
#9 0x308f0354 in -[UIApplication _run]
#10 0x308eea94 in UIApplicationMain
#11 0x0001b8c4 in main at main.mm:18

我只添加了编译源文件,没有修改起始代码。

造成这种行为的原因是什么?

最佳答案

在此之前,您需要确定哪个对象正在泄漏。

在项目文件夹中,单击可执行文件并选择您的应用程序,然后右键单击该应用程序,然后单击获取信息,然后添加参数,例如 NSZombieEnabled YES。现在清理所有目标并运行应用程序重现相同的场景,然后它将显示正确的对象。然后修复它。

关于iphone - 向项目添加新的源文件会更改主应用程序中的调用堆栈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6504800/

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