Issue when undocking RadTimeline with intervals

4 posts, 0 answers
  1. Ola
    Ola avatar
    26 posts
    Member since:
    Jun 2014

    Posted 15 Feb 2018 Link to this post

    Hi,

    I have an application using the telerik docking-framework and timelines. I have an issue when undocking a frame containing a RadTimeline.

    I get a NullPointerException in Telerik.Windows.Controls.TimeBar.TimeIntervalContainerBase.RemoveDummyItem.

    It turns out I only get the exception when I have the Intervals property set. If I remove the Intervals it does not crash.

    I have another dockpanel with a RadTimeline as well, but that one does not generate the NullPointerException, so maybe I am doing something bad.

    My RadTimeline xaml which crashes looks like this:

    <telerik:RadTimeline
                    MinHeight="55"
                    Margin="2"
                    AutoSort="False"
                    DurationPath="Duration"
                    GroupExpandMode="None"
                    ItemsSource="{Binding TimePeriods}"
                    PeriodEnd="{Binding VisiblePeriodEnd, Mode=OneWay}"
                    PeriodHeaderStyle="{StaticResource PeriodHeaderStyle}"
                    PeriodStart="{Binding VisiblePeriodStart, Mode=OneWay}"
                    ScrollMode="None"
                    SnapsToDevicePixels="True"
                    StartPath="Start"
                    TimelineItemTemplate="{StaticResource ItemTemplate}"
                    VerticalScrollBarVisibility="Hidden"
                    VisiblePeriodEnd="{Binding VisiblePeriodEnd, Mode=OneWay}"
                    VisiblePeriodStart="{Binding VisiblePeriodStart, Mode=OneWay}">
     
                    <telerik:RadTimeline.Intervals>
                        <telerik:DayInterval FormatterProvider="{StaticResource DayFormatterProvider}" />
                    </telerik:RadTimeline.Intervals>
     
                </telerik:RadTimeline>

     

    Here is the callstack:

    An unhandled exception of type 'System.NullReferenceException' occurred in Telerik.Windows.Controls.DataVisualization.dll
    Objektreferensen har inte angetts till en instans av ett objekt.
     
     
    Ohanterat undantag: System.NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt.
       vid Telerik.Windows.Controls.TimeBar.TimeIntervalContainerBase.RemoveDummyItem()
       vid Telerik.Windows.Controls.TimeBar.TimeIntervalContainerBase.MeasureIntervalFormats()
       vid System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       vid System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       vid System.Windows.Threading.DispatcherOperation.InvokeImpl()
       vid MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
       vid System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       vid MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
       vid System.Windows.Threading.DispatcherOperation.Invoke()
       vid System.Windows.Threading.Dispatcher.ProcessQueue()
       vid System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       vid MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       vid MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       vid System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       vid System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       vid System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       vid MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       vid MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       vid System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       vid System.Windows.Application.RunDispatcher(Object ignore)
       vid System.Windows.Application.RunInternal(Window window)

     

    Do you have any clue what is causing the issue?

     

    Best regards

    /Ola Nygren

  2. Stefan
    Admin
    Stefan avatar
    1073 posts

    Posted 20 Feb 2018 Link to this post

    Hello Olya,

    Thank you for the detailed illustration of the error you are experiencing.

    I prepared a sample application based on your description with which I tried to replicate the exception, but to no avail. You can find it attached to my reply. Can you please take a look at it? Would it be possible for you to modify it with the implementation you are using so that the issue is reproducible and send it through a new support thread?  Thus, I will be able to debug the problem and assist you further.

    Thank you in advance for your cooperation.

    Best Regards,
    Stefan
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Ola
    Ola avatar
    26 posts
    Member since:
    Jun 2014

    Posted 27 Feb 2018 in reply to Stefan Link to this post

    Ok, so now I have been able to narrow down my problem a bit more. Inside my RadPane I have a ContentControl which Content is bound to a UserControl containing a RadTabControl with a RadTimeline with intervals inside each tab.

    I am using the Windows8 theme with the latest Telerik WPF release. This seems to be the bad combination causing the NullPointerException when undocking the RadPane.

    When I switch the RadTabControl for a standard TabControl I do not get the issue. Does this give you any better explanation of the issue?

     

    /Ola

  4. Stefan
    Admin
    Stefan avatar
    1073 posts

    Posted 02 Mar 2018 Link to this post

    Hello Ola,

    Thank you for the update.

    I modified the sample application based on your description and I am still unable to replicate the reported issue locally. As mentioned in my previous reply, would it be possible for you to modify the sample project so that the exception is reproduced and send it through a new support thread?

    Have a nice weekend, Ola.

    Regards,
    Stefan
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top