TypeError:错误#1009:但调试器说该对象有效
我遇到了一个问题,当调试器报告对象不为空时,我收到 TypeError: Error #1009: Cannot access a property or method of a null object reference
。跟踪报告该对象为空,但调试视图中的变量列表或滚动变量报告它已填充了对象。
I ran into a problem where I was getting a TypeError: Error #1009: Cannot access a property or method of a null object reference
while the debugger was reporting that the object was not null. Traces report that the object is null, but the variables list in debug view or rolling over the variable reported that it was populated with an object.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案最终是我有一个类和一个子类,每个类都有一个同名的
private
var。该变量已填充在子类中,但未填充在超类中。调试器没有区分两者,并且报告了错误的值。这似乎是一个调试器错误。The answer ended up being that I had a class and a subclass, each with a
private
var of the same name. The variable was populated in the subclass but not the superclass. The debugger did not differentiate between the two, and was reporting an incorrect value. This appears to be a debugger bug.