eek:尝试读取或写入受保护的内存.... [英] eek: Attempted to read or write protected memory....

查看:77
本文介绍了eek:尝试读取或写入受保护的内存....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的 - C#承包商在第一份合同中得到这个坏男孩:


尝试读取或写入受保护的内存。这通常是一个

表示其他内存已损坏。


我在

在Windows Server 2003 EE上运行的ASP.NET 2.0应用程序。


每次我都会在代码中的不同位置发生这种情况。 b $ b看到了它。


我认为在调试和发布配置中都会发生这种情况。


该应用程序相对较大,将会是很难修剪得更接近这个问题。


一旦抛出异常,那么所有应用程序都会在那个

流程


有什么建议吗? - 也许有人可以提出一种方法来接近问题(我可以抓住异常)。


我怀疑它*可能*与事实上我们正在使用Microsoft

XML,v4.0(MSXML2) - 任何人对此都有任何意见吗?


绝望,

Oli。

解决方案



< sp ****** *******@yahoo.com写信息

新闻:11 ********************* @ e3g2000cwe.googlegrou ps .com ...

|好的 - C#承包商在第一份合同中得到这个坏男孩:

|

| 尝试读取或写入受保护的内存。这通常是

|表示其他内存已损坏。

|

|我在

|中间歇地(可能每100个请求左右)看到这个在Windows Server 2003 EE上运行的ASP.NET 2.0应用程序。

|

|每当我有
|时,它似乎出现在代码中的不同位置看到了。

|

|它发生在我认为的Debug和Release配置中。

|

|该应用程序相对较大,并且难以修剪以获得

|更接近问题。

|

|一旦异常被抛出一次,那么所有的应用程序都在那个

|

|有什么建议? - 也许有人可以建议一种接近的方式

|问题(我可以抓住例外)。

|

|我怀疑它*可能*与我们正在使用Microsoft

|这一事实有关XML,v4.0(MSXML2) - 有人对此有任何意见吗?

|

|你的绝望,

| Oli。

|

http://support.microsoft.com:80/kb/815112


Willy。


Not确定它是否是问题的原因但在.NET 2中你应该使用

System.XML命名空间类进行XML操作。

这是一个访问冲突,它是由

框架中的无效指针引起的(不是必需的null但设置到错误的位置)。你在你的应用程序中使用任何

不安全的代码,或者将ref参数传入/传出任何非托管的

组件或库吗?

Ciaran O' 'Donnell


" sp ************* @ yahoo.com"写道:


ok - C#承包商在第一份合同中得到这个坏男孩:


尝试读写保护记忆。这通常是一个

表示其他内存已损坏。


我在

在Windows Server 2003 EE上运行的ASP.NET 2.0应用程序。


每次我都会在代码中的不同位置发生这种情况。 b $ b看到了它。


我认为在调试和发布配置中都会发生这种情况。


该应用程序相对较大,将会是很难修剪得更接近这个问题。


一旦抛出异常,那么所有应用程序都会在那个

流程


有什么建议吗? - 也许有人可以提出一种方法来接近问题(我可以抓住异常)。


我怀疑它*可能*与事实上我们正在使用Microsoft

XML,v4.0(MSXML2) - 任何人对此都有任何意见吗?


绝望,

Oli。




Ciaran O''''Donnell写道:


不确定是否是问题的原因但在.NET 2中你应该使用

System.XML命名空间类进行XML操作。



是的 - 我知道这一点 - 但是在客户端网站上,不幸的是,这对我来说并不是很好。


这是一个访问冲突,它是由

框架中的无效指针引起的(不是必须为null,而是设置为错误的位置)。您是否在应用程序中使用任何

不安全代码或将ref参数传入/传出任何非托管的

组件或库?



no - 没有不安全的代码 - 好 - 非显式 - 但我认为所有

MSXML2的东西都是不安全的。 ..


....任何人都知道我怎么能缩小这个问题呢?


Oli。


ok - C# contractor on first contract getting this bad boy:

"Attempted to read or write protected memory. This is often an
indication that other memory is corrupt."

I see this intermittantly (maybe every 100 requests or so) in an
ASP.NET 2.0 application running on Windows Server 2003 EE.

It appears to occur at different locations in the code every time I''ve
seen it.

It happens in both Debug and Release configurations I think.

The app is relatively large, and will be tough to prune down to get
closer to the problem.

Once the exception has been thrown once then all applications in that
process

Any suggestions? - maybe someone can suggest a way of getting closer to
the problem (I can catch the Exception).

I suspect it *could* be related to the fact that we''re using Microsoft
XML, v4.0 (MSXML2) - anyone have any comments on that?

yours desperately,
Oli.

解决方案


<sp*************@yahoo.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
| ok - C# contractor on first contract getting this bad boy:
|
| "Attempted to read or write protected memory. This is often an
| indication that other memory is corrupt."
|
| I see this intermittantly (maybe every 100 requests or so) in an
| ASP.NET 2.0 application running on Windows Server 2003 EE.
|
| It appears to occur at different locations in the code every time I''ve
| seen it.
|
| It happens in both Debug and Release configurations I think.
|
| The app is relatively large, and will be tough to prune down to get
| closer to the problem.
|
| Once the exception has been thrown once then all applications in that
| process
|
| Any suggestions? - maybe someone can suggest a way of getting closer to
| the problem (I can catch the Exception).
|
| I suspect it *could* be related to the fact that we''re using Microsoft
| XML, v4.0 (MSXML2) - anyone have any comments on that?
|
| yours desperately,
| Oli.
|

http://support.microsoft.com:80/kb/815112

Willy.


Not sure if its the cause for the issue but in .NET 2 you should be using the
System.XML namespace classes for XML manipulation.
The is an Access Violation which is caused by an invalid pointer in the
framework (not necesarily null but set to the wrong place). Are you using any
unsafe code in you app or passing ref arguments into/out of any unmanaged
components or libraries?
Ciaran O''Donnell

"sp*************@yahoo.com" wrote:

ok - C# contractor on first contract getting this bad boy:

"Attempted to read or write protected memory. This is often an
indication that other memory is corrupt."

I see this intermittantly (maybe every 100 requests or so) in an
ASP.NET 2.0 application running on Windows Server 2003 EE.

It appears to occur at different locations in the code every time I''ve
seen it.

It happens in both Debug and Release configurations I think.

The app is relatively large, and will be tough to prune down to get
closer to the problem.

Once the exception has been thrown once then all applications in that
process

Any suggestions? - maybe someone can suggest a way of getting closer to
the problem (I can catch the Exception).

I suspect it *could* be related to the fact that we''re using Microsoft
XML, v4.0 (MSXML2) - anyone have any comments on that?

yours desperately,
Oli.



Ciaran O''''Donnell wrote:

Not sure if its the cause for the issue but in .NET 2 you should be using the
System.XML namespace classes for XML manipulation.

yes - I''m aware of that - but at the client site that doesn''t help me
much unfortunately.

The is an Access Violation which is caused by an invalid pointer in the
framework (not necesarily null but set to the wrong place). Are you using any
unsafe code in you app or passing ref arguments into/out of any unmanaged
components or libraries?

no - no unsafe code - well - non explicitly anyway - but I assume all
the MSXML2 stuff is unsafe under the hood....

....anyone got any idea how i can narrow down the problem at all ?

Oli.


这篇关于eek:尝试读取或写入受保护的内存....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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