Bug 12975 - Exception from NGit
Summary: Exception from NGit
Status: RESOLVED INVALID
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: 4.0.6
Hardware: PC Linux
: Normal normal
Target Milestone: master
Assignee: Marius Ungureanu
URL:
Depends on:
Blocks:
 
Reported: 2013-07-01 08:30 UTC by Matt
Modified: 2013-08-27 12:16 UTC (History)
3 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 INVALID

Description Matt 2013-07-01 08:30:51 UTC
I get this a lot, at startup and while running. Sometimes it crashes MD completely, sometimes it doesn't:


System.TypeLoadException: Could not load type 'Sharpen.DigestInputStream' from assembly 'NGit'.
  at NGit.Storage.File.RefDirectory.GetPackedRefs () [0x0002b] in /home/calder/tmp/monodevelop/main/external/ngit/NGit/NGit.Storage.File/RefDirectory.cs:915 
  at NGit.Storage.File.RefDirectory.GetRef (System.String needle) [0x00001] in /home/calder/tmp/monodevelop/main/external/ngit/NGit/NGit.Storage.File/RefDirectory.cs:256 
  at NGit.Repository.GetRef (System.String name) [0x00008] in /home/calder/tmp/monodevelop/main/external/ngit/NGit/NGit/Repository.cs:1190 
  at NGit.Repository.GetFullBranch () [0x00001] in /home/calder/tmp/monodevelop/main/external/ngit/NGit/NGit/Repository.cs:1117 
  at NGit.Repository.GetBranch () [0x00001] in /home/calder/tmp/monodevelop/main/external/ngit/NGit/NGit/Repository.cs:1155 
  at MonoDevelop.VersionControl.Git.GitRepository.GetCurrentBranch () [0x00007] in /home/calder/tmp/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs:1176 
  at MonoDevelop.VersionControl.Git.SwitchToBranchHandler.Update (MonoDevelop.Components.Commands.CommandArrayInfo info) [0x00070] in /home/calder/tmp/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/Commands.cs:97 
  at MonoDevelop.Components.Commands.CommandHandler.InternalUpdate (MonoDevelop.Components.Commands.CommandArrayInfo info) [0x00001] in /home/calder/tmp/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandHandler.cs:52 
  at MonoDevelop.Components.Commands.CommandManager.DefaultUpdateCommandInfo (MonoDevelop.Components.Commands.ActionCommand cmd, MonoDevelop.Components.Commands.CommandInfo info) [0x0006c] in /home/calder/tmp/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1272 
  at MonoDevelop.Components.Commands.CommandManager.GetCommandInfo (System.Object commandId, MonoDevelop.Components.Commands.CommandTargetRoute targetRoute) [0x001c2] in /home/calder/tmp/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1240
Comment 1 Marius Ungureanu 2013-07-01 16:55:05 UTC
Could you grab the inner exception for this? This exception doesn't say much.
Comment 2 Matt 2013-07-03 06:49:46 UTC
I ran MD through MD in the debugger and stopped on this exception. The thrown exception had null for it's inner exception member. I tried stopping on all exceptions and this appears to be the only exception being thrown. Can I get a little more guidance one what information you are looking for? Thanks,

Matt
Comment 3 Marius Ungureanu 2013-07-03 09:25:37 UTC
TypeLoad exceptions themselves don't offer that much information.

The only thing I can think of here is that Sharpen output isn't where it should be.

Could you verify that under build/AddIns/VersionControl/ you have NGit, NSch and Sharpen, Sharpen.Unix dlls?

Thanks. ;D
Comment 4 Matt 2013-07-03 09:41:45 UTC
I do:

calder@pharos:~/tmp/monodevelop/main$ ls -l build/AddIns/VersionControl/*.dll
-rwxrwxr-x 1 calder calder 392704 Jul  1 18:33 build/AddIns/VersionControl/ICSharpCode.NRefactory.dll
-rwxrwxr-x 1 calder calder 375296 Jul  1 18:34 build/AddIns/VersionControl/MonoDevelop.VersionControl.dll
-rwxrwxr-x 1 calder calder 222208 Jul  1 18:34 build/AddIns/VersionControl/MonoDevelop.VersionControl.Git.dll
-rwxrwxr-x 1 calder calder 102400 Jul  1 18:34 build/AddIns/VersionControl/MonoDevelop.VersionControl.Subversion.dll
-rwxrwxr-x 1 calder calder  60416 Jul  1 18:34 build/AddIns/VersionControl/MonoDevelop.VersionControl.Subversion.Unix.dll
-rwxrwxr-x 1 calder calder 959488 Jul  1 18:33 build/AddIns/VersionControl/NGit.dll
-rwxrwxr-x 1 calder calder 262144 Jul  1 18:33 build/AddIns/VersionControl/NSch.dll
-rwxrwxr-x 1 calder calder 125440 Jul  1 18:33 build/AddIns/VersionControl/Sharpen.dll
-rwxrwxr-x 1 calder calder   6144 Jul  1 18:33 build/AddIns/VersionControl/Sharpen.Unix.dll

Since I also get these exceptions running from the installed MD (same branch) I checked that and see the same stuff:

calder@pharos:~/tmp/monodevelop/main$ ls -l /usr/lib/monodevelop/AddIns/VersionControl/*.dll
-rwxr-xr-x 1 root root 392704 Jul  1 18:35 /usr/lib/monodevelop/AddIns/VersionControl/ICSharpCode.NRefactory.dll
-rwxr-xr-x 1 root root 375296 Jul  1 18:35 /usr/lib/monodevelop/AddIns/VersionControl/MonoDevelop.VersionControl.dll
-rwxr-xr-x 1 root root 222208 Jul  1 18:35 /usr/lib/monodevelop/AddIns/VersionControl/MonoDevelop.VersionControl.Git.dll
-rwxr-xr-x 1 root root 102400 Jul  1 18:35 /usr/lib/monodevelop/AddIns/VersionControl/MonoDevelop.VersionControl.Subversion.dll
-rwxr-xr-x 1 root root  60416 Jul  1 18:35 /usr/lib/monodevelop/AddIns/VersionControl/MonoDevelop.VersionControl.Subversion.Unix.dll
-rwxr-xr-x 1 root root 959488 Jul  1 18:35 /usr/lib/monodevelop/AddIns/VersionControl/NGit.dll
-rwxr-xr-x 1 root root 262144 Jul  1 18:35 /usr/lib/monodevelop/AddIns/VersionControl/NSch.dll
-rwxr-xr-x 1 root root 125440 Jul  1 18:35 /usr/lib/monodevelop/AddIns/VersionControl/Sharpen.dll
-rwxr-xr-x 1 root root   6144 Jul  1 18:35 /usr/lib/monodevelop/AddIns/VersionControl/Sharpen.Unix.dll
Comment 5 Marius Ungureanu 2013-07-12 11:35:46 UTC
I think you're missing Mono.Cecil.dll from that list.
Comment 6 Marius Ungureanu 2013-08-21 11:30:54 UTC
Any update on this Matt? Mono.Cecil.dll addition should fix this issue.
Comment 7 Marius Ungureanu 2013-08-27 12:00:51 UTC
As we are not responsible for type load exceptions, I'm going to close this.
Comment 8 Marius Ungureanu 2013-08-27 12:16:50 UTC
Changing to INVALID.