在用Visual Studio时遇到这个报错。原因:访问了非法的内存地址。

这个问题不应该被忽略,通常是代码有bug。

解决办法:

VS2013: 菜单->Debug->Exceptions

VS2015: 菜单->Debug->Windows->Exception Settings
SEH exception with code 0xc0000005 thrown in the test body

确保所有项都打勾,然后调试运行,出现第一个报错的地方就是非法访问内存的bug,改掉它。

参考:https://stackoverflow.com/questions/13157671/seh-exception-with-code-0xc0000005-thrown-in-the-test-body

The way I just found the problem was that in Visual Studio I went to Debug->Exceptions, and checked everything in the first column. Then run/debug your unit tests, and it will throw an exception on the line that the problem is at. That's where you need to debug/fix it.

For visual studio 2015: Debug->Windows->Exception Settings

相关文章:

  • 2021-05-22
  • 2021-10-28
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2021-05-12
猜你喜欢
  • 2021-04-15
  • 2021-06-18
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2022-02-05
相关资源
相似解决方案