Hi. Im running with the 2008 Vol 1 in VS2005, and have a strange intermittant problem with one of the ultragrids.
As a bit of background, I'm using a backgroundworker to populate a Dataset that the grid is being bound to. Due to issues previously with this, I have been binding the UG to an empty copy of the dataset, in order to prevent errors whilst populating it, and to keep the layout intact.
This has been working fine until I started adding filters to the mix. Basically, when the BGW is about to be called, I check various fields for content, and build an SQL Where string based on that, which is stored as a class variable (to get past the issue with referencing objects from outside the UI thread). Now, I get an "Object reference not set to an instance of an object." from the Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) method.
However, the strange thing is that its intermittant. I can add filter content to the form, and run the query. Sometimes it will run fine a couple of times, and sometimes it will just die with this error? Nothing is changed between runs.
I've included the error details below, any ideas?:
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************System.NullReferenceException: Object reference not set to an instance of an object. 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.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.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, Boolean preventAlphaBlendGraphics) at Infragistics.Win.UIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics) 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)************** Loaded Assemblies **************mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll----------------------------------------Microsoft.VisualStudio.HostingProcess.Utilities Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.42 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.HostingProcess.Utilities/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.HostingProcess.Utilities.dll----------------------------------------System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------Microsoft.VisualStudio.HostingProcess.Utilities.Sync Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.42 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.HostingProcess.Utilities.Sync/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll----------------------------------------vshost Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.42 CodeBase: file:///C:/SVN/Orbit/Orbit/bin/Debug/Orbit.vshost.exe----------------------------------------ADODB Assembly Version: 7.0.3300.0 Win32 Version: 7.10.6030 CodeBase: file:///C:/WINDOWS/assembly/GAC/ADODB/7.0.3300.0__b03f5f7f11d50a3a/ADODB.dll----------------------------------------System.Data Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll----------------------------------------System.Deployment Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll----------------------------------------System.Design Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll----------------------------------------System.Runtime.Serialization.Formatters.Soap Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Serialization.Formatters.Soap/2.0.0.0__b03f5f7f11d50a3a/System.Runtime.Serialization.Formatters.Soap.dll----------------------------------------System.Web Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll----------------------------------------System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------Infragistics2.Excel.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Excel.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Excel.v8.1.dll----------------------------------------Infragistics2.Win.UltraWinDataSource.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinDataSource.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinDataSource.v8.1.dll----------------------------------------Infragistics2.Win.UltraWinGrid.ExcelExport.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinGrid.ExcelExport.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinGrid.ExcelExport.v8.1.dll----------------------------------------Infragistics2.Win.UltraWinTabbedMdi.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinTabbedMdi.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinTabbedMdi.v8.1.dll----------------------------------------Infragistics2.Shared.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Shared.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Shared.v8.1.dll----------------------------------------Infragistics2.Win.Misc.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.Misc.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.Misc.v8.1.dll----------------------------------------Infragistics2.Win.UltraWinEditors.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinEditors.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinEditors.v8.1.dll----------------------------------------Infragistics2.Win.UltraWinExplorerBar.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinExplorerBar.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinExplorerBar.v8.1.dll----------------------------------------Infragistics2.Win.UltraWinGrid.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinGrid.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinGrid.v8.1.dll----------------------------------------Infragistics2.Win.UltraWinStatusBar.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinStatusBar.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinStatusBar.v8.1.dll----------------------------------------Infragistics2.Win.UltraWinTabControl.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinTabControl.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinTabControl.v8.1.dll----------------------------------------Infragistics2.Win.UltraWinToolbars.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinToolbars.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinToolbars.v8.1.dll----------------------------------------Infragistics2.Win.v8.1 Assembly Version: 8.1.20081.1000 Win32 Version: 8.1.20081.1000 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.v8.1.dll----------------------------------------Microsoft.VisualBasic Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll----------------------------------------Orbit Assembly Version: 0.0.1.0 Win32 Version: 0.0.1.0 CodeBase: file:///C:/SVN/Orbit/Orbit/bin/Debug/Orbit.EXE----------------------------------------System.Runtime.Remoting Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll----------------------------------------System.Configuration Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------Infragistics.License Assembly Version: 1.0.5005.10 Win32 Version: 1.0.5005.10 CodeBase: file:///C:/WINDOWS/assembly/GAC/Infragistics.License/1.0.5005.10__7dd5c3163f2cd0cb/Infragistics.License.dll----------------------------------------Accessibility Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll----------------------------------------System.Transactions Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll----------------------------------------System.EnterpriseServices Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll----------------------------------------************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.For example:<configuration> <system.windows.forms jitDebugging="true" /></configuration>When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box.
Never mind, it was (still) a threading issue. I was trying to set the change of Dataset to the empty dataset from the BGW_DoWork method.
Moved it to the UI thread, prior to calling DoWork, and this seems to have settled the issue.