Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:q crashes VS for Mac #237

Closed
bsermons opened this issue Oct 30, 2018 · 9 comments
Closed

:q crashes VS for Mac #237

bsermons opened this issue Oct 30, 2018 · 9 comments

Comments

@bsermons
Copy link

VS for Mac always crashes for me when trying to close the current tab with :q.

Visual Studio 2017 for Mac 7.6.10 (build 27)
Build Information
Release ID: 706100027
Git revision: 94dbd4d35daaa5a2ff6a51c3fd5cbb2308bd83ea
Build date: 2018-10-18 16:34:31+00
Build branch: release-7.6
Xamarin extensions: 3a9afc960ba73e5862829e8a0cd9369bcca43d70

ERROR [2018-10-30 08:37:31Z]: Error in text editor extension chain
System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.SourceEditor.SourceEditorView.MonoDevelop.Ide.Editor.ITextEditorImpl.get_Carets () [0x00000] in /Users/vsts/agent/2.140.2/work/1/s/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs:2888 
  at MonoDevelop.Ide.Editor.TextEditor.get_Carets () [0x00000] in /Users/vsts/agent/2.140.2/work/1/s/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditor.cs:188 
  at MonoDevelop.Ide.Editor.TextEditor.get_CaretLine () [0x00000] in /Users/vsts/agent/2.140.2/work/1/s/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditor.cs:213 
  at XSVim.VimHelpers.getRange (XSVim.VimState vimState, MonoDevelop.Ide.Editor.TextEditor editor, XSVim.VimAction command) [0x00000] in <5bcd04692429f754a74503836904cd5b>:0 
  at XSVim.Vim.processCommands@849 (XSVim.VimState vimState, MonoDevelop.Ide.Editor.TextEditor editor, XSVim.VimAction command, System.Int32 count, XSVim.VimState vimState@849, XSVim.VimAction command@849-1, System.Boolean isInitial) [0x00000] in <5bcd04692429f754a74503836904cd5b>:0 
  at XSVim.Vim.runCommand (XSVim.VimState vimState, MonoDevelop.Ide.Editor.TextEditor editor, XSVim.VimAction command) [0x0001d] in <5bcd04692429f754a74503836904cd5b>:0 
  at XSVim.Vim.performActions@1720 (MonoDevelop.Ide.Editor.TextEditor editor, Microsoft.FSharp.Collections.FSharpList`1[T] actions', XSVim.VimState state, System.Boolean handled) [0x0003b] in <5bcd04692429f754a74503836904cd5b>:0 
  at XSVim.Vim.handleKeyPress (XSVim.VimState state, MonoDevelop.Ide.Editor.Extension.KeyDescriptor keyPress, MonoDevelop.Ide.Editor.TextEditor editor, XSVim.Config config) [0x002a8] in <5bcd04692429f754a74503836904cd5b>:0 
  at XSVim.XSVim.KeyPress (MonoDevelop.Ide.Editor.Extension.KeyDescriptor descriptor) [0x0005c] in <5bcd04692429f754a74503836904cd5b>:0 
  at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress (Gdk.Key key, System.UInt32 ch, Gdk.ModifierType state) [0x0003a] in /Users/vsts/agent/2.140.2/work/1/s/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs:276
@nosami
Copy link
Owner

nosami commented Oct 30, 2018

Can't figure out why that would happen and I can't reproduce it either. I should be able to work around it though

@nosami
Copy link
Owner

nosami commented Oct 30, 2018

@bsermons Does <C-w>c crash too? How about :q!? They each have slightly different ways of closing the tab.

@nosami nosami closed this as completed in 6945c61 Oct 30, 2018
@bsermons
Copy link
Author

<C-w>c works fine. :q! also causes a crash though.

Thanks for looking into it.

@nosami
Copy link
Owner

nosami commented Oct 30, 2018

Hmm, ok... I just pushed a build (0.63.1) that should appear here https://github.com/nosami/XSVim/releases once Travis has finished building. You can install it manually from the .mpack file.

Let me take a look at q! now too.

@nosami
Copy link
Owner

nosami commented Oct 30, 2018

I just released 0.63.2 to the Releases feed https://github.com/nosami/XSVim/releases/download/0.63.2/XSVim.XSVim_0.63.2.mpack

Please let me know if this works for you. If it does, I'll post it to the public feed.

Thanks!

@nosami
Copy link
Owner

nosami commented Oct 30, 2018

Install with Visual Studio -> Extensions -> Install from file

@bsermons
Copy link
Author

I'm still getting the same behavior unfortunately after loading 0.63.2.
Here is new stack trace for :q, which looks almost identical as before:

ERROR [2018-10-30 12:52:05Z]: Error in text editor extension chain
System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.SourceEditor.SourceEditorView.MonoDevelop.Ide.Editor.ITextEditorImpl.get_Carets () [0x00000] in /Users/vsts/agent/2.140.2/work/1/s/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs:2888 
  at MonoDevelop.Ide.Editor.TextEditor.get_Carets () [0x00000] in /Users/vsts/agent/2.140.2/work/1/s/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditor.cs:188 
  at MonoDevelop.Ide.Editor.TextEditor.get_CaretLine () [0x00000] in /Users/vsts/agent/2.140.2/work/1/s/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditor.cs:213 
  at XSVim.VimHelpers.getRange (XSVim.VimState vimState, MonoDevelop.Ide.Editor.TextEditor editor, XSVim.VimAction command) [0x00000] in <5bd8929c2429f754a74503839c92d85b>:0 
  at XSVim.Vim.processCommands@849 (XSVim.VimState vimState, MonoDevelop.Ide.Editor.TextEditor editor, XSVim.VimAction command, System.Int32 count, XSVim.VimState vimState@849, XSVim.VimAction command@849-1, System.Boolean isInitial) [0x00000] in <5bd8929c2429f754a74503839c92d85b>:0 
  at XSVim.Vim.runCommand (XSVim.VimState vimState, MonoDevelop.Ide.Editor.TextEditor editor, XSVim.VimAction command) [0x0001d] in <5bd8929c2429f754a74503839c92d85b>:0 
  at XSVim.Vim.performActions@1723 (MonoDevelop.Ide.Editor.TextEditor editor, Microsoft.FSharp.Collections.FSharpList`1[T] actions', XSVim.VimState state, System.Boolean handled) [0x0003b] in <5bd8929c2429f754a74503839c92d85b>:0 
  at XSVim.Vim.handleKeyPress (XSVim.VimState state, MonoDevelop.Ide.Editor.Extension.KeyDescriptor keyPress, MonoDevelop.Ide.Editor.TextEditor editor, XSVim.Config config) [0x002a8] in <5bd8929c2429f754a74503839c92d85b>:0 
  at XSVim.XSVim.KeyPress (MonoDevelop.Ide.Editor.Extension.KeyDescriptor descriptor) [0x0006e] in <5bd8929c2429f754a74503839c92d85b>:0 
  at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress (Gdk.Key key, System.UInt32 ch, Gdk.ModifierType state) [0x0003a] in /Users/vsts/agent/2.140.2/work/1/s/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs:276 

If you could give me some hints how to load the extension after building from source then I could look at it more in a couple of days when I have more time so you don't have to run around in circles on a bug you can't reproduce.

Thanks again for the help so far.

@nosami
Copy link
Owner

nosami commented Oct 30, 2018

I can repro now with the latest code :)

image

I should definitely write up some dev notes at some point though.

@nosami nosami reopened this Oct 30, 2018
@nosami nosami closed this as completed in e552b5c Oct 30, 2018
@nosami
Copy link
Owner

nosami commented Oct 30, 2018

@bsermons Please give 0.63.3 a try when once it finishes building. I removed the errors from the XSVim addin, but there are still some null references in VSMac core code that I don't seem to be able to prevent. Seems to work ok for me though.

Feel free to reopen if you are still having issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants