none
Application running issue RRS feed

  • Question

  • Am developing a Kinect App on one PC and the app runs fine, Then am copied the bin/debug folder files to another PC and able to run  the app. but when am clicked on a KinectTileButton am getting below exception (i copied from event log).

    Log Name:      Application
    Source:        .NET Runtime
    Date:          08-Aug-13 4:33:45 PM
    Event ID:      1026
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      cdlab-SEC
    Description:
    Application: MCOLAB.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.NullReferenceException
    Stack:
       at MCOLAB.SurfaceWindow1.KinectTileButtonClick(System.Object, System.Windows.RoutedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
       at System.Windows.Controls.Primitives.ButtonBase.OnClick()
       at Microsoft.Kinect.Toolkit.Controls.KinectButtonBase.OnClick()
       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
       at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
       at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
       at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
       at System.Windows.Application.RunInternal(System.Windows.Window)
       at System.Windows.Application.Run()
       at MCOLAB.App.Main()

    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name=".NET Runtime" />
        <EventID Qualifiers="0">1026</EventID>
        <Level>2</Level>
        <Task>0</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2013-08-08T11:03:45.000000000Z" />
        <EventRecordID>19133</EventRecordID>
        <Channel>Application</Channel>
        <Computer>cdlab-SEC</Computer>
        <Security />
      </System>
      <EventData>
        <Data>Application: MCOLAB.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.NullReferenceException
    Stack:
       at MCOLAB.SurfaceWindow1.KinectTileButtonClick(System.Object, System.Windows.RoutedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
       at System.Windows.Controls.Primitives.ButtonBase.OnClick()
       at Microsoft.Kinect.Toolkit.Controls.KinectButtonBase.OnClick()
       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
       at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
       at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
       at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
       at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
       at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
       at System.Windows.Application.RunInternal(System.Windows.Window)
       at System.Windows.Application.Run()
       at MCOLAB.App.Main()
    </Data>
      </EventData>
    </Event>

    Thursday, August 8, 2013 11:31 AM

All replies

  • What does your code look like for KinectTileButtonClick event? What objects are you using in this function? As a best practice you can prevent the crash with try...catch...finally block of code.

    As for what might be the cause, which Kinect for Windows runtime did you install on the other system? Are you using the Kinect for Windows or the Xbox 360 sensor? Keep in mind, if you are using the Xbox 360 device, this is only supported for development environment only, if you want to "Release" a .exe based on the runtime, you have to use the Kinect for Windows device.


    Carmine Sirignano - MSFT


    Thursday, August 8, 2013 5:09 PM
  • So thank Carmine for your useful suggestions. From your above reply am able to resolve the issue.

    I have another request for you. Am using the HoverButton storyboard to show the visual effect when user will hover his hand on the button with in the time interval. It works fine, but when am running the application in extended mode (am extending the screen to a SmartBoard but the app runs on a Laptop/PixelSense table) or running the screen on a SmartBoard, in both cases if the respective button is at Smartboard the visual effect is not working. If the respective button is at my PC/laptop/PixelSense  the visual effect is working and am able to see the effect at my PC/Laptop.

    Please help me to figure out the issue.

    Thursday, August 22, 2013 5:37 AM
  • I am not sure which code you are referring since there isn't a "HoverButton" in the Kinect for Windows Toolkit. Is this control based on Kinect Interactions and the Toolkit's WPF Controls? How does the Interactions Gallery sample work with the same extended display configuration? 

    Following our Human Interface Guidelines (HIG), Hover would be associated with the the KinectCursor and not necessarily an action on the button itself. The visual states are triggered via the OnHandPointersUpdated()/GoToState() functions. This visual states trigger the "flood fill" affect as you are pushing on a button. As for the ButtonBase/KinectButton there are CommonStates and FocusStates, which are triggered via the cursor interaction events OnHandPointerXXX events. Because they inherit from WPF Button class, the button itself would behave as it would with a regular mouse interactions. The only difference of course if the cursor animations, but mouse over the button should trigger the animation.

    Because you are in extended display, depending on the code, you might be offset. 0,0 on the second display might actually be 1920+x(for HD). You can make the second display primary and extend to your laptop and see if that changes anything.


    Carmine Sirignano - MSFT

    Thursday, August 22, 2013 6:01 PM