This is a migrated thread and some comments may be shown as answers.

Application Crash using WPF RadRichTextBox Q1 Beta

3 Answers 88 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Oliver Weichhold
Top achievements
Rank 1
Oliver Weichhold asked on 22 Mar 2011, 09:48 AM
The problem boils down to the RadRichTextBox crashing as soon as you try to use an image loaded from an invalid URL. The sample code below should reproduce it. This is quite serious because it takes down the entire application.

MainWindow.xaml:

<Window x:Class="TelerikWPFEditorTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Documents"
Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
    <Grid>
        <Controls:RadRichTextBox Grid.Row="1" x:Name="editor" IsSpellCheckingEnabled="False" BorderThickness="0" />
    </Grid>
</Window>

MainWindow.xaml.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Telerik.Windows.Documents.FormatProviders.Html;


namespace TelerikWPFEditorTest
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
        
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            HtmlFormatProvider provider = new HtmlFormatProvider();
            var doc = provider.Import("<html><body><h1>test</h1><p><img src=\"http://foo.bar.com/332423432.jpg\"</p></body></html");
            editor.Document = doc;
        }
    }
}


3 Answers, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 23 Mar 2011, 05:17 PM
Hi Oliver Weichhold,

Thank you fir this bug report. Fortunately we managed to fix this issue in the official 2011.Q1 version which was rolled out last week. Please download and test with it. Let us know if you experience other problems.

Best wishes,
Mike
the Telerik team
0
Oliver Weichhold
Top achievements
Rank 1
answered on 24 Mar 2011, 11:32 AM
I've tested the same project with what I believe are the very latest assemblies  in 01144RadControls_for_WPF_40_2011_1_0322_TRIAL_hotfix.zip and the problem persists unfortunately.
0
Mike
Telerik team
answered on 28 Mar 2011, 10:06 AM
Hi Oliver Weichhold,

I tested exactly the scenario you specified and all seems to work as expected with 2011.Q1 version:


Can you please verify that you have uninstalled completely the beta version and your application references Q1 assemblies.

All the best,
Mike
the Telerik team
Tags
General Discussions
Asked by
Oliver Weichhold
Top achievements
Rank 1
Answers by
Mike
Telerik team
Oliver Weichhold
Top achievements
Rank 1
Share this question
or