Layout cycle detected crashes the browser

10 posts, 0 answers
  1. Jason Moore
    Jason Moore avatar
    22 posts
    Member since:
    Jun 2012

    Posted 20 Oct 2011 Link to this post

    Hi,

    We have a critical issue in our application that causes an exception to be thrown saying "Layout cycle detected" and the crashing the application.
    This seems to be consistently when:
    -executing a specific series of actions
    -fairly often (but not always) when resizing the browser window

    I'm not entirely sure it's because of the Docking control, and it might be a specific xaml that causes the issue.
    Unfortunately our application is quite massive but here what the xaml looks like (edited for simplicity).
    This shows each control from the outermost to the inner most.

    The main view :

    <telerik:RadDocking Margin="0"
                            telerik:StyleManager.Theme="{Binding SelectedTheme}"
                            QuickStart:ThemeAwareBackgroundBehavior.IsEnabled="False"
                            AllowUnsafeMode="True">
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer telerik:StyleManager.Theme="{Binding SelectedTheme}">
                    <telerik:RadPaneGroup telerik:StyleManager.Theme="{Binding SelectedTheme}">
                        <telerik:RadPane x:Name="tabDashboard"
                                         Header="Dashboard"
                                         telerik:StyleManager.Theme="{Binding SelectedTheme}"
                                         CanUserClose="False"
                                         CanDockInDocumentHost="False"
                                         CanFloat="False"
                                         ContextMenuTemplate="{x:Null}">
                            <rb:DashboardView DataContext="{Binding DashboardVM}" />
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
    </telerik:RadDocking>

    The dashboard view:
    <UserControl x:Name="_dashView"
    ...
                 
    mc:Ignorable="d"
                 d:DesignHeight="304" d:DesignWidth="575">
        <Grid x:Name="_topGrid" Background="White">
            <ContentPresenter Content="{Binding Path=ReportDashboard.SelectedPage}" Visibility="Visible">
                <ContentPresenter.ContentTemplate>
                    <DataTemplate>
                        <telerik:ItemsControl ItemsSource="{Binding}"
                                              HorizontalAlignment="Stretch"
                                              VerticalAlignment="Stretch"
                                              VerticalContentAlignment="Stretch"
                                              HorizontalContentAlignment="Stretch">
                            <telerik:ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <view:DynamicGridLayout NumColumns="{Binding Path=Width, Mode=OneWay, FallbackValue=1}"
                                                            NumRows="{Binding Path=Height, Mode=OneWay, FallbackValue=1}"
                                                            HorizontalAlignment="Stretch"
                                                            VerticalAlignment="Stretch">

                                    </view:DynamicGridLayout>
                                </ItemsPanelTemplate>
                            </telerik:ItemsControl.ItemsPanel>
                            <telerik:ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <ContentPresenter DataContext="Binding ElementName=_topGrid, Path=DataContext">
                                        <view:RControl x:Name="rcontrol" BorderThickness="5" BorderBrush="/>
                                    </ContentPresenter>
                                </DataTemplate>
                            </telerik:ItemsControl.ItemTemplate>
                        </telerik:ItemsControl>
                    </DataTemplate>
                </ContentPresenter.ContentTemplate>
            </ContentPresenter>
        </Grid>
    </UserControl>

    And RControl contains something like this:
    <telerik:ClipPanel>
               <telerik:RadChart x:Name="uc_TChart"
                             Background="Transparent"
                             UseDefaultLayout="False"
                             ItemsSource="{Binding Path=Series, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToTelerikDataConverter}}"
                             SeriesMappings="{Binding Path=Series, Mode=OneWay, Converter={StaticResource ResourceKey=cv_ToTelerikDefinitionConverter}}"
                             Visibility="{Binding Path=IsChartVisible, Mode=OneWay, Converter={StaticResource ResourceKey=cv_BoolToCollapsedVisibilityConverter}}"
                             DataBound="uc_TChart_DataBound"
                             Loaded="uc_TChart_Loaded"
                             Width="{Binding Path=ChartState.ActualWidth, Mode=OneWay}"
                             Height="{Binding Path=ChartState.ActualHeight, Mode=OneWay}"
                             VerticalAlignment="Center"
                             HorizontalAlignment="Center"
                             Margin="0,0,5,0">
                    <Grid>
            ....
                 </Grid>
     
               </telerik:RadChart>
           </telerik:ClipPanel>


    Given the critical nature of that issue, a prompt answer would be appreciated.

    Thanks
  2. Jason Moore
    Jason Moore avatar
    22 posts
    Member since:
    Jun 2012

    Posted 24 Oct 2011 Link to this post

    Any updates on this ?

    Thank you.
  3. DevCraft banner
  4. Jason Moore
    Jason Moore avatar
    22 posts
    Member since:
    Jun 2012

    Posted 24 Oct 2011 Link to this post

    No one ?
  5. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 25 Oct 2011 Link to this post

    Hello Jason,

    We were not able to reproduce this at our side. What version of RadControls do you use? There was such issue with RadChart control, but it is now fixed.

    Also if you need a fast reply, I would suggest you send us a support ticket.

    Regards,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Jason Moore
    Jason Moore avatar
    22 posts
    Member since:
    Jun 2012

    Posted 26 Oct 2011 Link to this post

    Hello,

    We are using version Q1.
    I could upgrade but I'm kind of worried that some other things might break.

    Thanks
  7. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 27 Oct 2011 Link to this post

    Hi Jason,

    We searched for a workaround for this issue with the Q1 dlls without any success.
    We understand upgrading could be inconvenient for you. However this might be the only option available. Please try the latest Q2 SP1 dlls and if you have any issues, contact us again.

    Greetings,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Jason Moore
    Jason Moore avatar
    22 posts
    Member since:
    Jun 2012

    Posted 27 Oct 2011 Link to this post

    Hi,

    We're trying to upgrade but now all charts show "No Data Series" !
    I've posted my issue on a separate thread:
    http://www.telerik.com/community/forums/silverlight/chart/chart-shows-no-data-series-after-upgrading-from-q1-to-q2-sp1.aspx

    Not sure how to go about finding what the issue is.
    Ideas ?
  9. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 01 Nov 2011 Link to this post

    Hello Jason,

    Since your question was answered in the other thread mentioned by you, I suggest that we keep our possible further communication on this there. This way it will be easier for both of us to follow it.

    All the best,
    Evgenia
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  10. Stuart
    Stuart avatar
    30 posts
    Member since:
    Jun 2010

    Posted 08 Nov 2011 Link to this post

    Hi

    We've started encountering the LayoutCycleDetcted error as well. We haven't been able to pin it down but it only seems to have started since we switched off the AutoRange and manually set the max, min and step values. It is a critical issue for us as it kills the whole browser. Any suggestions on fixing this? I've looked at the other thread but doesn't appear to have any fixes for this issue.

    Thanks
  11. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 10 Nov 2011 Link to this post

    Hello Stuart,

    Can you elaborate a bit more on this? It will be best if you can open a new formal Support thread and send us a runnable project where this can be reproduced. We will inspect it locally and get back to you with our findings/suggestions on the matter.

    Kind regards,
    Evgenia
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner