Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
如果模拟器上发生这种情况,请重新启动计算机。如果这种情况发生在真实设备上,请重新启动设备,如果问题仍然存在,请重新启动计算机。这个问题对我来说已经发生过多次,因为当测试意外中止时,设备/模拟器上留下了僵尸进程。简单的重新启动即可修复它。
If this is happening on the simulator, restart your computer. If this is happening on a real device, restart the device, and if the problem persists, restart the computer as well. This problem has occurred for me multiple times, because of a zombified process left on the device/simulator when a test is unexpectedly aborted. A simple reboot will fix it.
您的所有代码都通过
main.m
运行。因此,您真正想看到的是堆栈跟踪,并且有一个很好的示例这里,但我看到你正在使用自动释放池,所以你需要类似的东西All your code gets run through the
main.m
. So what you really want to see is a stack trace and there's is a good example here, but I see you're using the autoreleasepool so you'll need something like这不在主代码中。可以在任何地方。请尝试仪器中的僵尸工具。您可能正在尝试访问已经释放的对象。 NSZombie 会告诉你哪个是物体,你可以从那里进行调查。
This is not in Main code. Can be anywhere. Please try zombie tool in instruments. You are probably trying to access an object which has been already released. NSZombie will tell you which is the object and you can investigate from there.
您是否删除了对主故事板中附加内容的引用?
如果是这样,请检查该对象的引用出口,看看它是否仍在尝试指向某些内容,尝试删除该引用并再次运行模拟器...
Did you remove a reference to something attached in your main storyboard?
If so, checkout the referencing outlets of that object to see if it's still trying to point to something, try removing that reference and running your simulator again...