Bug 1424 - MonoDevelop 2.8 NullReferenceException on startup
Summary: MonoDevelop 2.8 NullReferenceException on startup
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: 2.8
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2011-10-11 15:08 UTC by abigu3282
Modified: 2012-03-01 06:03 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description abigu3282 2011-10-11 15:08:57 UTC
When I started up MonoDevelop 2.8 after upgrading from 2.6, it pops-up with an error dialog saying unhandled exception with the following message:
System.NullReferenceException: Object reference not set to an instance of an object.

   at MonoDevelop.Ide.Gui.BackgroundProgressMonitor.<>c__DisplayClass5.<OnProgressChanged>b__4(Object , EventArgs )

   at Gtk.Application.InvokeCB.Invoke()

   at GLib.Timeout.TimeoutProxy.Handler()

This dialog pops up a lot of times (hard to keep count). I kept pressing 'Esc' key to exit from the dialog boxes and finally was able to open up a project.
Comment 1 abigu3282 2011-10-11 15:18:04 UTC
Seems like after opening the project MonoDevelop was of no use because as soon as I opened a file I started getting this error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: String was not recognized as a valid Boolean.

   at System.Boolean.Parse(String value)

   at NGit.Util.FS.ReadPipe(FilePath dir, String[] command, String encoding)

   at NGit.Util.FS_Win32_Cygwin.Resolve(FilePath dir, String pn)

   at NGit.BaseRepositoryBuilder`2.LoadConfig()

   at NGit.BaseRepositoryBuilder`2.GetConfig()

   at NGit.BaseRepositoryBuilder`2.GuessWorkTreeOrFail()

   at NGit.BaseRepositoryBuilder`2.SetupWorkTree()

   at NGit.BaseRepositoryBuilder`2.Setup()

   at NGit.Storage.File.FileRepository..ctor(FilePath gitDir)

   at NGit.Storage.File.FileRepository..ctor(String gitDir)

   at MonoDevelop.VersionControl.Git.LocalGitRepository..ctor(String path)

   at MonoDevelop.VersionControl.Git.GitRepository..ctor(FilePath path, String url)

   at MonoDevelop.VersionControl.Git.GitVersionControl.GetRepositoryReference(FilePath path, String id)

   at MonoDevelop.VersionControl.Git.GitVersionControl.GetRepositoryReference(FilePath path, String id)

   at MonoDevelop.VersionControl.VersionControlService.GetRepositoryReference(String path, String id)

   at MonoDevelop.VersionControl.VersionControlService.GetRepository(IWorkspaceObject entry)

   at MonoDevelop.VersionControl.Views.SubviewAttachmentHandler.HandleDocumentOpened(Object sender, DocumentEventArgs e)

   at MonoDevelop.Ide.Gui.Workbench.OnDocumentOpened(DocumentEventArgs e)

   at MonoDevelop.Ide.Gui.Workbench.WrapDocument(IWorkbenchWindow window)

   at MonoDevelop.Ide.Gui.ViewCommandHandlers..ctor(IWorkbenchWindow window)

   at MonoDevelop.Ide.Gui.SdiWorkspaceWindow..ctor(DefaultWorkbench workbench, IViewContent content, Notebook tabControl, TabLabel tabLabel)

   at MonoDevelop.Ide.Gui.DefaultWorkbench.ShowView(IViewContent content, Boolean bringToFront)

   at MonoDevelop.Ide.Gui.LoadFileWrapper.Invoke(String fileName)

   at MonoDevelop.Ide.Gui.Workbench.RealOpenFile(FileOpenInformation openFileInfo)

   at MonoDevelop.Ide.Gui.Workbench.OpenDocument(FilePath fileName, Int32 line, Int32 column, OpenDocumentOptions options, String encoding, IViewDisplayBinding binding)

   at MonoDevelop.Ide.Gui.Workbench.OpenDocument(FilePath fileName, OpenDocumentOptions options)

   at MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectFileNodeCommandHandler.ActivateItem()

   at MonoDevelop.Ide.Gui.Components.NodeCommandHandler.ActivateMultipleItems()

   at MonoDevelop.Ide.Gui.Components.ExtensibleTreeView.ActivateCurrentItem()

   at MonoDevelop.Ide.Gui.Components.ExtensibleTreeView.OnNodeActivated(Object sender, RowActivatedArgs args)

   --- End of inner exception stack trace ---

   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)

   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)

   at System.Delegate.DynamicInvokeImpl(Object[] args)

   at GLib.Signal.ClosureInvokedCB(Object o, ClosureInvokedArgs args)

   at GLib.SignalClosure.Invoke(ClosureInvokedArgs args)

   at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
Comment 2 Mike Krüger 2011-11-15 16:19:40 UTC
The first reported bug is a dupe, I've assigned it to me, but the 2nd one should be fixed.
Comment 3 Alan McGovern 2012-03-01 06:03:09 UTC
Both of these issues should be resolved with MonoDevelop 2.8.8 or higher.