d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Out Of Memory Exception Error
12Next
Add Reply New Topic New Poll
Member
Posts: 3,704
Joined: Mar 8 2009
Gold: 17,175.10
Jan 29 2013 01:36pm
Can anyone break this down for me? Is there enough information here to determine where/ why the exception was thrown (ie what is using so much damn memory)

I upgraded the RAM (>8GB) on the few systems that run the program that throws this error (Sendouts Surge CRM) and this does not fix the error. We consume <4GB at all times until the error is thrown at which time the memory is obviously all taken up, and the process thread terminates. Flaw in the programming? This company is integrating into Bullhorn- could the downgrading of their servers cause this issue? Any feedback is appreciated- I cannot seem to come up with any fixes.




Type: System.OutOfMemoryException

Message: Exception of type 'System.OutOfMemoryException' was thrown.
Source: mscorlib
StackTrace: at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity)
at System.Text.StringBuilder.set_Capacity(Int32 value)
at System.Xml.BufferBuilder.ToString()
at System.Xml.XmlTextReaderImpl.ParseText()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Data.DataTextReader.Read()
at System.Data.XmlDataLoader.LoadColumn(DataColumn column, Object[] foundColumns)
at System.Data.XmlDataLoader.LoadTable(DataTable table, Boolean isNested)
at System.Data.XmlDataLoader.LoadData(XmlReader reader)
at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXml(TextReader reader)
at Sendouts.Utils.Helper.GetDsFromString(String sData, Boolean removeTimeZoneInfo)
at Sendouts.Utils.Helper.GetDsFromCompressed(Byte[] bData, Boolean removeTimeZoneInfo)
at Sendouts.Managers.ServerHelper.GetDsFromCompressed(Byte[] bData, Boolean RemoveTimeZoneInfo)
at Sendouts.Managers.ServerHelper.SendRequestToServer(String sGoParm, Object oStatusSelection, DataSet& dataSet)
TargetSite: System.String GetStringForStringBuilder(System.String, Int32, Int32, Int32)
Member
Posts: 3,704
Joined: Mar 8 2009
Gold: 17,175.10
Jan 29 2013 01:38pm
following that error: Object reference not set to an instance of an object.

Type: System.NullReferenceException

Message: Object reference not set to an instance of an object.
Source: Managers
StackTrace: at Sendouts.Managers.TextTemplate.AddDefaultTemplateInfoToDataSet(DbCodes type, PreferenceTypes prefType, Guid personId, DataSet dsTmpl)
at Sendouts.Managers.TextTemplate.GetAll(TextTemplateType templateType, DbCodes type, Guid templateUserPersonId)
at Sendouts.Managers.TextTemplate.GetAll(TextTemplateType templateType, Int32 dbCode, Guid templateUserPersonId)
at t.q()
at t.a(String A_0, String A_1, Boolean A_2, String A_3, Boolean A_4)
at t.a(Boolean A_0, Boolean A_1, Boolean A_2, Boolean A_3, Boolean A_4)
at fe..ctor(DbCodes A_0, DataRow[] A_1, Boolean A_2, Boolean A_3, Boolean A_4, Boolean A_5, Boolean A_6, Nullable`1 A_7)
at fe.a(DbCodes A_0, DataRow[] A_1, Boolean A_2, Boolean A_3, Boolean A_4, Boolean A_5, Boolean A_6, Nullable`1 A_7)
at hq.a(Int32 A_0, Grid A_1, hq A_2)
at hq.a(Int32 A_0, Grid A_1, Boolean A_2, String A_3)
at hv.a(CommandBinding A_0, Object A_1, String A_2)
at hv.s(Object A_0, EventArgs A_1)
at jk.a(EventArgs A_0)
at jk.b(EventArgs A_0)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.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.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
TargetSite: System.Data.DataSet AddDefaultTemplateInfoToDataSet(Sendouts.Utils.DbCodes, Sendouts.Utils.PreferenceTypes, System.Guid, System.Data.DataSet)
Member
Posts: 3,704
Joined: Mar 8 2009
Gold: 17,175.10
Jan 29 2013 01:41pm
When fetching data from this program my CPU usage goes from <15% to 100%.
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jan 29 2013 02:10pm
well you are obviously not freeing memory that you use causing memory leaks to eat away at the system over time. depending on how bad it is it may take weeks to seconds for it to cause that exception.

dont know what language youre using so i cant tell if your language has memory management or not but in general theory you must always dealloc memory that you alloc

second error is that you are trying to use a null pointer in your code. for pointers since you cannot allocate them to 0 (because 0x00000000 is a real memory address) they initialize them yo NULL which is no where.

without code no one will be able to help you much
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jan 29 2013 03:36pm
Quote (TheDiscoveryChannel @ Jan 29 2013 02:36pm)
Can anyone break this down for me? Is there enough information here to determine where/ why the exception was thrown (ie what is using so much damn memory)

I upgraded the RAM (>8GB) on the few systems that run the program that throws this error (Sendouts Surge CRM) and this does not fix the error. We consume <4GB at all times until the error is thrown at which time the memory is obviously all taken up, and the process thread terminates. Flaw in the programming? This company is integrating into Bullhorn- could the downgrading of their servers cause this issue? Any feedback is appreciated- I cannot seem to come up with any fixes.




Type: System.OutOfMemoryException

