473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

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
Jul 23 '07 #1
6 49868
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" <su**********@nirvana-sol.comwrote in message
news:eD**************@TK2MSFTNGP02.phx.gbl...
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


Jul 23 '07 #2
Hi,

"Sugandh Jain" <su**********@nirvana-sol.comwrote in message
news:eD**************@TK2MSFTNGP02.phx.gbl...
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
Jul 23 '07 #3
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.comwrote in
message news:OZ**************@TK2MSFTNGP05.phx.gbl...
Hi,

"Sugandh Jain" <su**********@nirvana-sol.comwrote in message
news:eD**************@TK2MSFTNGP02.phx.gbl...
>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

Jul 24 '07 #4


"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?
Oct 18 '07 #5
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.comwrote in
message news:OZ**************@TK2MSFTNGP05.phx.gbl...
Hi,

"Sugandh Jain" <su**********@nirvana-sol.comwrote in message
news:eD**************@TK2MSFTNGP02.phx.gbl...
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


Nov 26 '07 #6
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
Dec 10 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: hiralparikh | last post by:
Hi, I am using .NET 2.0 and trying to use a function from a native DLL file. Here is the syntax that I am using: definition: public static extern String getPwd(String strServerName, String...
4
by: Seok Bee | last post by:
Dear Experts, I have created a script to extract the Event Logs from the system into an excel sheet. The logs are separated into 2 worksheets (Application Log and System Log). After this excel...
0
by: Dhruba Bandopadhyay | last post by:
I have a problem. I have a C++ service and added a new API to it. I re-registered the service and re-added the reference in my ASP.NET Visual Web Developer. However when I call the new API I...
3
by: XJ | last post by:
Hi experts, i try to use vb.net 2005 call dll, then give me "Attempted to read or write protected memory.This is often an indication that other memory is corrupt". i have chk some message others...
1
by: ianyian | last post by:
Hi experts, i try to use vb.net 2005 call C++ dll, then give me "Attempted to read or write protected memory.This is often an indication that other memory is corrupt". i have chk some message...
2
by: Ilkka | last post by:
I have created an C++ application with Windows Forms, ADO and SQL server 2005. Now I need to change something and started debugging the code. Then suddenly I receive an error. "An unhandled...
2
by: adypoly | last post by:
Hi guys... I am having a typical problem in using one of the native dll in C# I'll explain what am trying to do, I've a dll written in C language which i am trying to include in my C# project,...
6
by: Scott Gravenhorst | last post by:
Windows XP SP3 My application is set to open a SaveFile dialog when an exit is requested. When I click the app's close button, the save dialog opens, but when I click to change the folder, the...
3
by: sriram347 | last post by:
Hi I am a newbie to ASP.NET. I developed a web page (project type is web application) and I keep getting this error. B]Error message : "System.AccessViolation Exception attempted to read or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.