Unknown bug

Thread is closed for posting
4 posts, 0 answers
  1. Efthymios
    Efthymios avatar
    17 posts
    Member since:
    Apr 2012

    Posted 24 Apr 2013 Link to this post

    Hello, I have an application in which I receive continuously bug reports from my users which I can not find since they seem to be located inside the Telerik components. I can not even reproduce them on my dev machine in order to fix them. I copy-paste the bug report here:

    [ExceptionMessage]:[The parameter is incorrect. ]
       at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
       at MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection`1 collection, CValue value)
       at MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection`1 collection, DependencyObject value)
       at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject value)
       at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value)
       at Telerik.Windows.Controls.RadWindow.AddCanvas(Panel parent)
       at Telerik.Windows.Controls.RadModalWindow.AddCanvas(Panel parent)
       at Telerik.Windows.Controls.RadWindow.OpenCore(Panel ancestor)
       at Telerik.Windows.Controls.RadWindow.Open()
       at Telerik.Windows.Controls.RadWindow.SyncOpenState()
       at Telerik.Windows.Controls.RadWindow.OnIsOpenChanged(Boolean newValue, Boolean oldValue)
       at Telerik.Windows.Controls.RadWindow.OnIsOpenChanged(Object sender, DependencyPropertyChangedEventArgs args)
       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)
       at Telerik.Windows.Controls.RadWindow.set_IsOpen(Boolean value)
       at Pedometer.MainPage.SaveButton_Click(Object sender, EventArgs e)
       at Microsoft.Phone.Shell.ApplicationBarItemContainer.FireEventHandler(EventHandler handler, Object sender, EventArgs args)
       at Microsoft.Phone.Shell.ApplicationBarIconButton.ClickEvent()
       at Microsoft.Phone.Shell.ApplicationBarIconButtonContainer.ClickEvent()
       at Microsoft.Phone.Shell.ApplicationBar.OnCommand(UInt32 idCommand)
       at Microsoft.Phone.Shell.Interop.NativeCallbackInteropWrapper.OnCommand(UInt32 idCommand)
    [OccurrenceDate]:[Tue, 23 Apr 2013 00:36:02 GMT]
    [AppInstallDate]:[Mon, 22 Apr 2013 03:18:56 GMT]
    [AppPreviousRunDate]:[Mon, 22 Apr 2013 03:18:56 GMT]
    [AppVersion]:[ free]
    [DeviceModel]:[Radar 4G]
    [OSVersion]:[Microsoft Windows CE 7.10.8107]

    As you can see above, the bug is located on:
       at Telerik.Windows.Controls.RadWindow.set_IsOpen(Boolean value)
       at Pedometer.MainPage.SaveButton_Click(Object sender, EventArgs e)

    Following is that part of code (observe that the error is happening in the renameDlg.window.IsOpen = truecommand).
    private void SaveButton_Click(object sender, EventArgs e)
                if (bCancelBackButton)
                bCancelBackButton = true;
                blah... blah... blah... code...
                renameDlg = new RenameDialog();
                renameDlg.window.IsOpen = true;
                renameDlg.CaptionTextBlock.Text = "Save course";
                renameDlg.window.WindowClosed += new EventHandler<WindowClosedEventArgs>(renameWindow_WindowClosed);

    I also give you the XAML of the RenameDialog class:
    <UserControl x:Class="Pedometer.RenameDialog"
        FontFamily="{StaticResource PhoneFontFamilyNormal}"
        FontSize="{StaticResource PhoneFontSizeNormal}"
        Foreground="{StaticResource PhoneForegroundBrush}" Height="345" Width="337">
        <Grid x:Name="LayoutRoot" Height="346" Width="336">
            <telerikPrimitives:RadModalWindow x:Name="window"
                    <telerikCore:RadPlaneProjectionAnimation CenterY="0.5" CenterX="0" StartAngleX="-90" EndAngleX="0" Axes="X">
                            <CubicEase EasingMode="EaseOut"/>
                    BorderThickness="{StaticResource PhoneBorderThickness}" HorizontalAlignment="Left" VerticalAlignment="Top" BorderBrush="#BFFF0000">
                    <Grid Background="#FFC24A4A">
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        <StackPanel Grid.ColumnSpan="2" Background="Red">
                            <TextBlock x:Name="CaptionTextBlock"
                                TextWrapping="Wrap" Text="Rename course" Margin="8,0,0,0" Foreground="White"/>
                        <TextBlock x:Name="DescrTextBlock"
                            VerticalAlignment="Top" Text="Please enter a short description for your course:" Margin="8,0" Foreground="#FFFFF1F1"/>
                        <TextBox x:Name="DescrTextBox"
                            VerticalAlignment="Center" Background="#FFFFF1F1" Foreground="Black" SelectionBackground="#FF00ACFF" BorderBrush="#BFE02525" SelectionForeground="White" CaretBrush="#FF353535"
                        <Button x:Name="OKButton" Grid.Row="3" Grid.Column="0" Content="ok" Click="OKButton_Click" BorderBrush="#FFFF4F4F" Foreground="#FFFFADAD"/>
                        <Button x:Name="CancelButton" Grid.Row="3" Grid.Column="1" Content="cancel" Click="CancelButton_Click" BorderBrush="#FFFF4F4F" Foreground="#FFFFADAD"/>

    ...plus the .cs file of it:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;
    namespace Pedometer
        public partial class RenameDialog : UserControl
            public Boolean bOKPressed = false;
            public RenameDialog()
                window.WindowSize = new Size(
            private void OKButton_Click(object sender, RoutedEventArgs e)
                bOKPressed = true;
                this.window.IsOpen = false;
            private void CancelButton_Click(object sender, RoutedEventArgs e)
                bOKPressed = false;
                this.window.IsOpen = false;

    Can someone please point me where the bug might be located on my code? It seems a Telerik component issue from the stacktrace I get. Also I have such error reports in various places of my software which are not giving errors to my machine or phone device.

    Thank you very much.


    Efthymios Kalyviotis
  2. Kiril Stanoev
    Kiril Stanoev avatar
    1512 posts

    Posted 30 Apr 2013 Link to this post

    Hi Efthymios,

     Thank you very much for the detailed information. It will really help us investigate the issue.
    Unfortunately due to national holidays our team is working in limited capacity. Would it be a problem if we investigate your issue first thing next week. Let me know if this is an acceptable option. I'd be glad to assist you further.

    Kind regards,
    Kiril Stanoev
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. Efthymios
    Efthymios avatar
    17 posts
    Member since:
    Apr 2012

    Posted 30 Apr 2013 Link to this post

    Hello Kiril,

    That is no problem at all. At the mean time I am still trying to investigate the issue and I will let you know if I find any further information about that matter. Please, when your team returns from holidays, I would suggest that you let me know of possible places that I should be searching for the error produced (4 eyes are better than 2). I am still trying to find a way to somehow recreate the error. In the bellow example,

    renameDlg = new RenameDialog();
    renameDlg.window.IsOpen = true;
    renameDlg.CaptionTextBlock.Text = "Save course";
    renameDlg.window.WindowClosed += new EventHandler<WindowClosedEventArgs>(renameWindow_WindowClosed);

    I have moved the window.IsOpen command to the last line (after the WindowClosed event handler). I have a feeling that now the app is a bit more stable but I can not prove it.

    Best regards

    Efthymios Kalyviotis
  4. Victor
    Victor avatar
    1358 posts

    Posted 07 May 2013 Link to this post

    Hello Efthymios,

    Thanks for writing.
    I am afraid that I can not tell why the UIElementCollection.Add() method is failing. This is really strange since your code is executed on button click. If you can tap a button this means the UI is loaded and working correctly. If you happen to find a way to consistently reproduce the exception please let us know. I have an idea how this can be fixed but I will have to thoroughly test the window in order to ensure that it will not create other issues.

    Please write again if you need further assistance.

    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Back to Top