Message: Exception of type 'System.OutOfMemoryException' was thrown.
Source: mscorlib
StackTrace:    at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity)
  at System.Text.StringBuilder.set_Capacity(Int32 value)
  at System.Xml.BufferBuilder.ToString()
  at System.Xml.XmlTextReaderImpl.ParseText()
  at System.Xml.XmlTextReaderImpl.ParseElementContent()
  at System.Xml.XmlTextReaderImpl.Read()
  at System.Xml.XmlTextReader.Read()
  at System.Data.DataTextReader.Read()
  at System.Data.XmlDataLoader.LoadColumn(DataColumn column, Object[] foundColumns)
  at System.Data.XmlDataLoader.LoadTable(DataTable table, Boolean isNested)
  at System.Data.XmlDataLoader.LoadData(XmlReader reader)
  at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
  at System.Data.DataSet.ReadXml(TextReader reader)
  at Sendouts.Utils.Helper.GetDsFromString(String sData, Boolean removeTimeZoneInfo)
  at Sendouts.Utils.Helper.GetDsFromCompressed(Byte[] bData, Boolean removeTimeZoneInfo)
  at Sendouts.Managers.ServerHelper.GetDsFromCompressed(Byte[] bData, Boolean RemoveTimeZoneInfo)
  at Sendouts.Managers.ServerHelper.SendRequestToServer(String sGoParm, Object oStatusSelection, DataSet& dataSet)
TargetSite: System.String GetStringForStringBuilder(System.String, Int32, Int32, Int32)


looks like .NET?

1. how big is the file?
2. is it set up to use all the memory on your server, or is it restricted to use less?
Member
Posts: 28,331
Joined: Jun 9 2007
Gold: 11,700.00
Jan 29 2013 09:48pm
definitely a flaw in programming, question is where - it could be in the operating system as well
as AbDuCt said, without looking at the code you are going nowhere
likely the flaw is in the program (easy fix) but if it hits a snag in the operating system you will have to work around it (might be nasty work)
Member
Posts: 3,704
Joined: Mar 8 2009
Gold: 17,175.10
Jan 30 2013 12:43pm
Quote (brmv @ Jan 29 2013 07:48pm)
definitely a flaw in programming, question is where - it could be in the operating system as well
as AbDuCt said, without looking at the code you are going nowhere
likely the flaw is in the program (easy fix) but if it hits a snag in the operating system you will have to work around it (might be nasty work)



Pretty much just looking for confirmation that this is not the OS error, but rather programming as it is experienced on like 5 different dedicated systems. I did not write the program, but the company will not admit there is a problem and send it to the dev team because clearing my cache will remedy the error. It is very poor business practice to temp fix by emptying cache and not bring the issue to the developers, as we get the error many times a week.
Member
Posts: 3,704
Joined: Mar 8 2009
Gold: 17,175.10
Jan 30 2013 12:46pm
Quote (AbDuCt @ Jan 29 2013 12:10pm)
well you are obviously not freeing memory that you use causing memory leaks to eat away at the system over time. depending on how bad it is it may take weeks to seconds for it to cause that exception.

dont know what language youre using so i cant tell if your language has memory management or not but in general theory you must always dealloc memory that you alloc

second error is that you are trying to use a null pointer in your code. for pointers since you cannot allocate them to 0 (because 0x00000000 is a real memory address) they initialize them yo NULL which is no where.

without code no one will be able to help you much



delocating memory is a programming issue, not a system issue correct? Or is this a setting I need to change on the system?
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jan 30 2013 01:10pm
Quote (TheDiscoveryChannel @ Jan 30 2013 02:46pm)
delocating memory is a programming issue, not a system issue correct? Or is this a setting I need to change on the system?


programming but based on the language it might have built in garbage and memory handling included and the programmer would not need to touch them.

either way its 90% likely its a programming fault because in reality there should be no reason for a server to need 8gb ram for a single application. (there are exceptions such as massively loaded servers which are handling allot of requests.)

id just open a support ticket with all your logs you can give the company and if they dont fix it find another application/get money back if paid. else write a small program to launch every so often to clear the cache automatically as a hack patch.

This post was edited by AbDuCt on Jan 30 2013 01:12pm
Member
Posts: 3,704
Joined: Mar 8 2009
Gold: 17,175.10
Jan 30 2013 01:19pm
Quote (AbDuCt @ Jan 30 2013 11:10am)
programming but based on the language it might have built in garbage and memory handling included and the programmer would not need to touch them.

either way its 90% likely its a programming fault because in reality there should be no reason for a server to need 8gb ram for a single application. (there are exceptions such as massively loaded servers which are handling allot of requests.)

id just open a support ticket with all your logs you can give the company and if they dont fix it find another application/get money back if paid. else write a small program to launch every so often to clear the cache automatically as a hack patch.



It is a $2,500 / month CRM (customer relationship management) program that is in the middle of a transition to Bullhorn (another CRM that bought our CRM out), so we are a rock in a hard place. They house over 150,000 candidate profiles with all sorts of media and information attached. If it was as easy as that, we would have taken that route already :( The management just does not seem to think it is an issue since a cache dump fixes the error.

I'm continuously using 9-15% of my CPU and about 2.75 GB of memory until I attempt to fetch data from a certain module. It then hits 100% CPU and 8 GB memory and terminates. It is very frustrating! Especially when it occurs during email merge...
Go Back To Programming & Development Topic List
12Next
Add Reply New Topic New Poll