Instruction referenced memory at 0x00000050 error

  • Thread starter Thread starter Art Krumsee
  • Start date Start date
A

Art Krumsee

I have a series of console application developed in vb.net with Visual
Studio 2002. They works perfectly on my development workstation and our
production server. Now I've installed these applications on a new server and
it *intermittently* throws the error:

The instruction at 0x791cfea1 referenced memory at "0x00000050". The
memory could not be "read".

The first address varies but the 0x00000050 is always the same. The error I
see pops up immediately when I start the application, and my testing shows
that it occurs before any code executes within my application. And as I
mentioned, the error is intermittent. It probably occurs in 1 run out of
every 5.

In testing I created a test version of one of my apps and started stripping
out parts of my code hoping to find the source of this error. Eventually I
got to the point where there was literally nothing left in the application.
Absolutely nothing. It has no added references and no code within the sub
main. I'm still getting this error.

The problem must be related in some way to the environment under which my
vb.net app is running on that new server. I did see something like this
once before and resolved it by reinstalling the 1.1 framework. This time
I've tried reinstalling, repairing and finally uninstalling/reinstalling the
framework with reboots between. None of that stopped the problem.

One other potentially pertinent fact. As mentioned above, I developed this
in Visual Studio 2002. My development workstation also has the 1.1 framework
installed but I noticed yesterday that when I add references to system DLLs
(system.data, system.data.xml, system.io, etc.) their version numbers begins
1.0.... Is this as it should be and if not, could this be the source of
this problem?

Thanks

Art
 
Hi,

It's hard to say with certainty. However, at this point one might think
that it actually is a hardware problem. When I experienced a similar (not
the same) problem a few weeks ago, I defragmented the drive. The error went
away. I speculate that virtual memory, which a .NET app may cause to be
used extensively, was encountering a disk error. Naturally, if it is a
physical memory problem, then the only solution would be to replace the
associated memory module.

Defrag maps out defective areas on the disk.

Of course, there may be some other culprit, too. However, this seems to be
a possibility to me.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 
I have a series of console application developed in vb.net with Visual
Studio 2002. They works perfectly on my development workstation and our
production server. Now I've installed these applications on a new server and
it *intermittently* throws the error:

The instruction at 0x791cfea1 referenced memory at "0x00000050". The
memory could not be "read".

The first address varies but the 0x00000050 is always the same. The error I
see pops up immediately when I start the application, and my testing shows
that it occurs before any code executes within my application. And as I
mentioned, the error is intermittent. It probably occurs in 1 run out of
every 5.

Your setup sounds almost identical to mine, as does your problem. I
have a VB.NET 2003 app that works fine in development and in my
production environment but fails in my new test environment. My
application is a console application and it is running on a
dual-processor Intel machine with 2GB RAM running W2K Server SP4. The
console app is executed by a Microsoft Windows Script, which is kicked
off by the W2K scheduler. I am getting the same error you are getting
and I am also getting it intermittently. When this error occurs my
application gives a return code of –1073741819.

I also believe my error is occurring before the first line of code in
my console application. The first few lines of my application are:

Function main() As Integer
Dim sCommandLineArgs() As String
Try
Console.WriteLine("Initializing. . .")
. . .
Catch ex as Exception
Console.WriteLine("ERROR IN MAIN()")
End Try
. . .
End Function

I don't see ANY output to the console from the application when this
error occurs.
One other potentially pertinent fact. As mentioned above, I developed this
in Visual Studio 2002. My development workstation also has the 1.1 framework

My application is developed in VB.NET 2003 version 7.1.3088 with
version 1.1.4322 of the framework but I also have version 1.0 of the
..NET framework installed on my development workstation (not on my test
machine or in production).

Microsoft Knowledge Base article 832597 seems to address this problem
but we obtained and installed the patch that Microsoft says will fix
the problem on our test server and we continue to experience the
error.

I've noticed other posts that seem to mention vaguely similar problems
but have no resolution posted. I want to mention one of them here in
case it is related and sparks thoughts for anyone.

An article posted to the microsoft.public.dotnet.framework newsgroup
by gregory may on 2004-01-09 titled ‘How to trouble shoot a
"Application Exception"?'.

I would be interested in hearing from anyone with similar problems or
anyone with suggestions for troubleshooting an error that occurs
before the first line of executable code.

Thank you for your help.
 
Back
Top