Bug 5287 - TypeLoadException does not indicate which assembly is missing + debugger does not break
Summary: TypeLoadException does not indicate which assembly is missing + debugger does...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-05-23 14:56 UTC by David Roth
Modified: 2012-05-23 15:53 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 GitHub or Developer Community 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 David Roth 2012-05-23 14:56:11 UTC
When your program requires an assembly which cannot be loaded, mono throws a System.TypeLoadException, so far so good.

Until Mono 2.6 (? or 2.4, not sure), the console output included the type and assembly name which cannot be loaded. In the latest mono releases the only message you get is this:

---
Unhandled Exception: System.TypeLoadException: A type load exception has occurred.
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: A type load exception has occurred.
---

But there is no additional debug-info.Also when i debug the solution in Monodevelop, this is the only message i get (the debugger does not break on the location where the type is required).  It would be nice if the error-info would include the Assembly+Type which is missing (like in the previous mono versions) + the debugger would break.
Comment 1 Zoltan Varga 2012-05-23 15:07:54 UTC
As a workaround, run with MONO_LOG_LEVEL=debug to display this information.
Comment 2 Zoltan Varga 2012-05-23 15:53:03 UTC
Should be fixed in master.