升级到.Net 4.0后出现AccessViolationException
我将 wpf 桌面应用程序从 .net 3.5 升级到 .net 4.0。(将目标框架更改为 4.0)。升级后,它会显示一些意外的行为。
应用程序中有一个选项卡控件。当我单击特定选项卡时,仅发生以下行为之一。
1. 应用程序崩溃
2. AccessViolationException“尝试读取或写入受保护的内存。这通常表明其他内存已损坏。”
3. 申请已结束
4.有时工作正常。
除了此选项卡控件问题之外,应用程序意外关闭。 (关闭选项卡或滚动窗口时)。有时也会抛出致命执行引擎异常。
在转换为 .Net 4.0 之前一切正常。
我不知道那里发生了什么。请帮助解决这个问题。
I upgrade a wpf desktop application from .net 3.5 to .net 4.0.(Changed the target framework to 4.0). After the upgrade it shows some unexpected behaviours.
There is a tab control in the application. when i click a particular tab only either one of the following behaviours occurs.
1. Application crashed
2. AccessViolationException "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
3. Application closed
4. Sometimes working fine.
Other than this tab control issue, application closed unexpectedly. (when closing a tab or scroll a window). Sometiems Fatalexecutionengine exception also thrown.
Everything worked fine before converted to .Net 4.0.
I don't have any clue what's happening there. Please help to resolve this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试手动删除所有程序集,然后使用新框架重建所有内容? Visual Studio 通常就像 Windows,它需要重做一切,哈哈
did you try to manually delete all the assemblies then rebuild everything with the new framework ? Visual Studio is often like windows, it needs to redo everything lol