Application Crash using WPF RadRichTextBox Q1 Beta

4 posts, 0 answers
  1. Oliver Weichhold
    Oliver Weichhold avatar
    14 posts
    Member since:
    Mar 2006

    Posted 22 Mar 2011 Link to this post

    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;
            }
        }
    }


  2. Mike
    Admin
    Mike avatar
    640 posts

    Posted 23 Mar 2011 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Oliver Weichhold
    Oliver Weichhold avatar
    14 posts
    Member since:
    Mar 2006

    Posted 24 Mar 2011 Link to this post

    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.
  5. Mike
    Admin
    Mike avatar
    640 posts

    Posted 28 Mar 2011 Link to this post

    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
Back to Top