Silverlight RadWindow gives Aw, Snap! error in Chrome 24.0.1312.52 m

5 posts, 1 answers
  1. Nilesh
    Nilesh avatar
    3 posts
    Member since:
    Jan 2013

    Posted 17 Jan 2013 Link to this post

    Hi Team,
        
        I am using Telerik control for the past 4 years for silverlight. But today I am facing an issue using RadWindow in chrome lastest version.
    I had a popup for which I am using Telerik RadWindow and in the Content I am passing RadHtmlPlaceholder object.
    Case 1: If the RadHtmlPlaceholder contains a plain html page then it works fine.

    Case 2: If an Silverlight Page is included in RadHtmlPlaceholder it loads properly first time, but when I click for the second or third time then the Chrome browser crashes

    I am working with 
    Silverlight Version : 5
    Telerik                  :  2011.3.1220.1040
    Operating System : Windows 7

    Sample Link:  https://www.dropbox.com/s/2rvxoryq4b5fbpi/TelerikRadHTMLControlSample.zip

    MainPage.XAML.cs

    public partial class MainPage : UserControl
        {
            RadHtmlPlaceholder radHtmlPH;
            public MainPage()
            {

                InitializeComponent();
                radHtmlPH = null;
                radHtmlPH = new Telerik.Windows.Controls.RadHtmlPlaceholder();
                radHtmlPH.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                radHtmlPH.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;

                // this will work fine
                //radHtmlPH.SourceUrl = new Uri("http://www.telerik.com/support.aspx");  

                // This link crashes second time
                radHtmlPH.SourceUrl = new Uri("http://www.wynapse.com/Silverlight/Telerik/PersistenceFrameworkDataToAString.aspx");

            }
            RadWindow radWinNormal;
            private void Button_Click(object sender, RoutedEventArgs e)
            {

                if (radWinNormal != null)
                    radWinNormal.Content = null;
                radWinNormal = new RadWindow();
                radWinNormal.Width = 500;
                radWinNormal.Height = 500;
                radWinNormal.Content = radHtmlPH;
                radWinNormal.ShowDialog();
                //PlaceHolder.Children.Add(radHtmlPH);
            }
        }

    MainPage.XAML
    <Grid x:Name="LayoutRoot" Background="White">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Button Content="Place Holder" Click="Button_Click"></Button>
             
        </Grid>

    Error found while debugging

    Unhandled exception at 0x0249f8cf in chrome.exe: 0xC0000005: Access violation writing location 0x00000039

    {System.InvalidOperationException: SetProperty failed.
       at System.Windows.Browser.ScriptObject.SetProperty(String name, Object value)
       at Telerik.Windows.Controls.RadHtmlPlaceholder.UpdateContent()
       at Telerik.Windows.Controls.RadHtmlPlaceholder.OnSourceUrlChanged()
       at Telerik.Windows.Controls.RadHtmlPlaceholder.OnSourceUrlPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
       at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, 

    ValueOperation operation)
       at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Telerik.Windows.Controls.RadHtmlPlaceholder.set_SourceUrl(Uri value)
       at MedTegra.Views.Shared.ucHtmlPlaceHolderReport.radHtmlPH_Loaded(Object sender, RoutedEventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 

    flags)}

    Please revert back urgently, as our product is live and we are facing problems due to this.

    Regards,
    Nilesh Anchan
  2. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 22 Jan 2013 Link to this post

    Hi Nilesh,

    Thank you for sending the sample solution and a detailed explanation of the issue. However, when working with the RadHtmlPlaceholder you need to have in mind that the control displays external pages in an IFrame object that is placed on top of the SIlverlight plug-in in the page hosting the Silverlight application.

    This means that the RadHtmlPlaceholder has limited control over the way the web pages are rendered as the IFrame controls that. And in your case, it seems that a script in the http://www.wynapse.com/Silverlight/Telerik/PersistenceFrameworkDataToAString.aspx page is breaking the IFrame control and it can't always display properly the page thus causing the exception.

    But as it seems that this issue only arises on a reload of the web page, you can set the RadHtmlPlaceholder.KeepContentInMemory property to True to make the RadHtmlPlaceholder save the page locally. This way you won't have to reload it every time the window is opened.

    I hope this suggestion will help you get over the issue.

    All the best,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Nilesh
    Nilesh avatar
    3 posts
    Member since:
    Jan 2013

    Posted 22 Jan 2013 Link to this post

    Hi Tina Stancheva,

       Thanks for your solution this works perfectly fine when the Content page is always the same. This was just a sample I provided but in my real project I am using the same instance of  to load different pages. so in that case I can't us KeepContentInMemory
    I need to reload the page everytime.

       Do you have any good solution for such cases.

    Regards,
    Nilesh Anchan
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 22 Jan 2013 Link to this post

    Hi Nilesh,

    Unfortunately if the issues in your real solution are also related to the IFrame rendering of a web page, we can't suggest other solutions. If the IFrame object can't properly display/load a page, the RadHtmlPlaceholder won't display it as well.

    Regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Nilesh
    Nilesh avatar
    3 posts
    Member since:
    Jan 2013

    Posted 22 Jan 2013 Link to this post

     Hi Tina,  
                  OK only one thing is that it works fine with other browser then why not in Chrome.Thanks a lot for your valuable time. Also please suggest if you some solution for the same.

    Regards,
    Nilesh Anchan 
     
Back to Top
DevCraft banner