Got Out of Memory exceptions

Conversion to pdf thrown out of memory exceptions with different stack trace when we converted bunch of office files through service. We used Aspose.cells 7.0.2.0 , Aspose Slides5.6 and Aspose.words 10.6. Following are those exceptions. Some of them failed with chinese\japanese characters and those files are attached. Please provide fix for this asap.

No. of occurences:7

1/20/2012 4:30:51 AM
Message: HandlingInstanceID: a1ac4beb-9eaa-433f-9d73-831200d0695f

An exception of type 'System.OutOfMemoryException' occurred and was caught.
2012-01-19 23:30:51Z
System.OutOfMemoryException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Exception of type 'System.OutOfMemoryException' was thrown.
mscorlib in file: C:\WINDOWS\TEMP\IntraLinks\e421ac77-5ada-4a3f-ad00-397db49fa1e5.xlsx

System.Collections.ListDictionaryInternal
System.String CtorCharArrayStartLength(Char[], Int32, Int32)
at System.String.CtorCharArrayStartLength(Char[] value, Int32 startIndex, Int32 length)
at System.Xml.XmlTextReaderImpl.NodeData.get_StringValue()
at System.Xml.XmlTextReaderImpl.get_Value()
at System.Xml.XmlTextReader.get_Value()
at xabb58b8f2887ff8e.x7661ca2b53df3da9.xb953ef709de3d2ab(XmlTextReader xb9763b0038341e6c, Int32 x3e0a106e44f5f6eb, Int32 x5b0d56b787e972e9)
at xabb58b8f2887ff8e.x7661ca2b53df3da9.xd9c6f1ce6ced5eb4(XmlTextReader xb9763b0038341e6c, Int32 x8e17ff07bb5aefbf)
at xabb58b8f2887ff8e.x7661ca2b53df3da9.x5b9fbbb55c31a1b7(XmlTextReader xb9763b0038341e6c)
at xabb58b8f2887ff8e.x7661ca2b53df3da9.x06b0e25aa6ad68a9(XmlTextReader xb9763b0038341e6c)
at xabb58b8f2887ff8e.x9d49ab444acbddce.x72bde2882aefe5af(x1f5f0dd7560ed867 xd9171314ec0b2957, String x7d11dcd405070662)
at xabb58b8f2887ff8e.x9d49ab444acbddce.xc3266f78bb6c4216(x1f5f0dd7560ed867 xd9171314ec0b2957, String x7d11dcd405070662)
at xabb58b8f2887ff8e.x9d49ab444acbddce.x88ae89d546ee9fdf()
at xabb58b8f2887ff8e.x9d49ab444acbddce.x06b0e25aa6ad68a9()
at Aspose.Cells.Workbook.Open(Stream stream, FileFormatType type)
at Aspose.Cells.Workbook.Open(String fileName)
at Intralinks.Common.Utilities.AsposeConverter.ConvertXlsToPdf(String sourceFilePath, String destinationFilePath) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\AsposeConverter.cs:line 71
at Intralinks.Common.Utilities.CommonUtilities.ConvertOfficeDocsToPDF(String sourceFile, String destinationFolder, Boolean useOriginalFileName) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\CommonUtilities.cs:line 1385









Category: Logging Exception
Priority: 1
EventId: 100
Severity: Error
Title:Enterprise Library Exception Handling
Machine: WDPDPF01
Application Domain: ILPDFConversionService.exe
Process Id: 6920
Process Name: C:\PDFConvService\WOODDALE.pdfconv\instance3\Release\ILPDFConversionService.exe
Win32 Thread Id: 6308
Thread Name:
Extended Properties: Product Version - 3.0.24944.0


No. of occurences:5

mscorlib in file: C:\WINDOWS\TEMP\IntraLinks\6a446470-b360-4e63-956d-cac85df31016.xlsx

