Quantcast
Viewing all articles
Browse latest Browse all 1621

Created Issue: OutOfMemoryException for new XSSFWorkbook object [11400]

Hi all,

Have somebody experienced the problem of OutOfMemoryException during creation of new XSSFWorkbook object?

Here is line of code, causing the problem:
IWorkbook wb = new XSSFWorkbook();

Here is the Stack Trace:
NPOI.POIXMLException was unhandled
Message=""
Source="NPOI.OOXML"
StackTrace:
at NPOI.POIXMLDocument.GetProperties()
at NPOI.XSSF.UserModel.XSSFWorkbook.OnWorkbookCreate()
at NPOI.XSSF.UserModel.XSSFWorkbook..ctor()
at CompassPoint.Reports.TimeDistribution.MainForm.OnExportToExcel() in C:\Projects\THESL GPS Project\TimeDistribution\CompassPoint\Reports\TimeDistribution\MainForm.cs:line 702
at CompassPoint.Reports.TimeDistribution.MainForm.btnToExcel_Click(Object sender, EventArgs e) in C:\Projects\THESL GPS Project\TimeDistribution\CompassPoint\Reports\TimeDistribution\MainForm.cs:line 1847
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at CompassPoint.Reports.TimeDistribution.MainForm.Execute(IWin32Window owner, INavigateHost theHost, DataStore useDataStore, Boolean modal) in C:\Projects\THESL GPS Project\TimeDistribution\CompassPoint\Reports\TimeDistribution\MainForm.cs:line 97
at CompassPoint.Reports.TimeDistribution.Program.Main(String[] args) in C:\Projects\THESL GPS Project\TimeDistribution\CompassPoint\Reports\TimeDistribution\Program.cs:line 93
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.TypeInitializationException
Message="The type initializer for 'NPOI.POIXMLProperties' threw an exception."
Source="NPOI.OOXML"
TypeName="NPOI.POIXMLProperties"
StackTrace:
at NPOI.POIXMLProperties..ctor(OPCPackage docPackage)
at NPOI.POIXMLDocument.GetProperties()
InnerException: System.TypeInitializationException
Message="The type initializer for 'NPOI.OpenXmlFormats.ExtendedPropertiesDocument' threw an exception."
Source="NPOI.OpenXmlFormats"
TypeName="NPOI.OpenXmlFormats.ExtendedPropertiesDocument"
StackTrace:
at NPOI.OpenXmlFormats.ExtendedPropertiesDocument..ctor()
at NPOI.POIXMLProperties..cctor()
InnerException: System.OutOfMemoryException
Message="Exception of type 'System.OutOfMemoryException' was thrown."
Source="mscorlib"
StackTrace:
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.Xml.Serialization.TempAssembly.LoadGeneratedAssembly(Type type, String defaultNamespace, XmlSerializerImplementation& contract)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
at NPOI.OpenXmlFormats.ExtendedPropertiesDocument..cctor()
InnerException:

Please respond!

Viewing all articles
Browse latest Browse all 1621

Trending Articles