[Mono-dev] NullReferenceException thrown inside catch

Robert Jordan robertj at gmx.net
Thu Aug 24 09:20:15 EDT 2006


Robert Jordan wrote:
> Hi,
> 
> Janne Rantala wrote:
>> I found out that when NullReferenceException is thrown inside catch
>> clause in embedded environment, Mono crashes. Normally when method is
>> invoked with mono_runtime_invoke, exceptions are stored in MonoObject
>> but somehow this does not happen in this case.
>> This happened when I tried to print out message from InnerException
>> which didn't exist.
>>
>> Here is the code, without that Console.WriteLine it works ok
>> (exception is stored in MonoObject).
> 
> 
> Here is another simple sample:
> 
> public void CrashMe ()
> {
> 	null.Equals (null);
> }
> 
> 
> It seems that a "true" SIGSEGV (generated by native JIT code)
> cannot be caught by mono_runtime_invoke ().
> 
> Please file a bug, if no one objects (it could be by design).

Oh, it's a Windows problem. I cannot reproduce it under Linux.

Robert




More information about the Mono-devel-list mailing list