System.Collections.ListDictionaryInternal
Void .ctor(Int32)
at System.IO.MemoryStream..ctor(Int32 capacity)
at xabb58b8f2887ff8e.x9c29c77856d81147.x6745642c16757704(Stream xe4115acdf4fbfccc)
at xabb58b8f2887ff8e.x9d49ab444acbddce.x597c6b109bf9d833()
at xabb58b8f2887ff8e.x9d49ab444acbddce.x06b0e25aa6ad68a9()
at Aspose.Cells.Workbook.Open(Stream stream, FileFormatType type)
at Aspose.Cells.Workbook.Open(String fileName)
at Intralinks.Common.Utilities.AsposeConverter.ConvertXlsToPdf(String sourceFilePath, String destinationFilePath) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\AsposeConverter.cs:line 71
at Intralinks.Common.Utilities.CommonUtilities.ConvertOfficeDocsToPDF(String sourceFile, String destinationFolder, Boolean useOriginalFileName) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\CommonUtilities.cs:line 1385









Category: Logging Exception
Priority: 1
EventId: 100
Severity: Error
Title:Enterprise Library Exception Handling
Machine: WDPDPF01
Application Domain: ILPDFConversionService.exe
Process Id: 6240
Process Name: C:\PDFConvService\WOODDALE.pdfconv\instance1\Release\ILPDFConversionService.exe
Win32 Thread Id: 3776
Thread Name:
Extended Properties: Product Version - 3.0.24944.0



No. of occurences:1

1/20/2012 6:56:01 AM
Message: HandlingInstanceID: b7e55e89-fcb3-4a2d-b0ea-8b5516fc2a98

An exception of type 'System.OutOfMemoryException' occurred and was caught.
2012-01-20 01:56:01Z
System.OutOfMemoryException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Exception of type 'System.OutOfMemoryException' was thrown.
mscorlib in file: C:\WINDOWS\TEMP\IntraLinks\6a65fc5a-97b5-447c-b719-b69a11d2258a.xls

System.Collections.ListDictionaryInternal
Void .ctor(Int32)
at System.IO.MemoryStream..ctor(Int32 capacity)
at x4974cb5652d7d108.xd8c3135513b9115b.x53cce0b6abbd65ad(UInt32 x444500d221585c6d, Int32 x961016a387451f05, Boolean x1e38b61ec7dc13de)
at x4974cb5652d7d108.xd8c3135513b9115b.x855150d0664edd8d(xd686a7cfdb7bddb2 x2451e88e57006ea5, xe7be411416cfcd54 xb6a159a84cb992d6)
at x4974cb5652d7d108.xd8c3135513b9115b.x855150d0664edd8d(xd686a7cfdb7bddb2 x2451e88e57006ea5, xe7be411416cfcd54 xb6a159a84cb992d6)
at x4974cb5652d7d108.xd8c3135513b9115b.x855150d0664edd8d(xd686a7cfdb7bddb2 x2451e88e57006ea5, xe7be411416cfcd54 xb6a159a84cb992d6)
at x4974cb5652d7d108.xd8c3135513b9115b.x5d95f5f98c940295(Stream xcf18e5243f8d5fd3)
at Aspose.Cells.Workbook.Open(Stream stream, FileFormatType type)
at Aspose.Cells.Workbook.Open(String fileName)
at Intralinks.Common.Utilities.AsposeConverter.ConvertXlsToPdf(String sourceFilePath, String destinationFilePath) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\AsposeConverter.cs:line 71
at Intralinks.Common.Utilities.CommonUtilities.ConvertOfficeDocsToPDF(String sourceFile, String destinationFolder, Boolean useOriginalFileName) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\CommonUtilities.cs:line 1385









Category: Logging Exception
Priority: 1
EventId: 100
Severity: Error
Title:Enterprise Library Exception Handling
Machine: WDPDPF01
Application Domain: ILPDFConversionService.exe
Process Id: 6240
Process Name: C:\PDFConvService\WOODDALE.pdfconv\instance1\Release\ILPDFConversionService.exe
Win32 Thread Id: 3776
Thread Name:
Extended Properties: Product Version - 3.0.24944.0


