[Mono-dev] Too many open files when adding many embedded resources
Geoff Norton
gnorton at novell.com
Tue Dec 14 20:55:56 EST 2010
Tom,
If you .Close and .Dispose the stream, does the issue resolve itself?
-g
On 2010-12-14, at 7:24 PM, Tom Philpot wrote:
> Building Mono 2.9 from git master, we're encountering an issue where an assembly with lots of embedded resources (approx 4000), where gmcs is throwing "Too many open files exception".
>
> The culprit seems to be that a new file handle is opened for every embedded resource when it's added. Mono 2.6 doesn't have this problem, so it appears to be a regression
>
> Assembly.cs line 730:
> if (res.IsEmbeded) {
> var stream = File.OpenRead (res.FileName);
> module.Builder.DefineManifestResource (res.Name, stream, res.Attributes);
> } else {
> Builder.AddResourceFile (res.Name, Path.GetFileName (res.FileName), res.Attributes);
> }
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20101214/2a8f11fd/attachment.html
More information about the Mono-devel-list
mailing list