The provided DependencyObject is not a context for this Freezable

4 posts, 0 answers
  1. BENN
    BENN avatar
    74 posts
    Member since:
    Dec 2011

    Posted 26 May Link to this post

    Few of our customers sometimes experience the exception above (I assume it doesn't always happen to them), and we get the crash report through our diagnostics system.

    The stack trace is:

      at System.Windows.Freezable.RemoveContextInformation(DependencyObject context, DependencyProperty property)\r\n   at System.Windows.Freezable.RemoveInheritanceContext(DependencyObject context, DependencyProperty property)\r\n   at System.Windows.DependencyObject.RemoveSelfAsInheritanceContext(DependencyObject doValue, DependencyProperty dp)\r\n   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)\r\n   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)\r\n   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)\r\n   at Telerik.Windows.Controls.RadRibbonWindow.SetThemeTemplate(RadRibbonWindow ribWin)\r\n   at Telerik.Windows.Controls.RadRibbonWindow.OnApplyTemplate()\r\n   at System.Windows.FrameworkElement.ApplyTemplate()\r\n   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)\r\n   at System.Windows.UIElement.Measure(Size availableSize)\r\n   at System.Windows.Interop.HwndSource.Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)\r\n   at System.Windows.Interop.HwndSource.LayoutFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)\r\n   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)\r\n   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

     

    The problem looks like coming from:

    RadRibbonWindow.SetThemeTemplate

    Are you aware of issues that can cause it?

     

    Thanks.

  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2194 posts

    Posted 29 May Link to this post

    Hello Benn,

    We are not aware what is causing the reported issue. However, I've done a little research on the error and it seems that it usually relates with brushes or images. May I ask you to share some runnable code showing the RadRibbonView setup in XAML and code-behind, so I can check it on my side?

    Regards,
    Martin Ivanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. BENN
    BENN avatar
    74 posts
    Member since:
    Dec 2011

    Posted 29 May in reply to Martin Ivanov Link to this post

    It won't be hard to share all the source code (It is huge, and making a runnable minimized code that will also reproduce the problem is not an easy task, and since this problem is kind of rare and never happened to me in debug then I cannot even guarantee that the given code would ever reproduce it).

    I'm also investigating it, and I'll keep you posted if I find anything interesting.

  4. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2194 posts

    Posted 29 May Link to this post

    Hello Benn,

    Looking forward to hear more about this, if you find anything.

    Regards,
    Martin Ivanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top