[Mono-dev] Catching NRE in Embedded Mono

Robert Jordan robertj at gmx.net
Mon Jan 9 15:29:34 UTC 2012


Jeff,

On 09.01.2012 16:03, Jeff Ward wrote:
> I'm not personally overriding the SIGSEGV handler (though I may in the
> future) but the Visual Studio debugger may be?  Is that possible?

Definitely. Last time I checked (I don't remember if it was with
VS 2008 or 2010), I had to give up and use WinDbg instead.

Maybe I didn't find the right knob to switch off this behavior...

> I noticed signal chaining was added recently.  Do I need to turn this on /
> off to get the behavior I'm expecting (mono handles most signals on its
> own, before passing them on to the to the native code?)

I believe that chaining would have the same issue.

What may help is setting the env var

	MONO_DEBUG=explicit-null-checks

It instructs the runtime to generate NULL checks and throw "soft"
NullReferenceExceptions.

Robert



More information about the Mono-devel-list mailing list