We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Urgent:Insufficient memory to continue the execution of the program

Thread ID:

Created:

Updated:

Platform:

Replies:

100073 Jun 30,2011 02:45 PM UTC Jul 30,2012 11:47 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: XlsIO
Mohankumar Venugopal
Asked On June 30, 2011 02:45 PM UTC

Hi ,

i am trying to bind 75000 rows with 58 columns to worksheet using syncfusionv8.403.0.10
and gettting exceptions like,

1)
Message: Insufficient memory to continue the execution of the program.
StackTrace: at Syncfusion.XlsIO.Parser.Biff_Records.IntPtrDataProvider.EnsureCapacity(Int32 size)
at Syncfusion.XlsIO.Implementation.SSTDictionary.SetRefCount(Int32 index, Int32 count)
at Syncfusion.XlsIO.Implementation.SSTDictionary.AddIncrease(Object key, Boolean bIncrease)
at Syncfusion.XlsIO.Implementation.RangeRichTextString.EndUpdate()
at Syncfusion.XlsIO.Implementation.RangeImpl.set_Text(String value)

2)
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
StackTrace: at System.Runtime.InteropServices.Marshal.ReadInt32(IntPtr ptr, Int32 ofs)
at Syncfusion.XlsIO.Parser.Biff_Records.IntPtrDataProvider.ReadInt32(Int32 iOffset)
at Syncfusion.XlsIO.Implementation.SSTDictionary.AddIncrease(Int32 index)
at Syncfusion.XlsIO.Implementation.SSTDictionary.AddIncrease(Object key, Boolean bIncrease)
at Syncfusion.XlsIO.Implementation.RangeRichTextString.EndUpdate()
at Syncfusion.XlsIO.Implementation.RangeImpl.set_Text(String value)

3)
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
StackTrace: at Syncfusion.XlsIO.Implementation.Memory.RtlZeroMemory(IntPtr ptrDest, Int32 iSize)
at Syncfusion.XlsIO.Parser.Biff_Records.IntPtrDataProvider.ZeroMemory()
at Syncfusion.XlsIO.Implementation.SSTDictionary.RemoveUnnecessaryStrings()
at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeSST(XmlWriter writer)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveSST()
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveWorkbook(ExcelSaveType saveAsType)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveDocument(ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveDocument(Stream stream, ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveDocument(String filename, ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.Serialize(String fullName, WorkbookImpl book, ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAs(String FileName, ExcelSaveType saveType, ExcelVersion version)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAs(String FileName, ExcelSaveType saveType)

Note:
1) In development, its working without these exceptions but when i deploy the code to server its throwing lot of exceptions.
2) if the number of rows are less than 40,00o then its works fine.


PLease reply ASAP.

code:

try

{

while (tdRDR.Read())

{

if (maxRows <= rowPosition)

{

Export_Log.TraceLog("reached the max rows goin to create new sheet, inside the mapdata()..");

CreateSheet();

sheet = workbook.ActiveSheet;

rowPosition = 1;

Export_Log.TraceLog("done create new sheet, inside the mapdata()..");

}

 

for (int columnPosition = 0; columnPosition < tdRDR.FieldCount; columnPosition++)

{

try

{

string dataType = Convert.ToString(tdRDR[columnPosition].GetType());

switch (dataType)

{

case "System.String":

sheet.Range[rowPosition, columnPosition + 1].Text = Convert.ToString(tdRDR[columnPosition]);

break;

case "System.Int32":

sheet.Range[rowPosition, columnPosition + 1].Value2 = Convert.ToInt32(tdRDR[columnPosition]);

break;

case "System.DateTime":

sheet.Range[rowPosition, columnPosition + 1].Value2 = Convert.ToDateTime(tdRDR[columnPosition]);

break;

case "System.Decimal":

sheet.Range[rowPosition, columnPosition + 1].Value2 = Convert.ToDouble(tdRDR[columnPosition]);

break;

default:

sheet.Range[rowPosition, columnPosition + 1].Text = Convert.ToString(tdRDR[columnPosition]);

break;

}

}

catch(Exception exp)

{

skipNextRecord = true;

}

if (skipNextRecord)

{

break;

}

}

rowPosition++;

 

}

}

catch (Exception exp)

{

}

finally

{

tdRDR = null;

}





private void CreateSheet()

{

try

{

sheet = workbook.Worksheets.Create();

sheet.Name = sheetName + "_" + Convert.ToString(workbook.Worksheets.Count - 1);

workbook.Worksheets[workbook.Worksheets.Count - 1].Activate();

}

catch (Exception exp)

{

}

}


Your help would be much appreciated. Thanks in advance


Regards,
Mohankumar.V



Jawahar Jeevanandan J [Syncfusion]
Replied On July 1, 2011 10:22 AM UTC

Hi Mohan,

Thank you very much for using syncfusion products.

The query addressed in this forrum is similar to incident 82097. Please follow up the incident 82097 for further follow up.

Please let us know if you have any clarifications.

Thanks,
Jawahar.


Mathew Baker
Replied On July 27, 2012 02:21 PM UTC

Dear Jawahar Jeevanandan J,

Useful that you point out I can find the answer to this problem at another incident number (82097), but how do I find that page within the forum? (not forrum)

I'm experiencing the same error when trying to create a worksheet containing 47000+ rows. 

What is the answer to this problem, or at least, give me a link to the solution?

Kind regards,
Mathew Baker
ISIZ BV

Sridhar [Syncfusion]
Replied On July 30, 2012 11:47 AM UTC

Hi Mathew,
 
Thank you so much for the update.
 
We could see the above reported query is related to the incident 97078 and our support enginner will get back to you with the details.
 
Let me know if you require any further assistance on this.
 
Thanks,
Sridhar.S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;