无法为堆栈创建新的保护页面 [英] A new guard page for the stack cannot be created

查看:189
本文介绍了无法为堆栈创建新的保护页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用C#应用程序进行开发。

We are using C# Application For Developement.

我们正在使用COM组件在ImageViewer中渲染和显示图像文件。
有时我们会收到奇怪的系统错误,因为无法为堆栈创建新的保护页。
在此错误之后,退出应用程序。

We are using COM component for Rendering and Displaying Image File In ImageViewer. Sometimes we got Weird System Error As 'A new guard page for the stack cannot be created.' After this error Application Get Exited.

有谁知道为什么会出现此错误?由于没有特定的情况可以复制相同的错误。

Is any one have idea why this Error Arise ? As there is no specific case to replicate same error.

谢谢

推荐答案

我有同样的例外,但情况不同。我正在运行Windows服务来执行一些非常繁重的处理(此处没有COM对象)。

I was having the same exception but in a different context. I was running a windows service to do some very heavy processment (no COM objects here).

在我的情况下,我发现代码的内存泄漏产生了错误无法为堆栈创建新的保护页。由于内存不足。

In my case, I found a memory leak in my code that was producing the error "A new guard page for the stack cannot be created." due to out of memory.

我知道您的问题已经有2年历史了。尽管我正在分享此信息,以帮助将来的读者。 VS 2015现在拥有一个不错的工具,可以在调试期间监视内存使用情况。

I know your question is now 2 years old.. Even though I'm sharing this to help any future reader. VS 2015 has now a nice tool to monitor memory usage during the debug.

--------编辑------

-------- Edit ------

对此的另一种常见方案异常由于递归调用而用完了堆栈。

Another common scenario for this exception is running out of stack due a recursive call.

这篇关于无法为堆栈创建新的保护页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