Silverlight 5 Issues (Q3 SP1)

35 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    37 posts
    Member since:
    Jul 2012

    Posted 21 Dec 2011 Link to this post

    I have been running into various issues using SL5 RTM and the Q3 SP1 Silverlight controls. I am curious if you plan to release Silverlight 5 sources as well?

    My issues:

    1. {System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.} This is a breaking bug because it crashes the silverlight client.

    I cannot tell if this is an issue with telerik controls, sl5 rtm, or a combination. When I switched to SL5 RTM I have this issue with both the SL4 binaries and the SL5 binaries. I did not encounter this problem using SL5 beta w the SL4 binaries.  

    Other people have had a similar issue:
    http://stackoverflow.com/questions/8495242/silverlight-5-accessviolationexception/8512923#8512923
    http://forums.silverlight.net/t/245076.aspx/1?Error+in+project+when+upgrage+from+SL4+to+SL5 

    In our project it is thrown after a SelectedValue binding changes. The error is thrown on line 3047 "this.EditableTextBox.Text = text" in the UpdateEditableTextBox() method of RadComboBox.cs

    I am working on reproducing this in a sample project.


    2. Handling the CellDoubleClickEvent on RadGridView does not work with the SL5 binaries, but it does w SL4 binaries. See the sample code https://docs.google.com/open?id=0Bx6l5GmEYzJJYmJiYWRmYjQtMzliYy00NWU1LTk1YjYtZDg4ZTQ5M2RmMTk4
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 22 Dec 2011 Link to this post

    Hi,

     Straight onto your problems:

    1) I am afraid that I also was unable to reproduce this problem with a simple application, I guess there are other factors that lead to this exception. I would need more detail about your application:
    - the RadComboBox declaration - a code snippet would be best, if you could send the related code-behind it would be also of great help (event handlers, configuration, etc.)
    - the theme used - whether it is a standard Telerik theme or a custom
    - environment - please check again if you are using our SL5 assemblies (the best way is to open the XAP file and check the file versions)
    - the controls around - whether the combobox is put in another control - ChildWindow, RadWindow, Docking, etc.
    - steps to reproduce - does the exception occur when the control is shown for the first time, do you have to click or type inside it in order to throw the exception, etc., whatever could be of help.

    2) You can check this demo for more info about CellDoubleClick. Everything is working normally so far. 

    Regards,
    Valeri Hristov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 22 Dec 2011 Link to this post

    Hi,

     Just a quick update! We've managed to reproduce the double click problem with the grid and we are looking currently what is causing this wrong behavior.

    We will update this thread once we have more info!

    All the best,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 22 Dec 2011 Link to this post

    Hi,

     We were able to fix the cell double click issue for our Silverlight 5 binaries and the fix will be part of our next internal build (next week). 

    All the best,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Tomas
    Tomas avatar
    92 posts
    Member since:
    Jun 2010

    Posted 22 Dec 2011 Link to this post

    Hi,

    I got the same issue with "{System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.}"

    One way to cause this error is to set celledittemplate on a radgridview column that contains a editable radcombobox and also a button that shows a childwindow. Upon closing the childwindow the selecteditem/value is updated with a new value which usually causes this exception.

    I think this is caused by the fact the childwindow is opened the cell goes back into normal state and when the childwindow is closed
    the binding is updated and exception is thrown on the propertychanged event.

    I've submitted a support ticket including an example, the support ticket ID is: 495383

    Tomas

     

     

  7. Jonathan
    Jonathan avatar
    37 posts
    Member since:
    Jul 2012

    Posted 22 Dec 2011 Link to this post

    I'm curious if you we're able to reproduce the issue from Tomas's sample project. I have been having a bit of difficulty trying to reproduce it outside of our main project.
  8. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 23 Dec 2011 Link to this post

    Yes, I was able to reproduce the problem. It looks like a bug in Silverlight, but unfortunately I haven't been able to reproduce it only with standard Silverlight controls. I will continue my research and eventually we will report the problem to Microsoft.

    I found two workarounds for the problem:
    1) Edit in the EditableTemplate template and set Foreground on the PickerTextBox control.
    2) Create a new control deriving from RadComboBox and put the following code inside:
    public class FixedComboBox : RadComboBox
    {
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
            var editableTextBox = (TextBox)this.GetTemplateChild("PART_EditableTextBox");
            if (editableTextBox != null)
            {
                editableTextBox.Foreground = this.Foreground;
            }
        }
    }

    Unfortunately both will break the automatic inheritance of the Foreground property, but at least will not throw exceptions.

    I will write again if I find something better.

    Regards,
    Valeri Hristov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  9. Raffaele
    Raffaele avatar
    14 posts
    Member since:
    Dec 2010

    Posted 05 Jan 2012 Link to this post

    I also have the same issue.
    Can you tell me when will be released a fixed version? I need them asap.
  10. Mike
    Mike avatar
    4 posts
    Member since:
    Mar 2011

    Posted 05 Jan 2012 Link to this post

    We are also having this issue.  Silverlight 5 has been a tough upgrade for us.
  11. Stefan Buys
    Stefan Buys avatar
    22 posts
    Member since:
    Dec 2009

    Posted 10 Jan 2012 Link to this post

    Thanks! This solved my problem as well!
  12. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 11 Jan 2012 Link to this post

    Hi Everyone,

    I think we made some progress today, we did some rearranging in the RadComboBox control template and I believe we successfully workarounded the problem. We are unable to reproduce it with the projects we have so far, and the next internal build on Monday will contain the fix, please check it out and let me know if the exception is still thrown.

    All the best,
    Valeri Hristov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  13. Bryce
    Bryce avatar
    32 posts
    Member since:
    Aug 2010

    Posted 12 Jan 2012 Link to this post

    I am also getting this issue with RadComboBox using Silverlight 5. I am having the same issue as one of the people on stackoverflow from the OP's links: 

    "I'm seeing this exception when databinding to a hidden element. We have some fields that are visible or not based on some databinding, but both of those fields are updated with another databinding. When the RaisePropertyChanged is fired on the hidden field we get the AccessViolationException. I had to add some checks to my code to suppress the RaisePropertyChanged when the control isn't visible. "

    I have a 2 RadComboBoxes binding to the same SelectedItem, and one of them is hidden. This is in a form, and if the user toggles a button, the one that was visibile is now hidden and the hidden one becomes visible. When I click the now visible drop down, I get:

    {System.AccessViolationException: Attempted to read or write protected memory. 
    This is often an indication that other memory is corrupt.}

    Thanks,
    Bryce
  14. Mike
    Mike avatar
    4 posts
    Member since:
    Mar 2011

    Posted 16 Jan 2012 Link to this post

    Was it included in the 1316 release?  I'm still seeing the exceptions in our app.
  15. Anthony
    Anthony avatar
    2 posts
    Member since:
    Apr 2011

    Posted 17 Jan 2012 Link to this post

    This is also causing big problems for us, and additionally we are also seeing the same exception from RadNumericUpDown.

    An AccessViolationException would seem to indicate a SL runtime bug, are Microsoft aware of this issue?
  16. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 18 Jan 2012 Link to this post

    Hello All,

    The best workaround we have found so far is to replace the PickerTextBox control from the RadComboBox control template with a regular TextBox and this is implemented in internal build version 2011.3.1316 (January 16th). If you have a custom control template for RadComboBox I strongly recommend replacing the PickerTextBox with a TextBox and updating the visual states.

    Please, find attached a project that was used to test the exception and let me know if the problem persists on your side. If it does, please send me a project that can be used to observe it and we will do our best to provide a fix as soon as possible. The exception can be observed in both Silverlight 4 and 5 applications.

    RadDateTimePicker and RadNumericUpDown suffer from the same problem and will be updated with the internal build next week.

    @Anthony: Yes, Microsoft is aware of this problem and we are waiting for a final conclusion. I believe there is a bug in the Silverlight runtime, the attached solution has a test with plain Silverlight controls that is also able to reproduce the exception.

    All the best,
    Valeri Hristov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  17. Anthony
    Anthony avatar
    2 posts
    Member since:
    Apr 2011

    Posted 18 Jan 2012 Link to this post

    Thank you for your reply and the example project Valeri. The suggested workaround seems to work for us for the RadComboBox, but obviously we are also concerned that other controls and applications may break as users upgrade to SL5.

    Microsoft have historically been very poor at communicating with developers on this sort of issue (c.f. the SL4 memory leak fiasco), so any additional information that Telerik can pass on would be very much appreciated. Also, please do let us know if there is a corresponding Microsoft connect issue or similar that we can vote or comment on.
  18. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 20 Jan 2012 Link to this post

    Hi Everyone,

    We submitted a bug report to Microsoft, please vote so that it could be fixed as soon as possible:
    https://connect.microsoft.com/VisualStudio/feedback/details/719572

    Regardless of that we will try to provide a fix in our controls too.
    All the best,
    Valeri Hristov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  19. Mike
    Mike avatar
    4 posts
    Member since:
    Mar 2011

    Posted 25 Jan 2012 Link to this post

    Did the RadNumericUpDown fix make it into the 1323 build?  We're still seeing Silverlight crashes.
  20. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 30 Jan 2012 Link to this post

    Hello Mike,

    The fix for RadNumericUpDown didn't make it for the internal build. We made the fix but it will be available for next week's internal build.

    We are sorry for the inconvenience. Let us know if you have further questions.

    Regards,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  21. Josh Eastburn
    Josh Eastburn avatar
    32 posts
    Member since:
    Aug 2012

    Posted 21 Feb 2012 Link to this post

    I am receiving this same error when using the 2012.1.215.1050 RadNumericUpDown control:

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

    Should this have been fixed in Q1 2012 or will I need an internal build to resolve this error?
  22. Mike
    Mike avatar
    4 posts
    Member since:
    Mar 2011

    Posted 21 Feb 2012 Link to this post

    Was this put into the latest release yet?
  23. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 27 Feb 2012 Link to this post

    Hi,

    The fix should be there. We made some tests with the project Valeri send below for both RadComboBox and RadNumericUpDown and with the latest version of the controls (2012.1.215.1050) no error was observed. The fix that changed the element to Textbox instead of PickerTextbox is there (you can see with a tool like silverlight spy).

    The problem might be that this fix does not handle all scenarios. Could you please send me a project that the problem can be seen with the latest binaries.

    All the best,
    Boyan
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  24. Peter
    Peter avatar
    8 posts
    Member since:
    Feb 2011

    Posted 28 Feb 2012 Link to this post

    I am also still receiving the error when using the 2012.1.215.1050 RadNumericUpDown control.
  25. Stephen
    Stephen avatar
    86 posts
    Member since:
    Jan 2011

    Posted 01 Mar 2012 Link to this post

    I am also having the problem with the RadNumericUpDown control.  I'm still on 2011 Q3 SP1, but it doesn't sound like that matters.  It also happens whether I targert Silverlight 4 or 5...simply having Silverlight 5 dev installed seems to break it.

    In my case I kind of know the circumstances that cause it....

    I have a tree control on the left with different types of elements:
    Parent Item
    Child Item
    Parent Item
    Child Item

    When you select a Parent, the right side controls fill with Parent properties, when you select a child, it fills with child properties.
    The Parent and child are completely different objects so the right side has 2 sets of controls in Borders.  When you click on a parent we show the parent border and hide the child border and when you click on a child we show the child border and hide the parent border...one set of controls visible at a time.

    The app starts with a Parent item selected, so the Child border is hidden
    If I then select a Child with a non-zero value being pushed into the UpDown, it crashes.
    If the child has all *zero* values, it does not crash...maybe because the default value is zero and does not trigger a change?

    As an experiment I set it so that the child border is *never* hidden and it does not crash in either the non-zero or zero case.  It has some connection to the visibility state of the control when you set it.

    So, my work-around which is still holding up is to force an update of the Child border before its controls are filled with values:

    ChildBorder.Visibility = Visibility.Visible
    ParentBorder.Visibility = Visibility.Collapsed
     
    ' THIS FIXES IT FOR ME
    ChildBorder.UpdateLayout()
     
    ' Fill Child controls.
    ' ...

     With the explicit UpdateLayout after making the border visible, I no longer have the exception, which lets me continue working.

     
  26. Steve
    Steve avatar
    7 posts
    Member since:
    Sep 2011

    Posted 01 Mar 2012 Link to this post

    We downloaded the  2011.3.1316 internal build and used in our Application,we are not facing the issue.
    We recently upgraded to 2012.1.0215 Telerik controls and this issue is back again.
    Are you guys not carrying the HotFixes to the new releases? 
    Please Help in solving this isssue.



  27. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 02 Mar 2012 Link to this post

    Hi,

    The fix should be there. We are still not able to reproduce the NumericUpDown problem with the latest version of the controls (2012.1.215.1050). I double checked this and the fix that changed the element to Textbox instead of PickerTextbox is there.

    It will be best if someone could send us a sample project where the error can be reproduced with Q1 version of the controls so we can see what is causing the problem. The problem may be in a specific scenario or for a specific theme.

    Regards,
    Boyan
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  28. Patrik
    Patrik avatar
    56 posts
    Member since:
    Jul 2010

    Posted 02 Mar 2012 Link to this post

    I have recently upgraded to Silverlight 5 developer runtime. Still running Silverlight 4 version of Telerik's controls though. I'm getting this error from time to time in the Set-method of RadDateTimePicker.DateTimeText:

    [StyleTypedProperty(Property = "CalendarStyle", StyleTargetType = typeof(RadCalendar))]
    [StyleTypedProperty(Property = "ClockStyle", StyleTargetType = typeof(RadClock))]
    public partial class RadDateTimePicker : Control, IThemable
    {
        // ...
     
        public string DateTimeText
        {
            get { return (string)GetValue(DateTimeTextProperty); }
            set { SetValue(DateTimeTextProperty, value); } // <- Crash here
        }
    }
  29. Stephen
    Stephen avatar
    86 posts
    Member since:
    Jan 2011

    Posted 02 Mar 2012 Link to this post

    I've upgraded to 2012 Q1 and the crash I was getting with the RadNumericUpDown appears to be fixed...but setting some other properties throws a "System.NullReferenceException: Object reference not set to an instance of an object".

    I don't know how to attach the sample app since only images appear to be allowed so here is the XAML and the code:

    MainPage.xaml:
    <UserControl x:Class="SilverlightApplication2.MainPage"
        mc:Ignorable="d"
        d:DesignHeight="300" d:DesignWidth="400" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
     
        <Grid x:Name="LayoutRoot" Background="White">
       <telerik:RadNumericUpDown HorizontalAlignment="Left" Name="RadNumericUpDown1" VerticalAlignment="Top" />
        </Grid>
    </UserControl>


    MainPage.vb: set property on UpDown on page load.  This throws exception every time for me.
    Partial Public Class MainPage
        Inherits UserControl
     
        Public Sub New()
            InitializeComponent()
        End Sub
     
     
        Private Sub MainPage_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
     
            RadNumericUpDown1.NumberFormatInfo.NumberGroupSeparator = ""
     
        End Sub
     
    End Class
  30. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 07 Mar 2012 Link to this post

    Hi,

    @John

    Few releases back we changed the behavior of RadNumericUpDown and now you have to create a new instance of NumberFormatInfo as RadNumericUpDown doesn't have a default one. You have to change your code to:
    RadNumericUpDown1.NumberFormatInfo = New NumberFormatInfo() With {
       .NumberGroupSeparator = ""}

    @Patrik

    Are you using the latest 2012.1.215 version of the controls? You can't attach a project to a forum thread, in order to attach a project you have to open a support thread or a Bug report.

    Greetings,
    Boyan
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  31. Patrik
    Patrik avatar
    56 posts
    Member since:
    Jul 2010

    Posted 12 Mar 2012 Link to this post

    @Boyan

    I'm actually running 2011.1.0411.1040. We haven't actually had any possibilities to update to a newer version because some major bugs were introduced in the summer release. I reinstalled Silverlight Version 4 developer runtime and the error disappeared.

    Best regards,
    Patrik
Back to Top
DevCraft banner