PC Review


Reply
Thread Tools Rate Thread

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

 
 
Sugandh Jain
Guest
Posts: n/a
 
      23rd Jul 2007
Hi,
I am getting the error message
Attempted to read or write protected memory. This is often an indication
that other memory is corrupt.
It was not coming until yet, for around 2 months. Now, may be the records
have increased and so i am getting this.

anyone has any idea why and when do we get this.

Its a windows based application with c# 2.0 and .Net Framework 2.0.

Regards,
Sugandh Jain


 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      23rd Jul 2007
Are you using any Interop in the application?

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Sugandh Jain" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> I am getting the error message
> Attempted to read or write protected memory. This is often an indication
> that other memory is corrupt.
> It was not coming until yet, for around 2 months. Now, may be the records
> have increased and so i am getting this.
>
> anyone has any idea why and when do we get this.
>
> Its a windows based application with c# 2.0 and .Net Framework 2.0.
>
> Regards,
> Sugandh Jain
>
>



 
Reply With Quote
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      23rd Jul 2007
Hi,

"Sugandh Jain" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> I am getting the error message
> Attempted to read or write protected memory. This is often an indication
> that other memory is corrupt.


What other memory?

You need to provide more details about your app


 
Reply With Quote
 
Sugandh Jain
Guest
Posts: n/a
 
      24th Jul 2007
Hi,

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


This whole sentence is the part of error message. even I am wondering what
other memory it is talking about.

It is a Windows Based application and I am getting it in the getter of self
defined Indexer for a collection class..
code for the indexer is as follows:

public Position this[Guid positionIdToFind]
{
get
{
Position foundPosition = null;

foreach (Position position in this)
{
if (position.ID.Equals(positionIdToFind))
{
foundPosition = position;
break;
}
}

return foundPosition;

}
set
{
for (int i = 0; i < this.Count; i++)
{
if (this[i].ID.Equals(positionIdToFind))
{
this[i] = value;
break;
}
}
}
}

Is there somethingwrong with this indexer?



Regards,

Sugandh









"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.com> wrote in
message news:(E-Mail Removed)...
> Hi,
>
> "Sugandh Jain" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi,
>> I am getting the error message
>> Attempted to read or write protected memory. This is often an indication
>> that other memory is corrupt.

>
> What other memory?
>
> You need to provide more details about your app
>



 
Reply With Quote
 
=?Utf-8?B?R2hhbGxhcw==?=
Guest
Posts: n/a
 
      18th Oct 2007


"Kevin Spencer" wrote:

> Are you using any Interop in the application?
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
>
> Printing Components, Email Components,
> FTP Client Classes, Enhanced Data Controls, much more.
> DSI PrintManager, Miradyne Component Libraries:
> http://www.miradyne.net
>

I am getting the same error in a VS.NET 2005 application working with
Oracle9i Client 9.2.0.1.0.

The error occurs when I call an "oracleConnection.Open()". The application
hangs, and debugging got me this error message.

By the way, I AM using Interop.PCMCOMLib.

I've been chasing this error for some time now and you mentioning Interop
gave me some hope you might know something that could help me.

The message only appears on a couple of PCs, and is working fine for the
others.

So, any ideas?
 
Reply With Quote
 
Alx
Guest
Posts: n/a
 
      26th Nov 2007
Hi,

This is the scene:

I have a dll which processes a text file input of data. The data referenced
in the Text file is extracted from the Db and loaded into datasets, where it
worked on, then when completed, uploaded back into the Db.

Here's the issue:
When processing small files, everything is cool. But when doing a 10k or
more line file, I get the same error message as described in this thread.

Now, I do use a unmanaged dll written in Deplhi, but if that is the problem,
why is all smooth when processing small (3k lines) files.

Hope you can help!

"Sugandh Jain" wrote:

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

>
> This whole sentence is the part of error message. even I am wondering what
> other memory it is talking about.
>
> It is a Windows Based application and I am getting it in the getter of self
> defined Indexer for a collection class..
> code for the indexer is as follows:
>
> public Position this[Guid positionIdToFind]
> {
> get
> {
> Position foundPosition = null;
>
> foreach (Position position in this)
> {
> if (position.ID.Equals(positionIdToFind))
> {
> foundPosition = position;
> break;
> }
> }
>
> return foundPosition;
>
> }
> set
> {
> for (int i = 0; i < this.Count; i++)
> {
> if (this[i].ID.Equals(positionIdToFind))
> {
> this[i] = value;
> break;
> }
> }
> }
> }
>
> Is there somethingwrong with this indexer?
>
>
>
> Regards,
>
> Sugandh
>
>
>
>
>
>
>
>
>
> "Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.com> wrote in
> message news:(E-Mail Removed)...
> > Hi,
> >
> > "Sugandh Jain" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Hi,
> >> I am getting the error message
> >> Attempted to read or write protected memory. This is often an indication
> >> that other memory is corrupt.

> >
> > What other memory?
> >
> > You need to provide more details about your app
> >

>
>
>

 
Reply With Quote
 
Patrick
Guest
Posts: n/a
 
      10th Dec 2007
Im getting the exact same error message in a small winform application that I
converted from 1.1 to 2.0. The error occurs only on some of the PCs in which
the application is installed on. The error occurs specificaly in the
InitializeComponent method when setting the properties of a tab control.
What makes this really strange is that when I remote desktop connect to the
pc, the application will work correctly but when I login at the desktop it
will not work.

Below is a code snipet from the InitializeComponent() method where the code
crashes:

this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom;
this.tabControl1.AllowDrop = true;
this.tabControl1.Controls.Add(this.tabProduction);
this.tabControl1.Controls.Add(this.tabProdSupp);
this.tabControl1.Controls.Add(this.tabOther);
this.tabControl1.Controls.Add(this.tabDevelopment);
this.tabControl1.Controls.Add(this.tabTest);
this.tabControl1.Controls.Add(this.tabUA);
this.tabControl1.Location = new System.Drawing.Point(15, 12);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(295, 285);
this.tabControl1.TabIndex = 0;


Thanks,

Patrick
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Attempted to read or write protected memory. This is often an indication that other memory is corrupt www.gusse.net Microsoft Dot NET Framework 10 7th Sep 2009 07:06 PM
How can i handle "attempted to read or write protected memory. this is often an indication that other memory is corrupt" Mike Microsoft C# .NET 0 13th Nov 2007 10:14 AM
Attempted to read or write protected memory. This is often an indication that other memory is corrup Sanjeev Rane Microsoft VB .NET 0 12th Dec 2006 10:06 AM
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Dhruba Bandopadhyay Microsoft ASP .NET 0 12th May 2006 02:24 PM
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt" humbleaptience Microsoft ASP .NET 0 22nd Feb 2006 06:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:33 PM.