objc_setAssociatedObject上的EXC_BAD_ACCESS与-weak_library /usr/lib/libSystem.B.dylib链接器标志 [英] EXC_BAD_ACCESS on objc_setAssociatedObject with -weak_library /usr/lib/libSystem.B.dylib linker flags
问题描述
当我使用链接器标志调用 objc_setAssociatedObject
时,我有 EXC_BAD_ACCESS
: -weak_library /usr/lib/libSystem.B.dylib
链接器标志。
I have a EXC_BAD_ACCESS
when I call objc_setAssociatedObject
with the linker flags : -weak_library /usr/lib/libSystem.B.dylib
linker flags.
我绝对需要链接器标志,因为这个,有人知道解决方法吗?
I absolutely need the linker flag because of this, do somebody know a workaround?
(I在 dispatch_async
上也有崩溃,但我可以解决这个问题...另外,我正在我的应用程序上构建iOS 4兼容的iOS 4兼容功能)
(I also have a crash on dispatch_async
but I can work around that... Also, I'm building a iOS 4 only feature on my app that is iOS 3 compatible)
编辑:随着更多的研究,我发现这个和这个问题,但没有更多答案......
With more research, I found this and this question but no more answer...
推荐答案
问题只是iOS模拟器中的一个错误。代码在设备上正常工作。
The problem is simply a bug in the iOS Simulator. The codes works fine on the device.
我已经在Apple的bug报告器上填写了一个雷达(雷达:// 9470793)
I've filled a radar on Apple's bug reporter (radar://9470793)
编辑:只是发现: -weak_library /usr/lib/libSystem.B.dylib打破了iOS模拟器。请改用-weak-lSystem。
这篇关于objc_setAssociatedObject上的EXC_BAD_ACCESS与-weak_library /usr/lib/libSystem.B.dylib链接器标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!