We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Null Reference Exception in

After using Syncfusion Grid after 6+ months we got an exception, that was generate from Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.KillDelayUpdateTimer.

Please suggest if the same is fixed in the new data grid? We are currently using 3.3 release.

Thanks
Nitro

http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

true
System.NullReferenceException
Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.KillDelayUpdateTimer()
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.Invalidate()
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.Reinitialize()
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.SynchronizeGridWithEngine()
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.Application_Idle(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)



5 Replies

HA haneefm Syncfusion Team November 24, 2007 12:07 AM UTC

Hi Liquidnitrogen,

Thank you for your update.

Are you using multiple threads? The GridGroupingControl (like all Windows Forms controls) can only generally be assessed, and used from the thread that created it.

The GridGroupingControl does try to handle multiple threads by doing grid.InvokeRequired checks at the start of the ListChanged event handler and CurrencymanagerChanged event handler that have the code that the grid uses to respond to updates of the data from outside of the grid. But if you are directly calling grid methods from within your code and there is a chance the calls will not be on the thread that created the grid, then you should use grid.InvokeRequired checks from your code as well. If the grid.InvokeRequired comes back true, then you should use grid.Invoke (and not grid.BeginInvoke) to call the method again on the grid''''s thread. Here is a forum link discussing this idea. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=78

If you do not think this is a threading issue, Please upload a sample showing the problem, we can debug it here.

Best regards,
Haneef



LI Liquidnitrogen November 24, 2007 11:21 AM UTC

Dear Haneef,

To give you an idea the code where we update the list is inside something like

if(MyGGC.InvokeRequired)
{
\\Marshal thread to the GUI thread
MyGGC.BeginInvoke(yada yada...);
}
else
{
MyGGC.BeginUpdate()
UpdateHere
MyGGC.EndUpdate()
}

I could not reproduce this problem irrespective multiple testing and the same application is used by atleast 6 users very heavily and we never saw this problem before anytime over last six months.

This is rally strange to me, am not sure (and may be wrong) but if you look at the stack trace I see function names as idle etc which really makes me doubt if this issue is related to a non-gui thread update issue, also not sure if a nullreferenceexpcetion is thrown for a non-gui thread update?

Thanks for your time

Cheers
Nitro





AD Administrator Syncfusion Team November 25, 2007 09:08 AM UTC

Try switching your BeginInvoke to an Invoke to see if this handles this problem.


MyGGC.Invoke(yada yada...);




LI Liquidnitrogen November 26, 2007 02:23 AM UTC

>Try switching your BeginInvoke to an Invoke to see if this handles this problem.


MyGGC.Invoke(yada yada...);




I am trying to repro this bug under different scenarios but so far i could not accomplish the same. Like i said it happened just once with one user.

In the mean time would love to hear more from you all if you could give me some ideas.



RA Rajagopal Syncfusion Team December 7, 2007 12:01 AM UTC

Hi,

We are not sure what might be causing this issue to occur in one particular machine alone. Its difficult to analyze such issues without any working sample. If you could send us a sample application having this problem, we will able to test it and let you know the how it works here.

Thanks,
Rajagopal


Loader.
Live Chat Icon For mobile
Up arrow icon