Внутренний сбой Surface SDK TagVisualizationHostAdapter

Мы работаем над приложением SUR40, которое поддерживает теги. Но иногда мы получаем странный и трудно воспроизводимый сбой внутри TagVisualizationHostAdapter при перемещении тега. У нас есть ScatterView, который действует как TagVisualizationHost.

Ниже трассировки стека. У кого-нибудь есть идея?

Спасибо,

Мартен

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()

person Maarten    schedule 17.04.2013    source источник


Ответы (1)


Я знаю, что это старый пост, но сегодня я столкнулся с той же ошибкой. Я проверил еще немного, и мне кажется, что ошибка связана с неправильным контактом между меткой и поверхностью. В моем случае это происходит, если я перемещаю или удаляю тег, когда мой код все еще находится внутри обработчика событий VisualizationAdded. Если на вашей стороне вы нашли другую причину, вы можете поделиться ею здесь? Спасибо Жюльен

person jhfelectric    schedule 04.03.2014