none
VS2k8SP1 on Vista x64 SP2: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. RRS feed

  • Question

  • All of the sudden I started getting this exception when debugging any LINQ to SQL console application inside Visual Studio 2008 SP1:

    System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
       at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate)

    I'm only able to catch this if I disable the Visual Studio hosting process. Otherwise the application just exists with an error code but no exception is caught. The same thing happens if I try to run the application without debugging.

    It was all running fine the last time I worked on this.

    The only change on the machine was this week's Windows updates and turning UAC back on.

    VS2k8SP1 running on Vista x64 SP2 Enterprise joind to a domain. The domain account I'm using is local admin and I'm running VS as an administrator.


    Paulo Morgado (http://PauloMorgado.NET/)
    Friday, June 12, 2009 4:32 PM

All replies

  • Hi, Paulo

    Have you found the solution yet? I'm also encountering the same problem when I testing my program on Vista SP2(32 bit).  But I run it on XP SP3, it worked fine. In my solution, I realize it in 2-tier structure, one is VC++2005 project - wrapper layer, at this layer, I marshaled many functions developed under the old c++6.0 environment. The other one is the main C# project, and I referenced the wrapper layer DLL files generated at the upper step. The old c++6.0 code mainly deal with the Image Processing affairs, and I use the Multithread technology in my main project(C# project) for a better performance.

    Then I run it on XP, it worked fine. It's a wierd  thing it corrupted under Vista environment. At here, I really hope someone can help me with this troublesome problem. I wonder if it is problem with Operating System, which this work could do on XP, but not Vista? Furthermore, when I debugged it in VS2005 on Vista, it could worked fine, and generated the correct results as the one generated on XP.

    Best regards, my friends.


    Bing Yan, E-mail: bing.yan@fujixerox.co.jp Fuji Xerox Solution Developing Centre, Yokohama, Kanagawa, Japan
    Tuesday, February 15, 2011 1:21 AM
  • I had completly forgoten this.

    I think t was related to hte way Typemock interacted with Visual Studio.


    Paulo Morgado
    Tuesday, February 15, 2011 1:34 AM