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

NullReferenceException After Update 2015.1.225.45

3 Answers 87 Views
RadialMenu
This is a migrated thread and some comments may be shown as answers.
INFOLINE BILGI TEKNOLOJILERI
Top achievements
Rank 1
INFOLINE BILGI TEKNOLOJILERI asked on 18 Mar 2015, 03:17 PM
Hi,

After updating the version mentioned on the title, the project started to throw the following exception:

System.NullReferenceException was unhandled
  _HResult=-2147467261
  _message=Object reference not set to an instance of an object.
  HResult=-2147467261
  IsTransient=false
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls.Navigation
  StackTrace:
       at Telerik.Windows.Automation.Peers.RadRadialMenuItemAutomationPeer.GetChildrenCore()
       at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
       at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)
       at System.Windows.Automation.Peers.AutomationPeer.UpdateChildren()
       at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       at System.Windows.ContextLayoutManager.fireAutomationEvents()
       at System.Windows.ContextLayoutManager.UpdateLayout()
       at System.Windows.UIElement.UpdateLayout()
       at System.Windows.Interop.HwndSource.Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Interop.HwndSource.LayoutFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
  InnerException: 

3 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 18 Mar 2015, 03:53 PM
Hello,

We are already aware of such an issue and we are working on a fix for one of the upcoming internal builds. However can you please share some more details regarding the exact scenario that causes the exception? Some sample code or video would be really helpful.

I apologize for any inconvenience caused. I'm looking forward to hearing from you.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
INFOLINE BILGI TEKNOLOJILERI
Top achievements
Rank 1
answered on 18 Mar 2015, 04:22 PM
Hi Kalin,

Problematic (sample) code was below and we solved the problem by adding empty Header property to all of RadialMenuItems. Exception is thrown when using nested RadialMenuItems. 

<Window x:Class="Infoline.Collaboration.MahappsHost.Views.MainMenu"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        DataContext="{StaticResource MainModel}"
        Visibility="{Binding Path=HasValidSession, Converter={StaticResource ShowIfTrue}}"
        AllowsTransparency="True" WindowStyle="None" Background="Transparent" ShowInTaskbar="False"
        Height="310" Width="310">

    <Window.Resources>
        <Style TargetType="telerik:VisualStatesItemPresenter" BasedOn="{StaticResource VisualStatesItemPresenterStyle}">
            <Setter Property="Background" Value="SteelBlue"/>
            <Setter Property="ThicknessFactor" Value="0.2" />
            <Setter Property="ArrowThicknessFactor" Value="0.2" />
        </Style>

        <Style TargetType="telerik:RadialMenuButton" >
            <Setter Property="Background" Value="SteelBlue" />
            <Setter Property="Width" Value="64" />
            <Setter Property="Height" Value="64" />
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <Grid Width="36" Height="36">
                            <Path Data="M7.1552321,14.344L14.865779,14.344 14.865779,16.354271 16.449001,16.354271 16.449001,17.849 5.5720001,17.849 5.5720001,16.354271 7.1552321,16.354271z M1.2656064,1.2657108L1.2656064,11.744439 20.066023,11.744439 20.066023,1.2657108z M0,0L21.333,0 21.333,13.01 0,13.01z" Stretch="Uniform" Fill="Black" Margin="0,0,0,0" RenderTransformOrigin="0.5,0.5" />
                        </Grid>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>

    <Grid Margin="10">
        <telerik:RadRadialMenu IsOpen="True" ShowToolTip="True" x:Name="Menu">
            <telerik:RadRadialMenu.Effect>
                <DropShadowEffect BlurRadius="10" Color="Gray" Direction="270" Opacity="0.5" RenderingBias="Performance" ShadowDepth="5"></DropShadowEffect>
            </telerik:RadRadialMenu.Effect>

            <telerik:RadRadialMenuItem ToolTipContent="1" CanUserSelect="True" IsSelected="{Binding Path=Is_1_Visible, Mode=TwoWay}">
                <telerik:RadRadialMenuItem.IconContent>
                    <Path Data="M7.1552321,14.344L14.865779,14.344 14.865779,16.354271 16.449001,16.354271 16.449001,17.849 5.5720001,17.849 5.5720001,16.354271 7.1552321,16.354271z M1.2656064,1.2657108L1.2656064,11.744439 20.066023,11.744439 20.066023,1.2657108z M0,0L21.333,0 21.333,13.01 0,13.01z" Fill="Black" Width="32" Height="32" />
                </telerik:RadRadialMenuItem.IconContent>

                <telerik:RadRadialMenuItem ToolTipContent="1.1" CanUserSelect="True" IsSelected="{Binding Path=Is_1_1_Visible, Mode=TwoWay}">
                    <telerik:RadRadialMenuItem.IconContent>
                        <Path Data="M7.1552321,14.344L14.865779,14.344 14.865779,16.354271 16.449001,16.354271 16.449001,17.849 5.5720001,17.849 5.5720001,16.354271 7.1552321,16.354271z M1.2656064,1.2657108L1.2656064,11.744439 20.066023,11.744439 20.066023,1.2657108z M0,0L21.333,0 21.333,13.01 0,13.01z" Fill="Black" Width="32" Height="32" />
                    </telerik:RadRadialMenuItem.IconContent>
                </telerik:RadRadialMenuItem>

                <telerik:RadRadialMenuItem ToolTipContent="1.2" CanUserSelect="True" IsSelected="{Binding Path=Is_1_2_Visible, Mode=TwoWay}">
                    <telerik:RadRadialMenuItem.IconContent>
                        <Path Data="M7.1552321,14.344L14.865779,14.344 14.865779,16.354271 16.449001,16.354271 16.449001,17.849 5.5720001,17.849 5.5720001,16.354271 7.1552321,16.354271z M1.2656064,1.2657108L1.2656064,11.744439 20.066023,11.744439 20.066023,1.2657108z M0,0L21.333,0 21.333,13.01 0,13.01z" Fill="Black" Width="32" Height="32" />
                    </telerik:RadRadialMenuItem.IconContent>
                </telerik:RadRadialMenuItem>

            </telerik:RadRadialMenuItem>

            <telerik:RadRadialMenuItem ToolTipContent="2" CanUserSelect="True" IsSelected="{Binding Path=Is_2_Visible, Mode=TwoWay}">
                <telerik:RadRadialMenuItem.IconContent>
                    <Path Data="M7.1552321,14.344L14.865779,14.344 14.865779,16.354271 16.449001,16.354271 16.449001,17.849 5.5720001,17.849 5.5720001,16.354271 7.1552321,16.354271z M1.2656064,1.2657108L1.2656064,11.744439 20.066023,11.744439 20.066023,1.2657108z M0,0L21.333,0 21.333,13.01 0,13.01z" Fill="Black" Width="32" Height="32" />
                </telerik:RadRadialMenuItem.IconContent>
            </telerik:RadRadialMenuItem>
        </telerik:RadRadialMenu>
    </Grid>
</Window>
 
 
0
Kalin
Telerik team
answered on 19 Mar 2015, 09:56 AM
Hello,

Thanks for the further details. We have managed to reproduce the issue with the sample code and we will consider it when fixing the other issue related with the AutomationPeers.

I apologize for any inconvenience caused. I have also updated your Telerik points for your involvement.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
RadialMenu
Asked by
INFOLINE BILGI TEKNOLOJILERI
Top achievements
Rank 1
Answers by
Kalin
Telerik team
INFOLINE BILGI TEKNOLOJILERI
Top achievements
Rank 1
Share this question
or