Weeble.
Thanks for pointing to the implementation of Type.GetMethod; I was taking the 
error message at face value indeed.
And agreed on where to look for an issue; I phrased my concern with the error 
message very poorly, and naturally Mono's GC as such is a long way down the 
list of things to look at.
Looking at the C# code only, neither the array nor its elements can possibly be 
null, but combining your remarks with Ian Norton's hint at a modified 
closure... that could be it.

Thanks

From: Weeble [mailto:[email protected]]
Sent: Thursday, 14 March 2013 6:50 PM
To: Perraud, Jean-Michel (CLW, Black Mountain)
Cc: [email protected]
Subject: Re: [Mono-list] Seemingly impossible null reference exception running 
managed code with embedded Mono on Linux


On 14 Mar 2013 02:34, 
<[email protected]<mailto:[email protected]>> wrote:
> If anything I can only suspect an incorrect garbage collection on the 
> variable 'Type[] types', unlikely as it is.

That strikes me as improbable. Such a bug would be very likely to have been 
observed before. Have a look at System.Types.GetMethod - it throws that 
exception not just when types == null, but also when any element in types is 
null. I think a more likely source of the bug is an access to uninitialized 
memory, a use-after-free or an array overflow somewhere in the native code of 
the R to CLR library, leading to a null value in the array. I would try to rule 
that out long before looking at the garbage collector.
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to