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.
Unfortunately, activation email could not send to your email. Please try again.

Null Reference Exception in

Thread ID:

Created:

Updated:

Platform:

Replies:

70037 Nov 23,2007 08:45 AM Dec 6,2007 07:01 PM Windows Forms 5
loading
Tags: GridControl
Liquidnitrogen
Asked On November 23, 2007 08:45 AM

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)



haneefm [Syncfusion]
Replied On November 23, 2007 07:07 PM

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


Liquidnitrogen
Replied On November 24, 2007 06:21 AM

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




Administrator [Syncfusion]
Replied On November 25, 2007 04:08 AM

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


MyGGC.Invoke(yada yada...);



Liquidnitrogen
Replied On November 25, 2007 09:23 PM

>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.


Rajagopal [Syncfusion]
Replied On December 6, 2007 07:01 PM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;