System out of memory..

Does anyone get this frequently?

System.OutOfMemoryException

Out of memory.

Stack Trace:

at System.Drawing.Graphics.CheckErrorStatus(Int32 status)

at System.Drawing.Graphics.DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, Int32 callbackData)

at System.Drawing.Graphics.DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr)

at DevExpress.XtraBars.Painters.PaintHelper.DrawImageCore(Graphics g, Image image, Int32 x, Int32 y, Int32 width, Int32 height, Rectangle srcRect, ImageAttributes attr)

at DevExpress.XtraBars.Painters.PrimitivesPainter.DrawLinkImage(BarLinkPaintArgs e, Rectangle r, ImageAttributes attr, Image image, BarLinkState state)

at DevExpress.XtraBars.Painters.PrimitivesPainterOffice2000.DrawLinkImage(BarLinkPaintArgs e, Rectangle r, ImageAttributes attr, Image image, BarLinkState state)

at DevExpress.XtraBars.Painters.PrimitivesPainterWindowsXP.DrawLinkImage(BarLinkPaintArgs e, Rectangle r, ImageAttributes attr, Image image, BarLinkState state)

at DevExpress.XtraBars.Painters.BarLinkPainter.DrawLinkImageCore(BarLinkPaintArgs e, Rectangle r, BarLinkState state, ImageAttributes attr)

at DevExpress.XtraBars.Painters.BarLinkPainter.DrawLinkNormalGlyph(BarLinkPaintArgs e, Boolean lighter)

at DevExpress.XtraBars.Painters.BarLinkPainter.DrawLinkNormal(BarLinkPaintArgs e)

at DevExpress.XtraBars.Painters.BarLinkPainter.DrawLinkHorizontal(BarLinkPaintArgs e)

at DevExpress.XtraBars.Painters.BarBaseButtonLinkPainter.DrawLinkHorizontal(BarLinkPaintArgs e)

at DevExpress.XtraBars.Painters.BarLinkPainter.DrawLink(BarLinkPaintArgs e)

at DevExpress.XtraBars.Painters.BarLinkPainter.Draw(GraphicsInfoArgs e, CustomViewInfo info, Object sourceInfo)

at DevExpress.XtraBars.Painters.BarLinkObjectPainter.DrawObject(ObjectInfoArgs e)

at DevExpress.Utils.Drawing.ObjectPainter.DrawObject(GraphicsCache cache, ObjectPainter painter, ObjectInfoArgs e)

at DevExpress.Utils.Drawing.Animation.XtraAnimator.DrawAnimationHelper(GraphicsCache cache, ISupportXtraAnimation obj, Object animationId, ObjectPainter painter, ObjectInfoArgs info, ObjectPainter textPainter, ObjectInfoArgs textInfo)

at DevExpress.Utils.Drawing.Animation.XtraAnimator.DrawAnimationHelper(GraphicsCache cache, ISupportXtraAnimation obj, Object animationId, ObjectPainter painter, ObjectInfoArgs info, DrawTextInvoker drawTextMethod, Object textInfo)

at DevExpress.XtraBars.Painters.BarPainter.DrawLink(GraphicsInfoArgs e, BarControlViewInfo viewInfo, BarLinkViewInfo item)

at DevExpress.XtraBars.Painters.BarPainter.Draw(GraphicsInfoArgs e, CustomViewInfo info, Object sourceInfo)

at DevExpress.XtraBars.Controls.CustomControl.DirectDraw(PaintEventArgs e)

at DevExpress.XtraBars.Controls.CustomControl.OnPaint(PaintEventArgs e)

at DevExpress.XtraBars.Controls.CustomBarControl.OnPaint(PaintEventArgs e)

at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)

at System.Windows.Forms.Control.WmPaint(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)

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)

We have seen similiar error stacks and have a fix in place. This is recent fix so would not be in current Beta. Do happen to remember what you were doing just prior? If not, no worries. It should be fixed in the next Beta.

Debbie

I believe I’m getting the same error. I can reproduce the error every time I run the statements. I get the same error in Toad for DA 2.7.0.348 commercial trial edition as well as Beta 3.0.0.1601

I’m connect to DB2 LUW 9.7 fix pack 3.

