Getting visual is not connected to a Presentationsource Error While Docking

Posted by: santhosh.balakrishnan on 22 December 2020, 10:45 pm EST

  • Posted 22 December 2020, 10:45 pm EST

    Getting visual is not connected to a Presentationsource Error While Docking the docktabcontrol inside dockcontrol not able to reproduce the issue because it is occurring randomly. Below I have attached the exception details.

    System.InvalidOperationException
    HResult=0x80131509
    Message=This Visual is not connected to a PresentationSource.
    Source=PresentationCore
    StackTrace:
    at System.Windows.Media.Visual.PointToScreen(Point point)
    at #cKb.#cLb.#XKb(Object #F, MouseEventArgs #9l)
    at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
    at System.Windows.Input.InputManager.ProcessStagingArea()
    at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
    at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
    at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
    at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at System.Windows.Interop.HwndSource.InputFilterMessage(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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, 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)
    at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
    at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
    at System.Windows.Window.ShowHelper(Object booleanBox)
    at System.Windows.Window.ShowDialog()
    at KT.ACE.GUI.AnalyticVisualizerController.OpenAnalyticVisualizer(NodeIdentity nodeIdentity) in E:\Klarity Ace Sources\ACE_DEVELOPMENT 24.0.20\ace_xp\Source\Application\GUI\OutputDisplayManager\AnalyticVisualizerController.cs:line 115
    at KT.ACE.GUI.ACE_Main.ConfigureAnalyticVisualizer()
    at KT.ACE.GUI.ACE_Main.dnbmACE_Main_ItemClick(Object sender, EventArgs e)
    at DevComponents.DotNetBar.DotNetBarManager.8X(BaseItem 2EB)
    at DevComponents.DotNetBar.BaseItem.RaiseClick()
    at DevComponents.DotNetBar.DotNetBarManager.HO(eShortcut 2GN)
    at DevComponents.DotNetBar.DotNetBarManager.8E(IntPtr 2GK, IntPtr 2GL, IntPtr 2GM)
    at DevComponents.DotNetBar.05.N3(IntPtr 2R8, IntPtr 2R9, IntPtr 2RA)
    at System.Windows.Forms.Application.ThreadContext.ProcessFilters(MSG& msg, Boolean& modified)
    at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at KT.ACE.GUI.ACE_Main.Main(String[] args)

    Thanks & Regards
    B.Santhosh
  • Replied 23 December 2020, 7:27 pm EST

    Hi Santhosh,

    We are sorry but this issue is not reproducible at our end. Could you please share the C1 version you are using?

    In case you are using an old version, could you please try the same with the latest build (4.5.20203.727) and see if the issue happens or not? You can upgrade to the latest build using C1ControlPanel from here :

    https://www.grapecity.com/componentone/download

    Regards,
    Kartik
  • Replied 23 December 2020, 7:47 pm EST

    Hi Karthik,

    We are using 4.5.20202.716, we are also not able to reproduce the scenario exactly so that, i didn't able to create a sample for your reference. I think there is a problem while calling the System.Windows.Media.Visual.PointToScreen(Point point) method while dragging the dockcontrols., what my assumption is, it needs some validation before calling the PointToScreen method, will you please check on it meanwhile, i will try with the latest build.


    Thanks & Regards
    B.Santhosh
  • Replied 23 December 2020, 10:13 pm EST

    Hi Santosh,

    I have tried multiple times docking/undocking but the issue didn't replicate. Could you please try running the attached sample and see if it causes any issues while docking? (see DockControlSample.zip)

    And also are you performing any specific operation during the docking operation? If yes then please make the necessary changes in the attached sample.

    Regards,
    Kartik

    DockControlSample.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels