Sorry, should have read better, now understand why HideBySig likely
isn't their relation.

I'm trying to find what is the reason this happens, and I can't find
what is special about the methods causing the crashes.

For example:
System.Net.Sockets.Socket::Receive(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags)
Crashes width:  Object reference not set to an instance of an object

But
System.Net.Sockets.Socket::Receive(System.Byte[],System.Int32,System.Net.Sockets.SocketFlags)
Doesn't?

When looking at their code, I can't find the difference causing these
crashes..

On Dec 26, 1:53 pm, Davy Landman <[email protected]> wrote:
> 99% of methods where it crashes on, are HideBySig. So I'm guessing
> something special about them which the visitor can't handle?
>
> But if I exclude them, these remain:
> System.Void System.Collections.Generic.SortedDictionary`2/
> NodeHelper::.cctor()
> System.Void System.Collections.Generic.SortedList`2::.cctor()
> System.Void System.Collections.Generic.SortedList`2/
> Enumerator::.cctor()
>
> But the exception changes.. So a different cause perhaps? (although
> still related to generic parameters)
>
> It is now a NotSupportedException, caused by an empty context.
>
>                 GenericParameter GetGenericParameter (GenericParameterType 
> type,
> uint var)
>                 {
>                         var context = reader.context;
>
>                         if (context == null)
>                                 throw new NotSupportedException ();
>
> StackTrace:
> Mono.Cecil.SignatureReader.GetGenericParameter
> (type=Mono.Cecil.GenericParameterType.Type, var=0) in
> Mono.Cecil.SignatureReader.ReadTypeSignature
> (etype=Mono.Cecil.Metadata.ElementType.Var) in
> Mono.Cecil.SignatureReader.ReadTypeSignature () in
> Mono.Cecil.SignatureReader.ReadGenericInstanceSignature
> (provider={System.Collections.Generic.Comparer`1},
> instance={System.Collections.Generic.Comparer`1<>}) in
> Mono.Cecil.SignatureReader.ReadTypeSignature
> (etype=Mono.Cecil.Metadata.ElementType.GenericInst) in
> Mono.Cecil.SignatureReader.ReadTypeSignature () in
> Mono.Cecil.MetadataReader.GetTypeSpecification (rid=42) in
> Mono.Cecil.MetadataReader.LookupToken (token={[TypeSpec:0x002a]}) in
> Mono.Cecil.MetadataReader.GetTypeDefOrRef (token={[TypeSpec:0x002a]})
> in
> Mono.Cecil.MetadataReader.ReadTypeMemberReference (type={[TypeSpec:
> 0x002a]}, name=, signature=) in
> Mono.Cecil.MetadataReader.ReadMemberReference (rid=429) in
> Mono.Cecil.MetadataReader.GetMemberReference (rid=429) in
> Mono.Cecil.MetadataReader.LookupToken (token={[MemberRef:0x01ad]}) in
> Mono.Cecil.Rocks.ILParser.ParseCode (code_size=16,
> context={Mono.Cecil.Rocks.ILParser.ParseContext}) in
> Mono.Cecil.Rocks.ILParser.Parse (method={System.Void
> System.Collections.Generic.SortedDictionary`2/NodeHelper::.cctor()},
> visitor={CrashMethodParser.MainClass.EmptyVisitor}) in
>
> (code to find them:)
> foreach (var m in mod.GetAllTypes().SelectMany(t =>
> t.Methods).Where(mt => mt.HasBody && !mt.IsHideBySig))
> {
>   try {
>     ILParser.Parse(m, new EmptyVisitor());
>   } catch () {
>     Console.WriteLine(m.FullName);
>   }
>
> }
>
> The (by mono develop decompiled) source of the first constructor is
> not that complicated:
> private void .ctor(IComparer<TKey> cmp)
> {
>         this..ctor();
>         this.cmp = cmp;
>
> }
>
> so what could cause these exceptions?
>
> On Dec 26, 1:26 am, Davy Landman <[email protected]> wrote:
>
>
>
>
>
>
>
> > ...

-- 
--
mono-cecil

Reply via email to