JB, I am not caching imports so far and I do not have the feeling that I am doing to many imports at all. Cecil is running inside Visual Studio in its own app domain, which is created for each run and the OOM occurs after running this operation several times. The Visual Studio has to be restarted after the error comes once. I have no real idea, esp. because i am throwing away the app domain after each run.
Jan On 4 Aug., 12:13, Jb Evain <[email protected]> wrote: > Hey Jan, > > On Wed, Aug 4, 2010 at 12:04 PM, Jan <[email protected]> wrote: > > I just got an out of memory stack trace from a customer: > > > Error 24 OpenAccess Error: System.OutOfMemoryException: Exception of > > type 'System.OutOfMemoryException' was thrown. > > at System.Reflection.AssemblyName.nToString() > > at > > Mono.Cecil.MetadataImporter.TryGetAssemblyNameReference(AssemblyName > > name, AssemblyNameReference& assembly_reference) > > at Mono.Cecil.MetadataImporter.ImportScope(Assembly assembly) > > at Mono.Cecil.MetadataImporter.ImportType(Type type, > > IGenericContext context, ImportGenericType import_type) > > at Mono.Cecil.ModuleDefinition.Import(Type type) > > > Did you see something like that already? Do you have an idea? > > Either it is a bug in the importer (like looping forever allocating > stuff), or it is «simply» a true OOM, if you're importing over and > over, again an again :) > > Are you caching the results of Import? Cecil 0.9 doesn't right now. > > -- > Jb Evain <[email protected]> -- -- mono-cecil
