Why my ultragrid will happne a "X" cross? I am using Infragistics.Win.UltraWinGrid.v3.2.dll
Please advice.
anyone?
finally i can debugger to debug the error is from this line of code
If frmMDI.UltraTabbedMdiManager1.TabGroups.Count > 0 Then For i As Integer = 0 To frmMDI.UltraTabbedMdiManager1.TabGroups(0).Tabs.Count - 1 If frmMDI.UltraTabbedMdiManager1.TabGroups(0).Tabs(i).Form.GetType.Equals(frmLifter.GetType) Then If frmMDI.UltraTabbedMdiManager1.TabGroups(0).Tabs(i).Form.Text = LifterId Then Dim F As frmLifter = CType(frmMDI.UltraTabbedMdiManager1.TabGroups(0).Tabs(i).Form, frmLifter) If Not F.grdAlarm.DataSource Is Nothing Then Dim DTAlarm As DataTable = CType(F.grdAlarm.DataSource, DataTable) DTAlarm.Rows.Add(New Object() {CDate(DT), StatusId, StatusMsg, BackColor.ToArgb}) F.grdAlarm.DataSource = DTAlarm 'If DTAlarm.Rows.Count <> 0 Then F.grdAlarm.ActiveRow = F.grdAlarm.Rows(F.grdAlarm.Rows.Count - 1) F.lblAlarm.Text = StatusMsg F.lblAlarm.BackColor = BackColor F.LatestStatusIsBlinking = IsBlinking F.LatestStatusColor = BackColor F.LatestStatusDT = DT frmMDI.tsslStatus.Text = DT & " " & LifterId & ":" & StatusMsg 'End If End If End If End If Next End If
when it come to that line
Dim DTAlarm As DataTable = CType(F.grdAlarm.DataSource, DataTable)
it show me: Datatable internal index is corrupted: 13
what is the problem?
You should report this to Infragistics Developer Support. Submit an incident to Infragistics Developer Support
This issue is being reported and I see that it is spreading.
I would like to know if all users who have this issue are currently using Vista with the latest patches as it does not appear with our XP installations.
Yes, I'm also having this issue. My grid is bound to a datatable. Then I periodically re-fetch the data for that table and show the latest data on the grid. I am using BackgroundWorker to do the fetaching. Recently, it keeps getting 'Big Red X' randomly since last Novemember (if my memo is right). Following is the stack trace for the exception. I am using VS2005, .Net Framework 2. Our product is installed in XP Pro with SP2.
Please let me know whether this 'Red Cross' issue is fixed or not. Thanks!
Fei.
System.Data at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) at System.Data.DataView.GetRecord(Int32 recordIndex) at System.Data.DataView.CreateChildView(DataRelation relation, Int32 recordIndex) at System.Data.DataRelationPropertyDescriptor.GetValue(Object component) at Infragistics.Win.UltraWinGrid.RowsCollection.get_Data_List() at Infragistics.Win.UltraWinGrid.RowsCollection.get_BindingList() at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRows() at Infragistics.Win.UltraWinGrid.RowsCollection.EnsureNotDirty() at Infragistics.Win.UltraWinGrid.ScrollCountManagerSparseArray.VerifyAgainstScrollVersion() at Infragistics.Win.UltraWinGrid.RowsCollection.GetVisibleRowCount(IncludeRowTypes includeRowTypes) at Infragistics.Win.UltraWinGrid.UltraGridRow.HasChild(UltraGridBand band, Boolean excludeHidden, IncludeRowTypes includeRowTypes) at Infragistics.Win.UltraWinGrid.UltraGridRow.get_HasExpansionIndicator() at Infragistics.Win.UltraWinGrid.RowColRegionIntersectionUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UltraWinGrid.RowColRegionIntersectionUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused) at Infragistics.Win.UIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.UltraWinGrid.UltraGridUIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe) at Infragistics.Win.UltraWinGrid.UltraGrid.OnPaint(PaintEventArgs pe) 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 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)
If this is happening and your application is using threading, then it's probably no big mystery. Seemingly "random" crashes like this are almost always the result of using multiple threads improperly and not correctly marshalling the data across from the background thread to the UI thread.
I am using Background worker object from .Net Framework. In DoWork Event, I only fetch data and merge data. NO UI operation is involved at all. In WorkComplete Event, I set Grid.DataSource = datatable. This is all I did. Then why i get this Red Cross? When I look at the stack trace, why they all point to the Infragistics routines?
I had a similar problem using DoWork to fill the datasets. Usually there would be no error, but the datasets were only partially filled. When there was an error, it was often too vague to be of any use. Finally I got the "System.InvalidOperationException: DataTable internal index is corrupted: '13'." error, which pointed to filling the datasets in a separate thread. I was able to get it to work by adding "System.Threading.Thread.Sleep(200);" before the fills. To be extra safe, I removed the separate thread call entirely, and put the fills back into form_Load, without the experimental delay.
BTW Mike, you do amazing work. To think of what I could do if I had your patience!
fei_css said:In DoWork Event, I only fetch data and merge data. NO UI operation is involved at all.
When you merge the data, are you merging into the data source that grid is bound to? If so, then you may be causing the data source to send notifications across threads.
fei_css said:When I look at the stack trace, why they all point to the Infragistics routines?
Since you didn't post your call stack, I can't really guess. But the fact that it shows Infragistics methods doesn't really mean anything. The fact that the exception occurs in the grid code just means that the grid tried to do something and failed. Why it failed is the issue. It probably fails because the data source is in a state where it cannot be accessed by the UI thread.