The code I’m running is 129 lines long, 4138 characters including commented lines. There are 2 code regions.
My code is declaring a global temp table, inserting into it, executing a runstats, and then creating an index. Next, it does the same order of operations for a second temp table. The errors occur during the first table insert. The insert takes the form of:

Select inner_tab.*
from
(select a.col1, b.col2
from tab1 a
left join table(values(‘XX’,1)) as b(col1,col2)
on a.col1 = b.col1
) as inner_tab
;

This is a simple form. The values table actually has 4 columns and 36 rows. The second insert statement does not have a values table.

I’ve had this same memory problem with other pieces of code in 2.7, but this is the first time that the same code had this problem in 3.0 beta.

Do you happen to know when the Beta with the fix will be released? In the meantime, is there a workaround?
Toad Error Message.txt (2.86 KB)

Because I simply love to troubleshoot. I kept messing with my code to see if I could figure out what triggers the error.

If I comment out the COMMIT between declaring the global temp table and the insert, I do not get the error boxes.

The innner part of my query uses a ROW_NUMBER() function as well as left joining a values table and joining to a UDF table. I’ve commented out each of these components separately, but none stop the error boxes if I leave the COMMIT.

I’ve also tried changing the statement delimiter from “;” to “#”, but that didn’t make a difference.

I tried changing Select * from inner table to listing out the columns in the outer select. Also, didn’t help.

The only way I can avoid the errors while keeping the commit statement is to filter the where clause of my insert statement to insert less total rows.

My second declare global temp - commit - insert does not produce any errors. It insert a join of my first temp table to another table. It produces the same total number of rows, but is a pretty quick insert.

I’m hoping this information helps in some way.

We think we have figured out what this problem is and it isn’t really dependent on the SQL per se. However it is a problem with different threads inside the application accessing the same object when they shouldn’t so depending on what you execute the timing might be “just right” to have this happen on your machine.

That said we think that the problem should be solved for the next upcoming release.

Thanks for the reply. Any word on how soon the next release will come out? My company is evaluating Toad for DA. I’m looking forward to finding out this type of error is no longer an problem before any decisions are made.

We plan to post our last Beta next week. Probably thursday because of the holiday. That build should be very close to our GA code. I suggest downloading that when available.

Debbie

I just downloaded the new beta and still have the same problem.

Thanks for your additional input on this. We now see what the issue is. It is in the Db2 provider. The original issues was CR84087 and is fixed in the main code line. I have entered CR90692 to ensure that this fix gets into the next release. It won’t make it for TDA 3.0. We should have another release by the end of the year.

Debbie

Thank you Debbie and Henrik for taking the time to identify this issue. I appreciate your attentiveness and quick responses.

New exception: 29/11/2011 08:46:57

System.OutOfMemoryException: Exception of type ‘System.OutOfMemoryException’ was thrown.

Stack trace:

at DevExpress.Data.Storage.DataStorageDateTimeComparer.CreateRecords(Int32 rowCount)

at DevExpress.Data.Storage.DataStorageObjectComparer.CreateStorage(VisibleListSourceRowCollection rows, BaseDataControllerHelper dataHelper, Int32 column)

at DevExpress.Data.Helpers.DataColumnSortInfoCollection.CreateColumnStorages(VisibleListSourceRowCollection visibleListSourceRows, BaseDataControllerHelper helper)

at DevExpress.Data.DataController.DoSortRows()

at DevExpress.Data.DataController.OnRefresh(Boolean useRowsKeeper)

at DevExpress.Data.DataController.DoRefreshCore(Boolean useRowsKeeper)

at DevExpress.Data.DataController.DoRefresh(Boolean useRowsKeeper)

at DevExpress.Data.CurrencyDataController.DoRefresh(Boolean useRowsKeeper)

at Quest.Toad.Grid.ToadGridControl.ToadGridView.ToadDataController.DoRefresh(Boolean useRowsKeeper)

at DevExpress.Data.DataController.OnBindingListChangedCore(ListChangedEventArgs e)

at DevExpress.Data.BaseGridController.OnBindingListChangedCore(ListChangedEventArgs e)

at DevExpress.Data.DataController.OnBindingListChanged(ListChangedEventArgs e)

at DevExpress.Data.CurrencyDataController.RaiseOnBindingListChanged(ListChangedEventArgs e)

