Project

Profile

Help

Memory Leak - Saxon.net HE 9.3.0.4N/9.3.0.5N

Added by Anonymous almost 13 years ago

Legacy ID: #10230207 Legacy Poster: Reunisoft 974 Security Apps (reunisoft)

Hello In a VS.NET 2010 C# app that transforms a huge amount of files, after approximatively 1000/1005 transformations I have the following error on a 2GB machine : Message"Une exception de type 'System.OutOfMemoryException' a été levée."string Source"saxon9he"string StackTrace" à org.apache.xerces.parsers.XML11Configuration.parse(XMLInputSource xmlis)\r\n à org.apache.xerces.parsers.XMLParser.parse(XMLInputSource xmlis)\r\n à org.apache.xerces.parsers.AbstractSAXParser.parse(InputSource is)\r\n à org.apache.xerces.jaxp.SAXParserImpl.JAXPSAXParser.parse(InputSource is)\r\n à net.sf.saxon.event.Sender.sendSAXSource(SAXSource , Receiver , ParseOptions )\r\n à net.sf.saxon.event.Sender.send(Source source, Receiver receiver, ParseOptions options)\r\n à net.sf.saxon.Configuration.buildDocument(Source source, ParseOptions parseOptions)\r\n à net.sf.saxon.Configuration.buildDocument(Source source)\r\n à Saxon.Api.DocumentBuilder.Build(Stream input, Uri baseUri)\r\n à Saxon.Api.DocumentBuilder.Build(Uri uri)\r\n à SAXONTEST.Program.TransformSaxon(String InFilePath, String XslFilePath, String outPath, String outFile) dans C:\_TESTAPP\SAXONTEST\Program.cs:ligne 49\r\n à SAXONTEST.Program.Main(String[] args) dans C:\_TESTAPP\SAXONTEST\Program.cs:ligne 280"string Any help would be appreciated if possible :) Thanks !!!


Replies (3)

Please register to reply

RE: Memory Leak - Saxon.net HE 9.3.0.4N/9.3.0.5N - Added by Anonymous almost 13 years ago

Legacy ID: #10230245 Legacy Poster: Michael Kay (mhkay)

You'll need to provide a bit more information. Are you running lots of separate transformations each on one file, or a single transformation that reads lots of files using the doc() or collection() functions? It's likely that the documents are being cached somewhere and that you need to clear the cache, but exactly how to achieve this depends on the details of the workload. It's not a memory leak, by the way. It's just using more memory than you have available.

RE: Memory Leak - Saxon.net HE 9.3.0.4N/9.3.0.5N - Added by Anonymous almost 13 years ago

Legacy ID: #10230248 Legacy Poster: Reunisoft 974 Security Apps (reunisoft)

Sorry it is now resolved ! Before I was doing : if (transformer == null) transformer = processor.NewXsltCompiler().Compile(new Uri(XslFilePath)).Load(); Resolved by : transformer = processor.NewXsltCompiler().Compile(new Uri(XslFilePath)).Load(); :) Saxon.net is a really powerful solution.

RE: Memory Leak - Saxon.net HE 9.3.0.4N/9.3.0.5N - Added by Anonymous almost 13 years ago

Legacy ID: #10230253 Legacy Poster: Reunisoft 974 Security Apps (reunisoft)

mhkay, you are right. this is not a memory leak. this was a problem in my code. Now resolved as I wrote previously. Thanks anyway for the really quick answer :) :) :)

    (1-3/3)

    Please register to reply