No. of occurences:3

1/18/2012 5:01:04 AM
Message: HandlingInstanceID: e59b2e81-8a08-42c2-9312-1a8055ecb4d4

An exception of type 'System.OutOfMemoryException' occurred and was caught.
2012-01-18 00:01:04Z
System.OutOfMemoryException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Exception of type 'System.OutOfMemoryException' was thrown.
Aspose.Words in file: C:\WINDOWS\TEMP\IntraLinks\37d77da6-4779-4b8c-b88a-0472a89dca81.doc

System.Collections.ListDictionaryInternal
Void ?(System.IO.Stream, Aspose.Words.LoadFormat, System.String)
at Aspose.Words.Document.?(Stream ?, LoadFormat ?, String ?)
at Aspose.Words.Document.?(Stream ?, LoadFormat ?, String ?)
at Aspose.Words.Document..ctor(String fileName, LoadFormat loadFormat, String password)
at Aspose.Words.Document..ctor(String fileName)
at Intralinks.Common.Utilities.AsposeConverter.ConvertWordToPdf(String sourceFilePath, String destinationFilePath) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\AsposeConverter.cs:line 38
at Intralinks.Common.Utilities.CommonUtilities.ConvertOfficeDocsToPDF(String sourceFile, String destinationFolder, Boolean useOriginalFileName) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\CommonUtilities.cs:line 1357









Category: Logging Exception
Priority: 1
EventId: 100
Severity: Error
Title:Enterprise Library Exception Handling
Machine: WDPDPF01
Application Domain: ILPDFConversionService.exe
Process Id: 6308
Process Name: C:\PDFConvService\WOODDALE.pdfconv\instance1\Release\ILPDFConversionService.exe
Win32 Thread Id: 4020
Thread Name:
Extended Properties: Product Version - 3.0.24944.0

Hi,

Thanks for your posting and using Aspose components.

Please download and try the latest version:

Aspose.Cells for .NET 7.1.1



Please provide us your source xls/xlsx documents which you are converting to pdf using Aspose.Cells. We will look into them and fix the problem asap.


We will upgrade to latest dll. But can you please give point to appropriate link where can I get the limits of each Aspose dll? This is very important issue for us as we need to indicate in specification. I am sure you must have done stress testing at your end. It would be great if you can provide me details of what parameters impact this out of memory issue and how can I calculate require memory based on those parameters? You may can provide test data with 10, 20 and 50 MB files if any.


Thanks
Viral

Hi,


Thanks for your posting.

If the out of memory error is thrown while saving
workbook (e.g Workbook.Save), you may try to set
SaveOptions.CachedFileFolder while saving the workbook/file.

When this
option is not set, the cached file folder is used to store some large data on disk.

C#
SaveOptions SaveOptions = new Aspose.Cells.XlsSaveOptions(SaveFormat.Excel97To2003);
SaveOptions.CachedFileFolder = stringFilePath;
workook.Save(stringFileName, SaveOptions);

So is any extra cache file created in specified cached file folder If I am doing the way you suggested? Can I do this for every excel file to pdf conversion or just only if out of memory exception happens? What are pros and cons. of using this option and converting without this option? As you suggested to save to 97-2003 format what if source file got any new type of object in the source file which is not compatible to format.

Hi,

Thanks for your questions.

We will answer them asap.

However, you can save your file in XLSX format too. Please use this code.

C#
SaveOptions SaveOptions = new Aspose.Cells.OoxmlSaveOptions(SaveFormat.Xlsx);
SaveOptions.CachedFileFolder = stringFilePath;
workook.Save(stringFileName, SaveOptions);

Can you please answer following questions or call me so that we can discuss this urgent issue?

Is any extra cache file created in specified cached file folder If I am doing the way you suggested? Can I do this for every excel file to pdf conversion or just only if out of memory exception happens? What are pros and cons. of using this option and converting without this option?

Hi,

