Bug 4731 - System.InvalidOperationException: Handle is not allocated
Summary: System.InvalidOperationException: Handle is not allocated
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: Trunk
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-04-30 06:06 UTC by Marek Safar
Modified: 2012-12-06 07:43 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 FIXED

Description Marek Safar 2012-04-30 06:06:10 UTC
An unhandled exception has occured. Terminating MonoDevelop? True
System.InvalidOperationException: Handle is not allocated
  at System.Runtime.InteropServices.GCHandle.get_Target () [0x0001b] in /home/marek/git/mono/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs:80 
  at System.WeakReference.get_Target () [0x00000] in /home/marek/git/mono/mcs/class/corlib/System/WeakReference.cs:95 
  at Mono.Addins.ExtensionContext.DisposeChildContext (Mono.Addins.ExtensionContext ctx) [0x0003a] in /home/marek/git/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs:142 
  at Mono.Addins.ExtensionContext.Finalize () [0x0000d] in /home/marek/git/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs:79 
Shutting down finalizer thread timed out.
* Assertion at mono-debug.c:201, condition `table' not met
Comment 1 Darren VanBuren 2012-11-04 00:01:17 UTC
I get this same error intermittently using mdtool to build a VS2010 Solution on FreeBSD 9.0-RELEASE-p3, Mono 2.11.4, MonoDevelop 3.0.2.

MonoDevelop Build Tool
Loading solution: /usr/home/onekopaka/bamboo-data/xml-data/build-dir/SLSD-SLSDDEMO-JOB1/SLSD/SLSD.sln
   Loading solution: /usr/home/onekopaka/bamboo-data/xml-data/build-dir/SLSD-SLSDDEMO-JOB1/SLSD/SLSD.sln
      Loading projects ..

Unhandled Exception:
System.InvalidOperationException: Handle is not allocated
  at System.Runtime.InteropServices.GCHandle.get_Target () [0x0001b] in /usr/ports/lang/mono/work/mono-2.11.4/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs:80
  at System.WeakReference.get_Target () [0x00000] in /usr/ports/lang/mono/work/mono-2.11.4/mcs/class/corlib/System/WeakReference.cs:95
  at Mono.Addins.ExtensionContext.DisposeChildContext (Mono.Addins.ExtensionContext ctx) [0x0003a] in /usr/ports/devel/mono-addins/work/mono-addins-0.6.2/Mono.Addins/Mono.Addins/ExtensionContext.cs:142
  at Mono.Addins.ExtensionContext.Finalize () [0x0000c] in /usr/ports/devel/mono-addins/work/mono-addins-0.6.2/Mono.Addins/Mono.Addins/ExtensionContext.cs:79
Comment 2 Darren VanBuren 2012-11-07 18:26:46 UTC
My issue is much more consistent now. I get this exception every build, however, the build still succeeds.
Comment 3 Alan McGovern 2012-12-06 07:43:19 UTC
This has been fixed in mono-addins and MonoDevelop ships the fixed version.