none
WPF - KinectRegion.SetBoundingRectForPressableModel RRS feed

  • Question

  • I'm continually getting the following error at different points of the application, but always when navigating.  I'm using the 

    this.NavigationService.Navigate()
    

    to navigate to different Pages i have created.  

    Error: The specified Visual and this Visual do not share a common ancestor, so there is no valid transformation between the two Visuals.  at System.Windows.Media.Visual.TransformToVisual(Visual visual).
    at Microsoft.Kinect.WPF.Controls.KinectRegion.SetBoundingRectForPressableModel(PressableModel pressableModel)
    at Microsoft.Kinect.WPF.Controls.KinectRegion.HandlePointerAsCursor(KienctPointerPoint kinectPointerPoint)
    at Microsoft.Kinect.WPF.Controls.KinectRegion.KinectCoreWindow_PointerMoved(Object sender, KinectPointerEventArgs args)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
    at System.Window.Threading.DispatcherOperation.InvokeImpl()
    ....

    If you need the rest I can provide it.  Is there a common issue that would cause this to happen with the kinect sensor?  I

    have the Kinect sensor region being set in the Window of the application so i dont need to set it on every page. 

        public MainWindow()
            {
                InitializeComponent();
                
                KinectRegion.SetKinectRegion(thiskinectRegion);
     
                // Use the default sensor
                this.kinectRegion.KinectSensor = KinectSensor.GetDefault();
            }

    Am I missing some cleanup somewhere or something else?

    Friday, August 15, 2014 10:02 PM

Answers

  • This is a crash that existed in our public preview release.

    It has since been fixed. Please verify with the next build you get.

    Thanks, Rob Relyea

    http://twitter.com/rrelyea


    Rob Relyea [MSFT]

    Monday, August 18, 2014 10:43 PM

All replies

  • are you unloading the previous window? Is the code you provided on each window? What are you doing when navigating away?

    When leaving a page Stop processing events on the page before you navigate away. If you are using the events, you can unsubscribe from the events to ensure the pointer is inside a valid region.


    Carmine Sirignano - MSFT

    Monday, August 18, 2014 6:29 PM
  • This is a crash that existed in our public preview release.

    It has since been fixed. Please verify with the next build you get.

    Thanks, Rob Relyea

    http://twitter.com/rrelyea


    Rob Relyea [MSFT]

    Monday, August 18, 2014 10:43 PM
  • Do I need to re-download the Windows Kinect v2 SDK?  Or download this fix somewhere else?
    Tuesday, August 19, 2014 1:14 PM