VS 2005 在 x64 操作系统上的 bug

今天用 VS 2005 写了一段Remoting的代码。运行总是报错,错误信息如下:
FatalExecutionEngineError was detected
Message: The runtime has encountered a fatal error. The address of the error was at 0x7f5350c6, on thread 0x12a0. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.

把一些以前可以运行的代码拿出来运行,还是这样的错误。

在另一台机子上运行,没有问题!

在网上查了一下资料,发现是微软的一个bug,微软在下面的网址进行了反馈:

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=284215

Thank you very much for this bug report. The issue repros only when using custom marshaling with arrays on 64-bit and on Vista or on machines with the recent .NET Framework update. It will be fixed in an upcoming servicing release. In the meantime, a workaround is to use 'object' instead of an array in interop method signatures.

Ladi Prosek,
CLR team
Microsoft 在 2007/7/27 19:02 发送

晕~~等到何年何月。

似乎这个bug是在x64操作系统上的问题,难道真要等下一个版本???

再找了一下资料,貌似这个问题是因为这样引起的

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=382483&SiteID=1
 

I spend a few hours on this and It's because your using a x86 dll on a x64 exe.

Switch your exe to x86 and it should run.

Or make them both x64.


---------------------------------------------------------------------------------------
but how to switch??????????
在VS里找,发现在工程属性里的build tag页,有选择Platform target这么一项。把选项选为x86。

重新编译,程序就可以正常运行了!

转载于:https://www.cnblogs.com/wenjielee/archive/2007/08/03/842212.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值