Closed guylando closed 7 years ago
When executing anything in the demo http://roslynquoter.azurewebsites.net/ I get:
System.OutOfMemoryException: Insufficient memory to continue the execution of the program. at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb) at System.Reflection.Internal.NativeHeapMemoryBlock..ctor(Int32 size) at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Boolean isFileStream, Int64 start, Int32 size) at System.Reflection.PortableExecutable.PEReader..ctor(Stream peStream, PEStreamOptions options, Int32 size) at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options) at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation) at Microsoft.CodeAnalysis.Scripting.Hosting.RuntimeMetadataReferenceResolver.<>c.<.ctor>b__8_0(String path, MetadataReferenceProperties properties) at Microsoft.CodeAnalysis.Scripting.Hosting.RuntimeMetadataReferenceResolver.CreateResolvedMissingReference(String fullPath) at Microsoft.CodeAnalysis.Scripting.Hosting.RuntimeMetadataReferenceResolver.ResolveMissingAssembly(MetadataReference definition, AssemblyIdentity referenceIdentity) at Microsoft.CodeAnalysis.CommonReferenceManager`2.ResolveAndBindMissingAssemblies(TCompilation compilation, ImmutableArray`1 explicitAssemblies, ImmutableArray`1 explicitModules, ImmutableArray`1 explicitReferences, ImmutableArray`1 explicitReferenceMap, MetadataReferenceResolver resolver, MetadataImportOptions importOptions, Boolean supersedeLowerVersions, ArrayBuilder`1 referenceBindings, Dictionary`2 assemblyReferencesBySimpleName, ImmutableArray`1& allAssemblies, ImmutableArray`1& metadataReferences, ImmutableArray`1& resolvedReferences, DiagnosticBag resolutionDiagnostics) at Microsoft.CodeAnalysis.CommonReferenceManager`2.Bind(TCompilation compilation, ImmutableArray`1 explicitAssemblies, ImmutableArray`1 explicitModules, ImmutableArray`1 explicitReferences, ImmutableArray`1 explicitReferenceMap, MetadataReferenceResolver resolverOpt, MetadataImportOptions importOptions, Boolean supersedeLowerVersions, Dictionary`2 assemblyReferencesBySimpleName, ImmutableArray`1& allAssemblies, ImmutableArray`1& implicitlyResolvedReferences, ImmutableArray`1& implicitlyResolvedReferenceMap, DiagnosticBag resolutionDiagnostics, Boolean& hasCircularReference, Int32& corLibraryIndex) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.ReferenceManager.CreateAndSetSourceAssemblyFullBind(CSharpCompilation compilation) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.ReferenceManager.CreateSourceAssemblyForCompilation(CSharpCompilation compilation) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.BindScriptClass() at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at System.Lazy`1.get_Value() at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetEntryPointAndDiagnostics(CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetEntryPoint(CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.CommonGetEntryPoint(CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.ScriptBuilder.Build[T](Compilation compilation, DiagnosticBag diagnostics, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.ScriptBuilder.CreateExecutor[T](ScriptCompiler compiler, Compilation compilation, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.Script`1.GetExecutor(CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.Script`1.RunAsync(Object globals, Func`2 catchException, CancellationToken cancellationToken) at Quoter.Evaluate(String apiCallString, Boolean normalizeWhitespace) at Quoter.AddModifyingCall(ApiCall apiCall, MethodCall methodCall) at Quoter.AddModifyingCalls(Object treeElement, ApiCall apiCall, List`1 values) at Quoter.QuoteNode(SyntaxNode node, String name) at Quoter.Quote(Object treeElement, String name) at Quoter.Quote(SyntaxNode node) at QuoterService.Controllers.QuoterController.Get(String sourceText, NodeKind nodeKind, Boolean openCurlyOnNewLine, Boolean closeCurlyOnNewLine, Boolean preserveOriginalWhitespace, Boolean keepRedundantApiCalls, Boolean avoidUsingStatic)
Thanks, I've restarted the service, let me know if you still see this.
When executing anything in the demo http://roslynquoter.azurewebsites.net/ I get: