<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Attempted to read or write protected memory.</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Attempted to read or write protected memory.</description>
  <pubDate>Thu, 11 Jun 2026 07:47:33 -700</pubDate>
  <lastBuildDate>Thu, 03 Apr 2008 11:56:49 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=752</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Attempted to read or write protected memory. : All of the tests I&amp;#039;m having...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=752&amp;PID=2777#2777</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=59" rel="nofollow">RJayTaylor</a><br /><strong>Subject:</strong> 752<br /><strong>Posted:</strong> 03-Apr-2008 at 11:56am<br /><br />All of the tests I'm having trouble with are tests on certain methods of my business objects.&nbsp; <br><br>So far the methods that are giving me trouble are business object methods that require another business object as a parameter.&nbsp; The parameter object's properties are then accessed within the method and some action is performed; usually a data query. ( The parameter object's properties being used as arguments for query's clause ). <br><br>For these tests the objects that are being used as parameters are often newly created just before they are being passed into the methods being tested.&nbsp; <br><br>For example I may create a "Product" within the test method to be used while testing the "GetInvoices" method on the "Invoice" business object.&nbsp; The hope being that I get an EntityList of "Invoices" that contain the given "Product".<br><br>This is a high risk test where my error message is concerned.<br><br>I should mention that other methods with similar functionality do not fail, and even the ones that do fail do not fail all the time, although they fail more often than they pass, and it seems to go in sets of may failures followed by a string of successes.<br><br>It's almost like the new business object being used as the parameter is the culprit as no tests that involve simple string and integer parameters ever seem to fail.<br>]]>
   </description>
   <pubDate>Thu, 03 Apr 2008 11:56:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=752&amp;PID=2777#2777</guid>
  </item> 
  <item>
   <title>Attempted to read or write protected memory. : Does it only happen in certain...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=752&amp;PID=2776#2776</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=43" rel="nofollow">pkarsh</a><br /><strong>Subject:</strong> 752<br /><strong>Posted:</strong> 03-Apr-2008 at 11:30am<br /><br />Does it only happen in certain unit tests?  Does it happen frequently or rarely within these tests?  What is the content of these tests?  <br /><br />Back in the old days of C programming a common cause of the equivalent of those sorts of exceptions was uninitialized pointers or uninitialized memory.  If the memory you got happened to be "nulled out" then everything would be fine but if it wasn't, and/or a pointer had a value such that it was pointing to protected memory for some reason, the program would crash with an error that was the equivalent of what you're getting.  <br /><br />C# and VB don't have pointers and the .NET environment handles memory management so these could not be the direct cause, but think about what might be different in different invocations of your code.  For example, is the exception dependent on the data that is being worked on?  Take a look and see if you are dealing with values of null somewhere in your data and see if you are handling that properly.  We had a bug at one point where under a certain set of unexpected circumstances an exception would be thrown when an attempt was made to read a table that had no data in it.<br /><br />Hope this helps.<br />]]>
   </description>
   <pubDate>Thu, 03 Apr 2008 11:30:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=752&amp;PID=2776#2776</guid>
  </item> 
  <item>
   <title>Attempted to read or write protected memory. : I get the following error message...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=752&amp;PID=2775#2775</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=59" rel="nofollow">RJayTaylor</a><br /><strong>Subject:</strong> 752<br /><strong>Posted:</strong> 03-Apr-2008 at 11:10am<br /><br />I get the following error message while running certain unit tests, but the frustrating thing is that the error doesn't always occur which is making it extremely difficult to debug.&nbsp; <br><br>The error:<br><br><b>IdeaBlade.Persistence.PersistenceServerException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. ---&gt;&nbsp; System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt..<br></b><br>This error will also occur while the project, which is a web project, is running in a browser, but again it only happens sometimes, and I can't seem to figure out what the occurances have in common.<br><br>The project is an ASP.NET web app being developed in VS2008.<br><br>Any insight appreciated.<br><br>]]>
   </description>
   <pubDate>Thu, 03 Apr 2008 11:10:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=752&amp;PID=2775#2775</guid>
  </item> 
 </channel>
</rss>