• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

Attempted to read protected memory.

I randomly get the error message below when I attempt to view the contents of a SQL table using Visual Studio 2008 Professional. I am the only one that has access to this database. This error message does not happen every time I view the contents of an SQL table. This error message is not specific to any particular table. It seems like it is a random occurrence.

Does anyone have an idea on what could be causing this? What type of memory is it referring to? Hard drive or Ram? Any information on how to solve this error would be great.



Error.PNG
0
JohnnyBCJ
Asked:
JohnnyBCJ
  • 4
  • 3
1 Solution
 
edbedbCommented:
It refers to the RAM. Try reseating the modules or testing it.
0
 
13598Commented:
Try this:

Tools->Options

Debugging->General

uncheck option "Suppress JIT optimization on module load"

 
0
 
13598Commented:
And you can also try:
With the solution open click on Window and click on Reset Window Layout
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
JohnnyBCJAuthor Commented:
I guess what the biggest problem with this is that it doesn't always happen. Sometimes I can go a week without seeing the problem and other times I see it 5+ times a day. Today was the first time I noticed this problem for a while but I'm so annoyed with this error I want it solved.
edbedb:   It refers to the RAM. Try reseating the modules or testing it.

I will try this later. I found out a program from Microsoft used for testing the ram. For some reason I believe I've already tested out the ram and it came out good.

13598:   Try this:
Tools->Options
Debugging->General
uncheck option "Suppress JIT optimization on module load"


What exactly does this do?  Would this simply avoid the error instead of correcting it?
13598:   And you can also try:
With the solution open click on Window and click on Reset Window Layout


I've done this.
0
 
13598Commented:
It won't avoid the issue. It will correct it by providing memory management by allowing JIT optimization:
Managed code runs in the Common Language Runtime. The runtime offers a wide variety of services to your running code. In the usual course of events, it first loads and verifies the assembly to make sure the IL is okay. Then, just in time, as methods are called, the runtime arranges for them to be compiled to machine code suitable for the machine the assembly is running on, and caches this machine code to be used the next time the method is called. (This is called Just In Time, or JIT compiling, or often just Jitting.)
As the assembly runs, the runtime continues to provide services such as security, memory management, threading, and the like. The application is managed by the runtime.
0
 
JohnnyBCJAuthor Commented:
I haven't had this issue  since I've posted this question. I did not do any troubleshooting steps for this problem besides resetting the windows layout. This is one of those wonderful situations where I can get the error 5 times in one day and not get it again for 2 weeks.

Also note, I do not get this error when I try to compile the program. I get this error when trying to display the values in a SQL table (under Server Explorer). I do not get this error when trying to compile the program.

With that said, I just unchecked "Suppress JIT optimization on module load". I will wait a while to see if I get this error again. If I do, I'll let you know. Thanks again.
0
 
JohnnyBCJAuthor Commented:
I've still had this issue a few times since doing the suggestions proposed by the experts. Any other suggestions?
0
 
JohnnyBCJAuthor Commented:
I've changed computers and haven't had this problem since so I would assume it is some sort of hardware problem. The problem is solved because I will not be using the computer that gave me this problem.
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now