I have forwarded your questions and issue to the development team for investigation and logged this issue in our database.

Once, we will get some fix/update relating to it, we will let you know asap.

This issue has been logged as CELLSNET-40403.

Hi,

Could you provide a sample file here? We will check it soon.

This issue happened on production. Unfortunately can not share that client file but will try to provide you scrubbed file. We are running service for conversion so meanwhile can you please provide what various optmizations I can do to cleanup or prevent consumed memory. I am running 5 threads. Also please provide contact details of technical support.

Please find attached sample file. Please do the needful asap.

Hi,

Thanks for your feedback and providing us your files.

We will look into it and get back to you asap.

Already attached source file.

Hi,

Please provide us your xls or xlsx file which is throwing exception. We need it to look into this issue.

ViralPatelV:
Conversion to pdf thrown out of memory exceptions with different stack trace when we converted bunch of office files through service. We used Aspose.cells 7.0.2.0 , Aspose Slides5.6 and Aspose.words 10.6. Following are those exceptions. Some of them failed with chinese\japanese characters and those files are attached. Please provide fix for this asap.

No. of occurences:7

1/20/2012 4:30:51 AM
Message: HandlingInstanceID: a1ac4beb-9eaa-433f-9d73-831200d0695f

An exception of type 'System.OutOfMemoryException' occurred and was caught.
2012-01-19 23:30:51Z
System.OutOfMemoryException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Exception of type 'System.OutOfMemoryException' was thrown.
mscorlib in file: C:\WINDOWS\TEMP\IntraLinks\e421ac77-5ada-4a3f-ad00-397db49fa1e5.xlsx

System.Collections.ListDictionaryInternal
System.String CtorCharArrayStartLength(Char[], Int32, Int32)
at System.String.CtorCharArrayStartLength(Char[] value, Int32 startIndex, Int32 length)
at System.Xml.XmlTextReaderImpl.NodeData.get_StringValue()
at System.Xml.XmlTextReaderImpl.get_Value()
at System.Xml.XmlTextReader.get_Value()
at xabb58b8f2887ff8e.x7661ca2b53df3da9.xb953ef709de3d2ab(XmlTextReader xb9763b0038341e6c, Int32 x3e0a106e44f5f6eb, Int32 x5b0d56b787e972e9)
at xabb58b8f2887ff8e.x7661ca2b53df3da9.xd9c6f1ce6ced5eb4(XmlTextReader xb9763b0038341e6c, Int32 x8e17ff07bb5aefbf)
at xabb58b8f2887ff8e.x7661ca2b53df3da9.x5b9fbbb55c31a1b7(XmlTextReader xb9763b0038341e6c)
at xabb58b8f2887ff8e.x7661ca2b53df3da9.x06b0e25aa6ad68a9(XmlTextReader xb9763b0038341e6c)
at xabb58b8f2887ff8e.x9d49ab444acbddce.x72bde2882aefe5af(x1f5f0dd7560ed867 xd9171314ec0b2957, String x7d11dcd405070662)
at xabb58b8f2887ff8e.x9d49ab444acbddce.xc3266f78bb6c4216(x1f5f0dd7560ed867 xd9171314ec0b2957, String x7d11dcd405070662)
at xabb58b8f2887ff8e.x9d49ab444acbddce.x88ae89d546ee9fdf()
at xabb58b8f2887ff8e.x9d49ab444acbddce.x06b0e25aa6ad68a9()
at Aspose.Cells.Workbook.Open(Stream stream, FileFormatType type)
at Aspose.Cells.Workbook.Open(String fileName)
at Intralinks.Common.Utilities.AsposeConverter.ConvertXlsToPdf(String sourceFilePath, String destinationFilePath) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\AsposeConverter.cs:line 71
at Intralinks.Common.Utilities.CommonUtilities.ConvertOfficeDocsToPDF(String sourceFile, String destinationFolder, Boolean useOriginalFileName) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\CommonUtilities.cs:line 1385









