Crash when you use mouse & keyboard arrow keys together.

Abierto
#92 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
csharp
Área
desktop

Línea de trabajo

Comienza reproduciendo los pasos de la aplicación de ejemplo de Windows y, después, inspecciona PlacementOperation.Abort(), MoveLogic.Cancel() y DragMoveMouseGesture.OnStopped(), mencionados en el stack trace. Compara el comportamiento con el commit propuesto enlazado en el issue. La tarea estará terminada cuando combinar el arrastre del ratón con una tecla de flecha y soltar el ratón ya no provoque un PlacementOperationException.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

I found a bug you use your mouse and keyboard up/down/left/right arrow keys together.

To Reproduce:

  1. Start Sample application on Windows.
  2. Maximize Main Window.
  3. Drop a Button on Design Service in Center of Screen.
  4. Move to Center of button with mouse pointer.
  5. Press primary mouse button to start moving/dragging button.
  6. While still holding primary mouse button move left or right with your mouse so that the button moves to a new location (do not release primary mouse button).
  7. Then Either Press and hold Left, Right, Up or Down Arrow key on Keyboard, while still holding the primary mouse button down
  8. Depress/Release primary mouse button.
  9. App Crashes. See below stack trace.

StackTrace:

`PlacementOperation is committed.
at ICSharpCode.WpfDesign.PlacementOperation.Abort()
at ICSharpCode.WpfDesign.Designer.Services.MoveLogic.Cancel()
at ICSharpCode.WpfDesign.Designer.Services.DragMoveMouseGesture.OnStopped()
at ICSharpCode.WpfDesign.Designer.Services.MouseGestureBase.Stop()
at ICSharpCode.WpfDesign.Designer.Services.MouseGestureBase.OnLostMouseCapture(Object sender, MouseEventArgs e)
at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
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.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.MouseDevice.ChangeMouseCapture(IInputElement mouseCapture, IMouseInputProvider providerCapture, CaptureMode captureMode, Int32 timestamp)
at System.Windows.Input.MouseDevice.PreNotifyInput(Object sender, NotifyInputEventArgs e)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

[ICSharpCode.WpfDesign.PlacementOperation+PlacementOperationException] - PlacementOperation is committed.
`

I have also done my own fix: here: https://github.com/CorrieMeyer/WpfDesigner/commit/469f6a36c4806d8a8f3d2c6f7af1551b8a1da43d

Not sure if it is the correct way, but if your happy with it I will do a pull request for the fix.

Lenguaje dominante
C#
Estrellas
1.1k
Forks
281
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de icsharpcode/WpfDesigner

Todos los issues de icsharpcode/WpfDesigner

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.