I’m currently working through the Penelope tutorial, and every time I make a new UnityScript file (either through Unity or MonoDevelop) and then try editing said file an error box pops up with the message, “Error in text editor extension chain.”
The “details” box shows this:
System.NullReferenceException: Object reference not set to an instance of an object
at Boo.MonoDevelop.Util.Completion.BooCompletionTextEditorExtension.IsInsideComment (System.String line, Int32 offset) [0x00000] in :0
at UnityScript.MonoDevelop.Completion.UnityScriptEditorCompletion.HandleCodeCompletion (MonoDevelop.Ide.CodeCompletion.CodeCompletionContext context, Char completionChar, System.Int32& triggerWordLength) [0x00000] in :0
at MonoDevelop.Ide.Gui.Content.CompletionTextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x000da] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs:128
at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115
at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115
at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115
at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115
at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115
at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00013] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:115
at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress (Key key, UInt32 ch, ModifierType state) [0x00000] in /BuildAgent/work/976433a72acbefb1/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs:257
After clicking OK, I can continue typing but autocomplete/code completion/intellisense/whatever you want to call it doesn’t work at all. I’ve been able to get around this by completely restarting both Unity and MonoDevelop after creating the new file, but that has stopped working. A system restart didn’t fix it.
As far as I can tell this only happens with new files, because I can select a file that I created earlier and edit it with no problems.
I’m using a 2009 Macbook Pro running Mountain Lion (10.8) with 8Gb of RAM.
EDIT: The error comes up again any time I type an open parenthesis. Example: If I type “function Update(,” the instant I type the ( the error window comes up again.