Category: Logging Exception
Priority: 1
EventId: 100
Severity: Error
Title:Enterprise Library Exception Handling
Machine: WDPDPF01
Application Domain: ILPDFConversionService.exe
Process Id: 6920
Process Name: C:\PDFConvService\WOODDALE.pdfconv\instance3\Release\ILPDFConversionService.exe
Win32 Thread Id: 6308
Thread Name:
Extended Properties: Product Version - 3.0.24944.0


No. of occurences:5

mscorlib in file: C:\WINDOWS\TEMP\IntraLinks\6a446470-b360-4e63-956d-cac85df31016.xlsx

System.Collections.ListDictionaryInternal
Void .ctor(Int32)
at System.IO.MemoryStream..ctor(Int32 capacity)
at xabb58b8f2887ff8e.x9c29c77856d81147.x6745642c16757704(Stream xe4115acdf4fbfccc)
at xabb58b8f2887ff8e.x9d49ab444acbddce.x597c6b109bf9d833()
at xabb58b8f2887ff8e.x9d49ab444acbddce.x06b0e25aa6ad68a9()
at Aspose.Cells.Workbook.Open(Stream stream, FileFormatType type)
at Aspose.Cells.Workbook.Open(String fileName)
at Intralinks.Common.Utilities.AsposeConverter.ConvertXlsToPdf(String sourceFilePath, String destinationFilePath) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\AsposeConverter.cs:line 71
at Intralinks.Common.Utilities.CommonUtilities.ConvertOfficeDocsToPDF(String sourceFile, String destinationFolder, Boolean useOriginalFileName) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\CommonUtilities.cs:line 1385









Category: Logging Exception
Priority: 1
EventId: 100
Severity: Error
Title:Enterprise Library Exception Handling
Machine: WDPDPF01
Application Domain: ILPDFConversionService.exe
Process Id: 6240
Process Name: C:\PDFConvService\WOODDALE.pdfconv\instance1\Release\ILPDFConversionService.exe
Win32 Thread Id: 3776
Thread Name:
Extended Properties: Product Version - 3.0.24944.0



No. of occurences:1

1/20/2012 6:56:01 AM
Message: HandlingInstanceID: b7e55e89-fcb3-4a2d-b0ea-8b5516fc2a98

An exception of type 'System.OutOfMemoryException' occurred and was caught.
2012-01-20 01:56:01Z
System.OutOfMemoryException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Exception of type 'System.OutOfMemoryException' was thrown.
mscorlib in file: C:\WINDOWS\TEMP\IntraLinks\6a65fc5a-97b5-447c-b719-b69a11d2258a.xls

System.Collections.ListDictionaryInternal
Void .ctor(Int32)
at System.IO.MemoryStream..ctor(Int32 capacity)
at x4974cb5652d7d108.xd8c3135513b9115b.x53cce0b6abbd65ad(UInt32 x444500d221585c6d, Int32 x961016a387451f05, Boolean x1e38b61ec7dc13de)
at x4974cb5652d7d108.xd8c3135513b9115b.x855150d0664edd8d(xd686a7cfdb7bddb2 x2451e88e57006ea5, xe7be411416cfcd54 xb6a159a84cb992d6)
at x4974cb5652d7d108.xd8c3135513b9115b.x855150d0664edd8d(xd686a7cfdb7bddb2 x2451e88e57006ea5, xe7be411416cfcd54 xb6a159a84cb992d6)
at x4974cb5652d7d108.xd8c3135513b9115b.x855150d0664edd8d(xd686a7cfdb7bddb2 x2451e88e57006ea5, xe7be411416cfcd54 xb6a159a84cb992d6)
at x4974cb5652d7d108.xd8c3135513b9115b.x5d95f5f98c940295(Stream xcf18e5243f8d5fd3)
at Aspose.Cells.Workbook.Open(Stream stream, FileFormatType type)
at Aspose.Cells.Workbook.Open(String fileName)
at Intralinks.Common.Utilities.AsposeConverter.ConvertXlsToPdf(String sourceFilePath, String destinationFilePath) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\AsposeConverter.cs:line 71
at Intralinks.Common.Utilities.CommonUtilities.ConvertOfficeDocsToPDF(String sourceFile, String destinationFolder, Boolean useOriginalFileName) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\CommonUtilities.cs:line 1385









