After update version NullReference in UpdatePositionHelper !

7 posts, 0 answers
  1. alexhome
    alexhome avatar
    14 posts
    Member since:
    Apr 2011

    Posted 23 Sep 2011 Link to this post

    After update version to 2011.2.920.1040 from 2011.1.xx.xx, i got error:
    + $exception {System.NullReferenceException: Object reference not set to an instance of an object.
    at Telerik.Windows.Controls.Docking.ToolWindow.UpdatePositionHelper(PositionHelper helper)
    at Telerik.Windows.Controls.WindowBase.CheckRestrictedArea()
    at Telerik.Windows.Controls.WindowBase.OnRootVisualSizeChanged()
    at Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IWindowDragAware.RootVisualSizeChanged()
    at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.Initialize()
    at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.OnPresenterLoadedForFirstTime(Object sender, RoutedEventArgs e)
    at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
    at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)} System.Exception {System.NullReferenceException}

    before i add on dock panel windows:
    RadSplitContainer rsc = new RadSplitContainer(); 
    rsc.InitialPosition = DockState.FloatingDockable; 
    RadPaneGroup rpg = new RadPaneGroup(); 
    rsc.Items.Add(rpg); 
    RadPane rp = new RadPane(); 
    rpg.Items.Add(rp); 
    rp.ContextMenuTemplate = null
    rp.Title = title; 
    rp.Header = title; 
    rp.Content = content; 
    RadDocking.SetSerializationTag(rp, header); 
    RadDocking.SetFloatingSize(rsc, new Size { Width = 400, Height = 400 }); 
    dockPanel.Items.Add(rsc);

    and if i load dock layout from XML
    using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(profile)))
    {
        stream.Seek(0, SeekOrigin.Begin);
        dockPanel.LoadLayout(stream);
    }
    on exit function i have error
  2. alexhome
    alexhome avatar
    14 posts
    Member since:
    Apr 2011

    Posted 26 Sep 2011 Link to this post

    anybody home ????????????????????
  3. DevCraft banner
  4. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 27 Sep 2011 Link to this post

    Hello Alexhome,

    Although we review all forum threads the answer is not guaranteed. That's why if you need faster response you should post support tickets.
    Now straight to the problem you have - if you are calling the LoadLayout method in the constructor of the MainPage this could be the problem. In order to make this work you might either postpone this action a little (using a Dispatcher.BeginInvoke) or to move it in the Loaded event handler. We will target this problem, but currently I cannot give you a concrete time frame.

    Hope this helps.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

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

  5. Matt Eland
    Matt Eland avatar
    24 posts
    Member since:
    Sep 2009

    Posted 25 Oct 2011 Link to this post

    I'm seeing something somewhat similar with a null ref with a stack trace of:

    at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.Initialize()
    at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.OnPresenterLoadedForFirstTime(Object sender, RoutedEventArgs e)
    at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
    at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

    What's the status of this issue?
  6. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 26 Oct 2011 Link to this post

    Hi Matt,

    We are aware of this problem and we will target it for the 2011 Q3 release. Here is the PITS item for the issue.

    All the best,
    Miroslav Nedyalkov
    the Telerik team

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

  7. alexhome
    alexhome avatar
    14 posts
    Member since:
    Apr 2011

    Posted 04 Mar 2012 Link to this post

    I download release 15 feb 2012, but the problem persists, you are promised !!!!!

    i cant upgrade my project on new version radcontrol during the year !!!!!

    if i execute next code by DispetcherTimer after 2 seconds, than all work fine


    using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(profile))) 
       stream.Seek(0, SeekOrigin.Begin); 
       dockPanel.LoadLayout(stream); 
    }

    and new bug in new release, when I create a new dialog box (radcontrol modal window), then it is in the background, and dockable window in the foreground




  8. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 05 Mar 2012 Link to this post

    Hello Alex,

    I know we promised, but the issue was postponed due to the available work-around which you found. About the other problem I would suggest you to use the dispatcher technique for both loading the layout and opening the dialog window.

    Hope this helps.

    Kind regards,
    Miroslav Nedyalkov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
DevCraft banner