cake-build / cake-vs

Cake Extension for Visual Studio
https://marketplace.visualstudio.com/items?itemName=vs-publisher-1392591.CakeforVisualStudio
MIT License
67 stars 25 forks source link

Bug trying to edit empty build.cake file on visual studio 2017 #81

Closed jrgcubano closed 5 years ago

jrgcubano commented 7 years ago

Aplicación: devenv.exe Versión de Framework: v4.0.30319 Descripción: el proceso terminó debido a una excepción no controlada. Información de la excepción: System.NullReferenceException en Cake.VisualStudio.Helpers.Extensions.RequiresOffset(Microsoft.VisualStudio.Text.ITextSnapshotLine, System.String[]) en Cake.VisualStudio.Editor.SmartIndent.GetDesiredIndentation(Microsoft.VisualStudio.Text.ITextSnapshotLine) en Microsoft.VisualStudio.Text.Editor.Implementation.SmartIndentationService.GetDesiredIndentation(Microsoft.VisualStudio.Text.Editor.ITextView, Microsoft.VisualStudio.Text.ITextSnapshotLine) en Microsoft.VisualStudio.Text.Editor.Implementation.CaretElement.MapXCoordinate(Microsoft.VisualStudio.Text.Formatting.ITextViewLine, Double, Boolean) en Microsoft.VisualStudio.Text.Editor.Implementation.CaretElement.MoveTo(Microsoft.VisualStudio.Text.Formatting.ITextViewLine, Double, Boolean) en Microsoft.VisualStudio.Text.Editor.Implementation.CaretElement.MoveTo(Microsoft.VisualStudio.Text.Formatting.ITextViewLine, Double) en Microsoft.VisualStudio.Text.Operations.Implementation.EditorOperations.MoveCaret(Microsoft.VisualStudio.Text.Formatting.ITextViewLine, Double, Boolean) en Microsoft.VisualStudio.Text.Editor.Implementation.MasterMouseProcessor.HandleMouseLeftButtonDown(Boolean, Boolean, System.Windows.Point) en Microsoft.VisualStudio.Text.Editor.Implementation.MasterMouseProcessor.DefaultMouseLeftButtonDownHandler(System.Object, System.Windows.Input.MouseButtonEventArgs) en Microsoft.VisualStudio.Text.Utilities.WpfMouseProcessor+<>cDisplayClass34_0.b1() en Microsoft.VisualStudio.Text.Utilities.WpfMouseProcessor.MouseProcessorHandler(System.Windows.RoutedEventArgs, System.Action1<Microsoft.VisualStudio.Text.Editor.IMouseProcessor>, System.Action, System.Action1) en Microsoft.VisualStudio.Text.Utilities.WpfMouseProcessor.UIElement_MouseLeftButtonDown(System.Object, System.Windows.Input.MouseButtonEventArgs) en System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object) en System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object) en System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs) en System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) en System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent) en System.Windows.UIElement.OnMouseDownThunk(System.Object, System.Windows.Input.MouseButtonEventArgs) en System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object) en System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object) en System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs) en System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) en System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs) en System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs) en System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean) en System.Windows.Input.InputManager.ProcessStagingArea() en System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs) en System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport) en System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32) en System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef) en System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) en MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) en MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) en System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) en System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) en System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) en MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

jrgcubano commented 7 years ago

It only happens when the file is empty

agc93 commented 5 years ago

This behaviour should now have been resolved by #92.

Please reopen this issue if you are still seeing this issue with the latest prerelease version.