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

Unknown bug

3 Answers 36 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Efthymios
Top achievements
Rank 1
Efthymios asked on 24 Apr 2013, 12:39 PM
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. ]
[StackTrace]:[
   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]
[AppTotalRuns]:[2]
[AppRunsAfterLastUpdate]:[2]
[AppPreviousRunDate]:[Mon, 22 Apr 2013 03:18:56 GMT]
[AppVersion]:[2.2.0.0 free]
[Culture]:[en-US]
[CurrentPageSource]:[/MainPage.xaml]
[NavigationStack]:[
/MainMenu.xaml]
[DeviceManufacturer]:[HTC]
[DeviceModel]:[Radar 4G]
[DeviceHardwareVersion]:[0002]
[DeviceFirmwareVersion]:[1600.2200.20402.531]
[OSVersion]:[Microsoft Windows CE 7.10.8107]
[CLRVersion]:[3.7.11140.0]
[DeviceType]:[Device]
[NetworkType]:[Wireless80211]
[DeviceTotalMemory(Mb)]:[349.1562]
[AppPeakMemoryUsage(Mb)]:[56.27734]
[AppCurrentMemoryUsage(Mb)]:[50.21484]
[IsoStorageAvailableSpace(Mb)]:[2193]


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)
                return;
            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"
    xmlns:telerikCore="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Core"
    xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
    mc:Ignorable="d"
    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"
                                          Placement="CenterCenter">
 
 
 
            <telerikPrimitives:RadModalWindow.OpenAnimation>
                <telerikCore:RadPlaneProjectionAnimation CenterY="0.5" CenterX="0" StartAngleX="-90" EndAngleX="0" Axes="X">
                    <telerikCore:RadPlaneProjectionAnimation.Easing>
                        <CubicEase EasingMode="EaseOut"/>
                    </telerikCore:RadPlaneProjectionAnimation.Easing>
                </telerikCore:RadPlaneProjectionAnimation>
            </telerikPrimitives:RadModalWindow.OpenAnimation>
            <Border
                BorderThickness="{StaticResource PhoneBorderThickness}" HorizontalAlignment="Left" VerticalAlignment="Top" BorderBrush="#BFFF0000">
                <Grid Background="#FFC24A4A">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
 
                    <StackPanel Grid.ColumnSpan="2" Background="Red">
                        <TextBlock x:Name="CaptionTextBlock"
                            TextWrapping="Wrap" Text="Rename course" Margin="8,0,0,0" Foreground="White"/>
                    </StackPanel>
 
                    <TextBlock x:Name="DescrTextBlock"
                        Grid.Row="1"
                        Grid.ColumnSpan="2"
                        TextWrapping="Wrap"
                        VerticalAlignment="Top" Text="Please enter a short description for your course:" Margin="8,0" Foreground="#FFFFF1F1"/>
                    <TextBox x:Name="DescrTextBox"
                        Grid.Row="2"
                        Grid.ColumnSpan="2"
                        HorizontalAlignment="Stretch"
                        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"/>
                </Grid>
            </Border>
        </telerikPrimitives:RadModalWindow>
    </Grid>
</UserControl>

...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()
        {
            InitializeComponent();
 
            window.WindowSize = new Size(
                Application.Current.RootVisual.RenderSize.Width,
                Application.Current.RootVisual.RenderSize.Height
                );
        }
 
        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.

Yours,

Efthymios Kalyviotis

3 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 30 Apr 2013, 07:15 AM
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.
0
Efthymios
Top achievements
Rank 1
answered on 30 Apr 2013, 01:08 PM
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
0
Victor
Telerik team
answered on 07 May 2013, 07:57 AM
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.

Greetings,
Victor
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.
Tags
Window
Asked by
Efthymios
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Efthymios
Top achievements
Rank 1
Victor
Telerik team
Share this question
or