We are developing a plugin using Microsoft WPF Drag and Drop (https://github.com/microsoft/WPF-Samples) to drag elements into our iNEWS rundowns. However when a story is locked (ie. another user is actively editing a story and all other users are locked out), dragging and dropping from the plugin into that story will first display the expected "story is locked" message box but then will unexpectedly crash the WPF plugin with even the simplest sample project.
We feel like iNews is not cleaning up the drag/drop data object payload properly as demonstrated by it crashing the Microsoft sample Drag & Drop application.
Has anyone ran into this issue or is able to give insight on what might be happening?
Stack trace of crash:
Application: WpfApp1.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Runtime.InteropServices.COMException at MS.Win32.UnsafeNativeMethods.DoDragDrop(System.Runtime.InteropServices.ComTypes.IDataObject, IOleDropSource, Int32, Int32[]) at System.Windows.OleServicesContext.OleDoDragDrop(System.Runtime.InteropServices.ComTypes.IDataObject, IOleDropSource, Int32, Int32[]) at System.Windows.DragDrop.OleDoDragDrop(System.Windows.DependencyObject, System.Windows.DataObject, System.Windows.DragDropEffects) at System.Windows.DragDrop.DoDragDrop(System.Windows.DependencyObject, System.Object, System.Windows.DragDropEffects) at System.Windows.Documents.TextEditorDragDrop+_DragDropProcess.SourceDoDragDrop(System.Windows.Documents.ITextSelection, System.Windows.IDataObject) at System.Windows.Documents.TextEditorDragDrop+_DragDropProcess.SourceOnMouseMove(System.Windows.Point) at System.Windows.Documents.TextEditorMouse.OnMouseMoveWithFocus(System.Windows.Documents.TextEditor, System.Windows.Input.MouseEventArgs) at System.Windows.Documents.TextEditorMouse.OnMouseMove(System.Object, System.Windows.Input.MouseEventArgs) at System.Windows.Controls.Primitives.TextBoxBase.OnMouseMove(System.Windows.Input.MouseEventArgs) at System.Windows.UIElement.OnMouseMoveThunk(System.Object, System.Windows.Input.MouseEventArgs) at System.Windows.Input.MouseEventArgs.InvokeEventHandler(System.Delegate, System.Object) at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(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.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs) at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs) 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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(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.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame) at System.Windows.Application.RunDispatcher(System.Object) at System.Windows.Application.RunInternal(System.Windows.Window) at System.Windows.Application.Run(System.Windows.Window) at System.Windows.Application.Run() at DragDropTextOps.App.Main()
You need to encapsulate the "story is locked" class in a try/catch block. Here's where you'll handle the exception. You should be able to dismiss the exception and continue on from there. Check with your software development team.
Dave S.
Sorry for the confusion. The "story is locked" message is not from our plugin. It's the message box that comes from iNEWS and whatever exception it is that isn't being caught is crashing WPF which is a Microsoft technology so it is out of our control.
Thanks for the useful information
https://www.themasker.com/
© Copyright 2011 Avid Technology, Inc. Terms of Use | Privacy Policy | Site Map | Find a Reseller