I'm getting a stack overflow error when concatenating a bunch of files using
PdfWriter. This occurs in Tree.cs (/trunk/src/coreSystem/util/Collections)
where the private Insert member appears to get into a state where it calls
itself recursively until an exception occurs.
At the time of death, the Call Stack window shows nothing but recursive
Insert calls (1000 call deep). Initially, I got the error using default
stack size, but I've since moved the concat operation into a separate thread
with 8 MB of stack which I would think should suffice unless there is a bug
somewhere.
My concat code basically calls GetImportedPage followed by AddTemplate on
the DirectContent for every page in every file. This particular job has just
over 11,000 small files. It appears that the failure happens while closing
the writer. If I reduce the number of files down to approx. 6,000, the job
will complete successfully. There is plenty of memory available for the job,
and no shortage of disk space. I close and null the PdfReader after each
file concatenation.
I believe I've seen similar behavior before using PdfStamper and PdfCopy,
but not with the Writer. I'm using the 4.1.2 release code for this. I'm
about to test with PdfSmartCopy with Paulo's latest SVN patch - if that does
not fail it might give us a clue.
Any advice and/or help would be appreciated.
Thanks - Gylfi
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org_______________________________________________
itextsharp-questions mailing list
itextsharp-questions@...
https://lists.sourceforge.net/lists/listinfo/itextsharp-questions