Bug 10334 - ASP.NET Debuggee returned error code ERR_UNLOADED
Summary: ASP.NET Debuggee returned error code ERR_UNLOADED
Status: RESOLVED DUPLICATE of bug 8746
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 3.1.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2013-02-15 17:46 UTC by Jeffrey Stedfast
Modified: 2013-02-18 16:30 UTC (History)
1 user (show)

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:

Description Jeffrey Stedfast 2013-02-15 17:46:48 UTC
A user on the forums reported:

I'm getting this error when running an ASP.NET MVC 3 project:

Mono.Debugger.Soft.CommandException: Debuggee returned error code ERR_UNLOADED. at Mono.Debugger.Soft.VirtualMachine.ErrorHandler (System.Object sender, Mono.Debugger.Soft.ErrorHandlerEventArgs args) [0x00080] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/b0388490/source/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs:303 at Mono.Debugger.Soft.Connection.SendReceive (CommandSet command_set, Int32 command, Mono.Debugger.Soft.PacketWriter packet) [0x000d5] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/b0388490/source/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1444 at Mono.Debugger.Soft.Connection.EnableEvent (EventType etype, SuspendPolicy suspend_policy, System.Collections.Generic.List1 mods) [0x0033f] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/b0388490/source/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:2188 
  at Mono.Debugger.Soft.EventRequest.SendReq (System.Collections.Generic.List1 mods) [0x000a4] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/b0388490/source/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs:106 at Mono.Debugger.Soft.ExceptionEventRequest.Enable () [0x0004e] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/b0388490/source/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs:32 at Mono.Debugging.Soft.SoftDebuggerSession.UpdateAssemblyFilters (Mono.Debugger.Soft.AssemblyMirror asm) [0x000a4] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/b0388490/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:1940 at Mono.Debugging.Soft.SoftDebuggerSession.HandleEvent (Mono.Debugger.Soft.Event e) [0x0005e] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/b0388490/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:1304 at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet (Mono.Debugger.Soft.EventSet es) [0x0009c] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/b0388490/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:1159 at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler () [0x0002d] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/b0388490/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:1090
Comment 1 Mikayla Hutchinson [MSFT] 2013-02-15 18:51:27 UTC
It looks to me like we have an assembly load event, and we detect it's a user assembly, and add it to the the user assembly list, and assign that to the unhandledExceptionRequest's assembly filters.

The reason for the error is that we never REMOVE assemblies from user assembly list when they're unloaded, so the user assembly list can contain AssemblyMirrors for assemblies that have been unloaded

TBH I'm not sure why we're filtering the unhandled exception handler to user assemblies at all - they're unhandled, it doesn't matter where they came from. This may also explain the various bugs that keep on getting filed about certain unhandled exceptions not getting caught by the debugger.
Comment 2 Jeffrey Stedfast 2013-02-18 16:30:39 UTC

*** This bug has been marked as a duplicate of bug 8746 ***