wanghui0380 不想填 技术经理  2012年12月12日
通告!vs 在64位系统上一个小bug
今天偶然发现,在64位操作系统上winform的Form_load写入
throw new Exception("xx");
并不会弹出异常,form本身能够正常运行,但是后续代码不再执行

查询了一下相关说明,发现是64位系统的固有bug,原本和vs无关。只是这里通告一下,各位同学在调试的时候要注意了。(虽然vs并没有中断运行,但是在输出窗口还是能看到异常信息,所以同学们在调试的时候的注意看输出窗口)

官方说明:
This is a known issue on 64-bit OS platform. The reason is that the 64bit OS core does not allow user mode exception through kernal mode stacks. The exception is swallowed by OS sliently. That happens in FormLoad handler, because it is called in an OS callback. 32bits OS doesn't do this, so it doesn't repro there.

The OS team is investigating related issues. In the mean time, you do have to work around this issue. Turning on "Stop on first chance exception" will make the debugger to stop in this scenario. But it does make the debugger to stop very often, so you might want to do this only when you find a problem.


ps:这个bug好像已经出来很久了,只是很少有人提过,估计大家写的代码都比较标准,基本不会在Form_load就异常:)
...全文
295 点赞 收藏 10
写回复
10 条回复

还没有回复,快来抢沙发~

发动态
发帖子
C#
创建于2007-09-28

8.4w+

社区成员

64.0w+

社区内容

.NET技术 C#
社区公告
暂无公告