Surface SDK TagVisualizationHostAdapter内部崩溃

时间:2013-04-17 14:32:24

标签: sdk tags pixelsense

我们正在研究支持标签的SUR40应用程序。但有时我们在移动标签时会在TagVisualizationHostAdapter内部出现奇怪且难以再现的崩溃。我们有一个ScatterView,它充当TagVisualizationHost。

堆栈跟踪下方。有人有想法吗?

THX,

马腾

System.ArgumentNullException: Value cannot be null. Parameter name: visualization

at Microsoft.Surface.Presentation.Controls.TagVisualizationHostAdapter.NotifyVisualizationMoved(TagVisualization visualization, Point center, Double orientation, UIElement relativeTo)
at Microsoft.Surface.Presentation.Controls.ScatterViewTagVisualizationHostAdapter.OnContainerMoved(ScatterViewItem container, Point containerCenter, Double containerOrientation)
at Microsoft.Surface.Presentation.Controls.ScatterViewTagVisualizationHostAdapter.OnContainerPositionChanged(ScatterContentControlBase item)
at Microsoft.Surface.Presentation.Controls.ScatterContentControlBase.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Microsoft.Surface.Presentation.Controls.ScatterContentControlBase.OnManipulationDeltaPrivate(ManipulationDeltaEventArgs e)
at Microsoft.Surface.Presentation.Controls.ScatterContentControlBase.OnManipulationDelta(ManipulationDeltaEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
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.ManipulationDevice.ProcessManipulationInput(InputEventArgs e)
at System.Windows.Input.ManipulationLogic.OnInertiaTick(Object sender, EventArgs e)
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
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.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(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.Application.RunInternal(Window window)
at System.Windows.Application.Run()
at MaterialSource.App.Main()

1 个答案:

答案 0 :(得分:0)

我知道这是一个老帖子,但我今天也遇到了同样的错误。 我已经测试了一点,在我看来,错误与标签和表面之间的不正确接触有关。在我的情况下,当我的代码仍在VisualizationAdded事件处理程序中时,如果我移动或删除标记,似乎会发生这种情况。 如果在您身边找到了其他原因,您可能想在这里分享一下吗? 谢谢 于连