Category: Logging Exception
Priority: 1
EventId: 100
Severity: Error
Title:Enterprise Library Exception Handling
Machine: WDPDPF01
Application Domain: ILPDFConversionService.exe
Process Id: 6240
Process Name: C:\PDFConvService\WOODDALE.pdfconv\instance1\Release\ILPDFConversionService.exe
Win32 Thread Id: 3776
Thread Name:
Extended Properties: Product Version - 3.0.24944.0


No. of occurences:3

1/18/2012 5:01:04 AM
Message: HandlingInstanceID: e59b2e81-8a08-42c2-9312-1a8055ecb4d4

An exception of type 'System.OutOfMemoryException' occurred and was caught.
2012-01-18 00:01:04Z
System.OutOfMemoryException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Exception of type 'System.OutOfMemoryException' was thrown.
Aspose.Words in file: C:\WINDOWS\TEMP\IntraLinks\37d77da6-4779-4b8c-b88a-0472a89dca81.doc

System.Collections.ListDictionaryInternal
Void ?(System.IO.Stream, Aspose.Words.LoadFormat, System.String)
at Aspose.Words.Document.?(Stream ?, LoadFormat ?, String ?)
at Aspose.Words.Document.?(Stream ?, LoadFormat ?, String ?)
at Aspose.Words.Document..ctor(String fileName, LoadFormat loadFormat, String password)
at Aspose.Words.Document..ctor(String fileName)
at Intralinks.Common.Utilities.AsposeConverter.ConvertWordToPdf(String sourceFilePath, String destinationFilePath) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\AsposeConverter.cs:line 38
at Intralinks.Common.Utilities.CommonUtilities.ConvertOfficeDocsToPDF(String sourceFile, String destinationFolder, Boolean useOriginalFileName) in c:\ilbuilds\pdfconv\build_trunk\CommonUtilities\CommonUtilities.cs:line 1357









Category: Logging Exception
Priority: 1
EventId: 100
Severity: Error
Title:Enterprise Library Exception Handling
Machine: WDPDPF01
Application Domain: ILPDFConversionService.exe
Process Id: 6308
Process Name: C:\PDFConvService\WOODDALE.pdfconv\instance1\Release\ILPDFConversionService.exe
Win32 Thread Id: 4020
Thread Name:
Extended Properties: Product Version - 3.0.24944.0



Hi,

I am representative of Aspose.Cells team.

Since your issue is also related to Aspose.Words and Aspose.Slides, so I have forwarded your issue to relevant teams.

They will also check this issue at their end.

Hi Viral,


I am representing Aspose.Slides.

I would recommend you to please try using Aspose.Slides for .NET 6.0.0. If the issue still persist then kindly share the source presentations and sample project exhibiting the issues specified.

Many Thanks,

Hi Viral,


Thanks for your inquiry. Iā€™m a representative from the Aspose.Words team.

I have already answered, here in this thread, to a similar query of yours. If we can help you with anything else, please feel free to ask.

Best Regards,

Hi Viral,


To further update you on your issue that since the release of Aspose.Cells for .NET v 8.0.0 we provided new options e.g MemorySetting.MemoryPreference for memory performance consideration. We recommend you to kindly try our latest version/fix: Aspose.Cells for .NET 8.0.2 with the new option to check if it works fine regarding Excel conversions/ rendering. Please see the topic for your complete reference on how to optimize memory usage while rendering bigger data sets etc.:
http://www.aspose.com/docs/display/cellsnet/Optimizing+Memory+Usage+while+Working+with+Big+Files+having+Large+Datasets


Thank you.



1 Like