at DevExpress.Data.Helpers.ListDataControllerHelper.OnBindingListChanged(ListChangedEventArgs e)

at DevExpress.Data.Helpers.BaseDataControllerHelper.OnBindingListChanged(Object sender, ListChangedEventArgs e)

at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)

at Quest.FastData.FastTable.InternalListChanged()

at Quest.FastData.FastTable.SignalChanged()

at Quest.FastData.FastTable.InternalSignalChanged(Boolean force, Boolean properties)

at Quest.FastData.FastTable.BeginEdit(FastRow row, Boolean added)

at Quest.FastData.FastRow.BeginEdit()

at System.Windows.Forms.CurrencyManager.OnCurrentChanged(EventArgs e)

at System.Windows.Forms.CurrencyManager.ChangeRecordState(Int32 newPosition, Boolean validating, Boolean endCurrentEdit, Boolean firePositionChange, Boolean pullData)

at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)

at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)

at Quest.FastData.FastTable.InternalListChanged()

at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)

at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)

at System.Threading.ExecutionContext.runTryCode(Object userData)

at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)

at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)

at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

Hi All,

Any update on this? Is the latest version already addressed the issue. Just encountered this again in 2.7 ver.

When viewing a table of 23 columns and several million rows in the Viewer using the Data tab the first 1000 rows are displayed. As I need to sort the data I am offered the option to “read all rows for the currently running query to ensrue correct output of the sort”. When I click Yes, records are fetched but when around 800000 to 900000 rows have been read (more available), the application starts throwing System.OutOfMemoryException errors continually and the application needs to be shut down.

Details:
Data Analysts 2.7
Db: Oracle9i Enterprise Edition Release 9.2.0.8.0

—ERROR

Yes, the 3.0 version of TDA should have much better memory footprint when working with the data grid and and having large amounts of data (I assume that is what you are doing based from the stack trace below).

Thanks Mauritz… I’ve Informed the customer to try the latest version. Will post an update soon.

Can you let us know how this issue is for you now using our latest version of TDA?

Debbie

I haven’t had this problem in quite awhile, but it just showed up again today. I’m using Beta 585. I’m using DB2 LUW Fixpack 5. I believe you mentioned in the past that the DB2 .NET driver had been an issue. Is this still a problem? The circumstances leading up to the incident were not something I’ve done in awhile. Here are the steps that occurred:

  1. I turned off AutoCommit for current editor.

I executed a script to do the following 3 steps:
2. I locked a table in exclusive mode
3. Executed a merge statment which updated the locked table
4. Execute a commit statment.

At this point, everything was fine. I ran a select query against the table to see if my update performed as expected. I found an issue that I hadn’t accounted for, so I changed the logic in the merge statement to account for the issue. The incident occurred in the next sequence.

I executed the same 3 statement script.

  1. I locked a table in exclusive mode
  2. Executed a merge statment which errored with a syntax problem
  3. I corrected the syntax problem

Again, I executed the same 3 statement script.
4. I locked a table in exclusive mode
5. Executed a merge statment in order to update the lock table
6. The error message boxes started popping up. Most, but not all submenu boxes turned white with a red X through them. (At least 1 submenu didn’t crash)
7. The merge statement completed
8. The commit statement completed

I then used the context menus to turn off and turn on the submenus to bring the editor back to looking normal.

I haven’t turned off AutoCommit in quite awhile, so this may be the lingering issue. More typically, I’ve been building stored procedures to perform the merge updates by looping over certain items to limit the commit scope. This time, I just needed to do a one time update, so I ran this piece of logic in the editor.

Feel free to move my post to the Beta forum or it’s own thread if needed. I was just trying to reply to the message string where we started talking about this before.

This does not seem to be the same issue that we resolved. We think it has to do with the use of a merge statement. I have entered Cr98080 for this. It did not make the list for TDA 3.1 or 3.2 but will be in TDA 3.5.

Debbie

– edit I have more current info

Message was edited by: Brett_db2

I didn’t notice that you had replied until now. I started having the old problems again today. Everything blew up while inserting into a declared global temporary table with auto commit ON. I recently had a push to my machine of a newer DB2 LUW client. I’m wondering if this plays some part of the problem. I just downloaded and am installing the newest beta version. I’m hoping the problems go away.