Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Index out of range exception
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Philip_L  
View profile  
 More options Feb 14 2010, 7:16 am
From: Philip_L <philip.laure...@gmail.com>
Date: Sun, 14 Feb 2010 04:16:55 -0800 (PST)
Local: Sun, Feb 14 2010 7:16 am
Subject: Index out of range exception
Here's the stack trace:

----
System.ArgumentOutOfRangeException was unhandled
  Message="Index was out of range. Must be non-negative and less than
the size of the collection.\r\nParameter name: index"
  Source="mscorlib"
  ParamName="index"
  StackTrace:
       at
System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32
index)
       at Mono.Cecil.GenericParameterCollection.get_Item(Int32 index)
       at Mono.Cecil.ReflectionReader.GetTypeRefFromSig(SigType t,
GenericContext context)
       at Mono.Cecil.ReflectionReader.CreateTypeSpecFromSig(TypeSpec
ts, Int32 index, GenericContext context)
       at Mono.Cecil.ReflectionReader.GetTypeSpecAt(UInt32 rid,
GenericContext context)
       at Mono.Cecil.Cil.CodeReader.ReadCilBody(MethodBody body,
BinaryReader br)
       at Mono.Cecil.Cil.CodeReader.VisitMethodBody(MethodBody body)
       at Mono.Cecil.MethodDefinition.LoadBody()
       at Mono.Cecil.MethodDefinition.get_Body()
       at LinFu.AOP.Cecil.MethodWeaver.Weave(MethodDefinition method)
in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\MethodWeaver.cs:line 69
       at
LinFu.AOP.Cecil.MethodWeaverVisitor.VisitMethodDefinition(MethodDefinition
method) in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\MethodWeaverVisitor.cs:line 45
       at
LinFu.AOP.Cecil.BaseReflectionVisitor.VisitMethodDefinitionCollection(Metho dDefinitionCollection
methods) in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\BaseReflectionVisitor.cs:line 238
       at
LinFu.AOP.Cecil.BaseReflectionVisitor.VisitTypeDefinition(TypeDefinition
type) in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\BaseReflectionVisitor.cs:line 150
       at
LinFu.AOP.Cecil.MethodWeaverVisitor.VisitTypeDefinition(TypeDefinition
type) in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\MethodWeaverVisitor.cs:line 66
       at
LinFu.AOP.Cecil.BaseReflectionVisitor.VisitTypeDefinitionCollection(TypeDef initionCollection
types) in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\BaseReflectionVisitor.cs:line 274
       at
LinFu.AOP.Cecil.BaseReflectionVisitor.TerminateModuleDefinition(ModuleDefin ition
module) in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\BaseReflectionVisitor.cs:line 14
       at
LinFu.AOP.Cecil.BaseReflectionVisitor.VisitModuleDefinition(ModuleDefinitio n
module) in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\BaseReflectionVisitor.cs:line 62
       at
LinFu.AOP.Cecil.MethodWeaverVisitor.VisitModuleDefinition(ModuleDefinition
module) in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\MethodWeaverVisitor.cs:line 56
       at
LinFu.AOP.Cecil.BaseReflectionVisitor.VisitModuleDefinitionCollection(Modul eDefinitionCollection
modules) in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\BaseReflectionVisitor.cs:line 297
       at
LinFu.AOP.Cecil.BaseReflectionVisitor.VisitAssemblyDefinition(AssemblyDefin ition
asm) in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\BaseReflectionVisitor.cs:line 108
       at
Mono.Cecil.AssemblyDefinition.Accept(IReflectionStructureVisitor
visitor)
       at
LinFu.AOP.Cecil.CecilVisitorExtensions.Accept(IReflectionStructureVisitable
visitable, IMethodWeaver methodWeaver) in C:\Users\Phil\Desktop
\Development\linfu\trunk\src\LinFu.AOP\CecilVisitorExtensions.cs:line
48
       at
LinFu.AOP.Cecil.MethodRewriterExtensions.WeaveWith(IReflectionStructureVisi table
target, IMethodRewriter rewriter, Func`2 filter) in C:\Users\Phil
\Desktop\Development\linfu\trunk\src\LinFu.AOP
\MethodRewriterExtensions.cs:line 24
       at
LinFu.AOP.Cecil.MethodCallInterceptionExtensions.InterceptMethodCalls(IRefl ectionStructureVisitable
target, Func`2 typeFilter, Func`2 hostMethodFilter, Func`2
methodCallFilter) in C:\Users\Phil\Desktop\Development\linfu\trunk\src
\LinFu.AOP\MethodCallInterceptionExtensions.cs:line 72
       at
LinFu.AOP.Cecil.MethodCallInterceptionExtensions.InterceptAllMethodCalls(IR eflectionStructureVisitable
target) in C:\Users\Phil\Desktop\Development\linfu\trunk\src\LinFu.AOP
\MethodCallInterceptionExtensions.cs:line 30
       at PostWeaver.Program.Main(String[] args) in C:\Users\Phil
\Desktop\Development\linfu\trunk\src\PostWeaver\Program.cs:line 39
       at System.AppDomain._nExecuteAssembly(Assembly assembly,
String[] args)
       at System.AppDomain.nExecuteAssembly(Assembly assembly,
String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
       at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

----

The error seems to occur when I use Cecil's visitor model. Is there
any way to fix this? Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jb Evain  
View profile  
 More options Feb 14 2010, 9:46 am
From: Jb Evain <j...@nurv.fr>
Date: Sun, 14 Feb 2010 15:46:50 +0100
Local: Sun, Feb 14 2010 9:46 am
Subject: Re: [mono-cecil] Index out of range exception
Hey,

Actually the issue seems to be in the way Cecil reads a generic type
spec inside a method body. Could you send me the assembly that
contains the method?

--
Jb Evain  <j...@nurv.fr>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »