“自我” iOS 5.1中的调试器不可用 [英] "self" not available in debugger on iOS 5.1

查看:149
本文介绍了“自我” iOS 5.1中的调试器不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试调试在iOS 5.1下运行的问题,当我停止在代码中的调试器中获取错误并尝试使用调试器打印某些内容时,我会收到以下消息:

I'm trying to debug a problem running under iOS 5.1 and when I stop in the debugger inside the code that gets the error and try to print something with the debugger I get the message:


错误:warning:在声明捕获
Objective-C对象指针的上下文中停止,但self不可用;假装我们
属于通用上下文

error: warning: Stopped in a context claiming to capture an Objective-C object pointer, but 'self' isn't available; pretending we are in a generic context

对不起?有没有人知道我在这里做了什么?

Excuse me? Does anybody know what I've done to myself here?

代码太复杂了,任何人都想要看 - 我主要是希望有人能告诉我调试器消息的意思是什么。

The code is way too complicated for anybody to want to look it -- I'm mostly hoping somebody can tell me what the debugger message means.

这仅用于间歇性地失败,但现在主要失败。一般(或许总是)的操作第一次在iOS 5.1中尝试,偶尔在第一次之后,显然总是在iOS 6中运行。

This used to fail only intermittently but now fails mostly. The operation generally (or maybe always) works the first time I try it in iOS 5.1, occasionally after the first time, and apparently always works in iOS 6.

如果帮助了解一般的上下文...
我正在尝试向ALAssetsGroup添加一个刚写的对象,因此这是一个非UI线程的完成块。我有一个明智的堆栈回溯完成块。
失败是因为存储的ALAssetsGroup不再具有有意义的值 - 或者说,它的NSLog知道它是一个ALAssetsGroup对象。这个值被分配在一个地方(并记录下来,所以我跟踪),我可以看到初始赋值与键值观察,我看不到它以KVO排序方式被更改。

If it helps to know the general context ... I'm trying to add a just-written object to an ALAssetsGroup so this is in a completion block on a non-UI thread. I have a sensible-looking stack backtrace for a completion block. The failure is because the stored ALAssetsGroup no longer has a meaningful value -- or so says an NSLog of it that knows that it is an ALAssetsGroup object. This value is assigned in one place (and logged so I track that) and I can see the initial assignment with key-value observing and I don't see it ever being changed in a KVO-sorta way.

推荐答案

在Build Settings中,将 Precompile Prefix Header 设置为 code>为我修复。

In Build Settings, setting Precompile Prefix Header to NO fixed it for me.

这篇关于“自我” iOS 5.1中的调试器不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