crash when running

Mar 31, 2011 at 7:42 PM

Hi,

I have download the source code, and build successfully, but when run it causes crash as following:

>    Microsoft.Surface.Presentation.dll!Microsoft.Surface.Presentation.Logger.PreNotifyInput(object sender, System.Windows.Input.NotifyInputEventArgs e) + 0xec bytes   
     PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea() + 0x14c bytes   
     PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input) + 0x45 bytes   
     PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport) + 0x62 bytes   
     PresentationCore.dll!System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(System.IntPtr hwnd, System.Windows.Input.InputMode mode, int timestamp, System.Windows.Input.RawKeyboardActions actions, int scanCode, bool isExtendedKey, bool isSystemKey, int virtualKey) + 0x101 bytes   
     PresentationCore.dll!System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(System.IntPtr hwnd, MS.Internal.Interop.WindowMessage message, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x342 bytes   
     PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0xa0 bytes   
     WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0xbe bytes   
     WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x7d bytes   
     WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x53 bytes   
     WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x42 bytes   
     WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) + 0xb4 bytes   
     WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x104 bytes   
     [Native to Managed Transition]   
     [Managed to Native Transition]   
     WindowsBase.dll!MS.Win32.HwndSubclass.DefWndProcWrapper(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x50 bytes   
     [Native to Managed Transition]   
     [Managed to Native Transition]   
     WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x140 bytes   
     [Native to Managed Transition]   
     [Managed to Native Transition]   
     PresentationFramework.dll!System.Windows.Window.ShowHelper(object booleanBox) + 0xeb bytes   
     WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x53 bytes   
     WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x42 bytes   
     WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() + 0x8d bytes   
     WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state) + 0x38 bytes   
     mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x51 bytes   
     [Native to Managed Transition]   
     [Managed to Native Transition]   
     mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x6a bytes   
     mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0x7e bytes   
     mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x2c bytes   
     WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0x68 bytes   
     WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() + 0x15e bytes   
     WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x63 bytes   
     WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0xbe bytes   
     WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x7d bytes   
     WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x53 bytes   
     WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x42 bytes   
     WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) + 0xb4 bytes   
     WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x104 bytes   
     [Native to Managed Transition]   
     [Managed to Native Transition]   
     WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) + 0xc1 bytes   
     WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) + 0x49 bytes   
     WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() + 0x4c bytes   
     PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) + 0x17 bytes   
     PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x6f bytes   
     PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) + 0x26 bytes   
     PresentationFramework.dll!System.Windows.Application.Run() + 0x1b bytes   
     HandTesting.exe!HandTesting.App.Main() + 0x5e bytes    C#

I run on win 7,vs2010 , openni and nite are installed and run well.

Please help me out, i try a lot but still stuck with it 2 days

Coordinator
Mar 31, 2011 at 7:56 PM

Hi,

The stack trace is helpful but can you also post the actual Exception type and message?

When you run it does it crash immediately, or after a short time, or after you start calibrating or using it?

Do you have the June 2010 DirectX runtimes installed?

Thanks,

Josh

Mar 31, 2011 at 8:05 PM
Edited Mar 31, 2011 at 8:11 PM

Hi,

Thanks for fast reply, it crashs immediately when i start,

Edit: i also installed june 2010 directx runtimes

Exception message: 'System.TypeInitializationException' occurred in Microsoft.Surface.Presentation.dll

Addiditional information: The type initializer for 'Microsoft.Surface.PerformanceCounters' threw an exception

i also find this error when open SurfaceWindow1.xaml

System.InvalidOperationException
HandVisualization must be within the visual tree of a Window-derived control
   at InfoStrat.MotionFx.Controls.HandVisualization.HandVisualization_Loaded(Object sender, RoutedEventArgs e) in D:\Kinect\OpenNI\MotionFx\InfoStrat.MotionFx\Controls\HandVisualization.xaml.cs:line 40
   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.RaiseEvent(RoutedEventArgs e)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   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)

Coordinator
Mar 31, 2011 at 8:08 PM

Is this in the default HandTesting sample? Did you make any modifications?

You didn't replace Window with Page or anything weird, right?

Mar 31, 2011 at 8:14 PM

Hi Joshb,

I didn't modify anything, i download from this page, it causes error.Then i clone from github, and the error still occurs when i rebuild it. Is this error of .Net 4 ?

Ah, one more things, i run this on window 7, but it was installed on Mac