模拟时调试器下的堆栈/堆栈损坏? [英] Corrupted stack/heap under debugger when simulating?
问题描述
有没有人看到这个?在另一个运行中,变量实际上在变量视图中显示为NSDate !!!
断点实际上在线出现在;该行尚未执行。因此,您在这个变量上看起来太早了。在 之后之前过去初始化的行之前,它没有意义的价值。您仍然在该行之前,所以它的值是随机垃圾。
I'm using Xcode 6.3.1. I'm trying to track a weird issue in an app and now I'm seeing that local variables seem to be incorrectly initialised. When I hit a breakpoint at the line where a local variable is defined and initialised at the same time, it is actually shown as an existing local variable, but with a corrupt value:
Has anyone else seen this? In another run the variable was actually showing in the variable view as being an NSDate !!!
A breakpoint is actually before the line it appears on; that line has not yet executed. You are thus looking too soon at this variable. It has no meaningful value until after you step past the line where it is initialized. You are still before that line so its value is random garbage.
这篇关于模拟时调试器下的堆栈/堆栈损坏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!