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

  • Question

  •  In My SilverlightApplication This error is Occour

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

    How i will Resolve this error

    Thanks

    Tuesday, April 27, 2010 2:35 AM

Answers

  • I am getting the same thing... and here are my details:

    The error is an Internet Explorer error which triggers a restart of the IE tab or window that reloads the url.

    The error only started when I updated my runtime to version 4. The silverlight application has not been modified or touched since it was created using VS 2008 as a version 3 application.

    What I mean by random is... the error does seem to generate when the SL app is executing a webservice call...however, the app has a treeview where selecting a treeview node is the event that executes a webservice method. I can select different nodes for 15 minutes one time with no error.. and another time the error may accur within a few selections..

    Its pretty darn random as to when the next treeview node selection will cause the crash...

     Again... using a different client (computer) that has SL version 3 runtime... does not have this behavior.

    Tuesday, April 27, 2010 2:20 PM
  • hey

     i resolve this problem after re installation of all silverlight setup.

    Wednesday, April 28, 2010 5:48 AM

All replies

  • Hard to say without knowing some specifics.  What version of silverlight is the app?  What version of visual studio are you using?  When do you get this error ? (by that I mean when you are compiling, or pressing a button, etc) If it happens when running some code post the code with the problem

    Tuesday, April 27, 2010 6:14 AM
  • I am getting the same thing... and here are my details:

    The error is an Internet Explorer error which triggers a restart of the IE tab or window that reloads the url.

    The error only started when I updated my runtime to version 4. The silverlight application has not been modified or touched since it was created using VS 2008 as a version 3 application.

    What I mean by random is... the error does seem to generate when the SL app is executing a webservice call...however, the app has a treeview where selecting a treeview node is the event that executes a webservice method. I can select different nodes for 15 minutes one time with no error.. and another time the error may accur within a few selections..

    Its pretty darn random as to when the next treeview node selection will cause the crash...

     Again... using a different client (computer) that has SL version 3 runtime... does not have this behavior.

    Tuesday, April 27, 2010 2:20 PM
  • hey

     i resolve this problem after re installation of all silverlight setup.

    Wednesday, April 28, 2010 5:48 AM
  • I got the same exception but only on 64 bit platform. here is my experience... http://archistance.blogspot.com/2010/05/exception-attempted-to-read-or-write.html
    Wednesday, May 5, 2010 5:13 PM
  • I was also seeing this exception.  It was being caused by a malformed comment in XAML.  The comment was missing the opening left bracket.

    !-- some comment -->

    Adding the left bracket made the error go away.  I could repro the exception every time by removing the left bracket.

    That's a pretty scary error for a bad comment (at least in my case).

    Wednesday, June 30, 2010 12:05 PM
  • For me the fix was adding missing Silverlight Dlls that PollingDuplexHttpBinding was dependent on. I had to register System.ServiceModel.Web.Extensions , System.ServiceModel.Syndication, and System.ServiceModel.PollingDuplex into the GAC along with adding the refs into the project. I also had to add System.ServiceModel.PollingDuplex to the GAC for the service side of .NET 4.0 also. This is all done under c:\Programfiles x86\Microsoft SDK's\Silverlight\Libraries\

    Look into \Server and \Client

    Saturday, November 6, 2010 1:58 PM
  • I'll chime in again with malformed xaml as my cause. In my case it was:

    <ListBoxItem x:Name="TemplateListBoxItem">

    HorizontalAlignment="Stretch" 

    Width="Auto"

    Height="75"

    Style="{StaticResource ListBoxItemStyleLarge}">

    <StackPanel Margin="0,0,10,0" Orientation="Horizontal" VerticalAlignment="Center" Height="60" >

    <local:UserImage></local:UserImage>

    <TextBlock Text="User" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0" />

    </StackPanel>

    </ListBoxItem>

    </ListBox>

    <ListBoxItem x:Name="TemplateListBoxItem">
    HorizontalAlignment="Stretch" 
    Width="Auto"
    Height="75"
    Style="{StaticResource ListBoxItemStyleLarge}">
    <StackPanel Margin="0,0,10,0" Orientation="Horizontal" VerticalAlignment="Center" Height="60" >
    <local:UserImage></local:UserImage>
                 <TextBlock Text="User" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0" />
    </StackPanel>
    </ListBoxItem>
    </ListBox>


    Tuesday, March 15, 2011 11:44 AM
  • I just had this, malformed xaml as well.

    I had a binding with an empty converter "{Binding Converter={StaticResource }}"

    Thursday, April 21, 2011 10:03 PM
  • Exactly same thing as jperl. What a nice exception!


    Type the name of a command and press enter to execute it, or help for assistance.

    Thursday, August 11, 2011 6:29 AM