Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » Elegant.UI exceptions in forms that run on threads other than the main application thread - Part 2 Collapse All
Subject Author Date
Alexander Kaay Jun 25, 2010 - 8:25 AM

Hi,


The previous fix for calls to controls from wrong threads has successfully eliminated the invalid control call exception, however, it now produces a different exception, although with somewhat reduced frequency:


System.NullReferenceException occurred

  Message=Object reference not set to an instance of an object.

  Source=Elegant.Ui.Common

  StackTrace:

       at Elegant.Ui.Control.OnMouseMove(IControlInternal control, MouseEventArgs e)

       at Elegant.Ui.Control.OnMouseMove(MouseEventArgs e)

       at Elegant.Ui.FormFrame.OnMouseMove(MouseEventArgs e)

       at Elegant.Ui.Control.Elegant.Ui.IControlInternal.InvokeMouseMove(MouseEventArgs e)

       at Elegant.Ui.FormFrameSkinner.ProcessMouseMove(Message& m)

       at Elegant.Ui.FormFrameSkinner.ProcessFormWndProc(Message& m)

       at Elegant.Ui.FormFrameSkinnerMessagesSink.WndProc(Message& m)

       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.Run(Form mainForm)

       at AVue.XUILogTableMulti.TIStart(LaunchSettings ASettings) in C:\AutoFET\AutoFET5\AutoMotion\X\UIForms\XUILogTableMulti.vb:line 196

  InnerException:


The end result is the same - the message pump thread bails out of Application.Run. The rest of the test case code is the same from last week.


-Alex

Technical Support Jul 5, 2010 - 2:01 AM

We tried but failed to get cell buttons stuck in pressed state. We would appreciate if you provide a test project illustrating this issue.

Alexander Kaay Jul 5, 2010 - 4:51 AM

One more note re: test code that was emailed: you can easily modify it to make 20 or 50 forms as opposed to 2, which will make it fairly close to our test case for control thread safety issues.

Alexander Kaay Jul 5, 2010 - 4:36 AM

I have emailed the sample code to support@prof-uis.com ... this forum does not appear to have a way to attach files.


Thank you

Technical Support Jun 28, 2010 - 10:59 AM

Thank you again for the bug report. Please try the updated assemblies below which include the fixes for the ribbon and grid:

elegant-ui-67978.zip

Alexander Kaay Jun 30, 2010 - 3:58 PM

Thank you for getting the update out quickly - it appears to have cured the null reference errors completely. I have not seen the other exceptions either, but I haven’t not run the test cases yet (tomorrow).


However, the CellButton click event is still not working on the grid v3.6, and the buttons still get stuck in the "pressed" state unless they somehow get refreshed (e.g. by disabling and turning them on again).The "regular" click event (inherited from Control) is working properly.


-A

Alexander Kaay Jun 25, 2010 - 9:04 AM

And one more detail (in case T.M.I. has not occurred yet) - the cell buttons on elegant.grid v3.6 are not working properly (or rather at all most of the time), maybe that’s related. They press, get stuck in pressed state and fail to produce the expected CellButtonClick event, although that is partially rectifiable by using the Click event (which does come) and then calling GetRenderableFromPoint to get to the cell.


Is Elegant grid 3.6 some I ought to be even using? And if not, how do I make the old grid v1.3 look consistent with the new ribbon control?

Alexander Kaay Jun 25, 2010 - 8:57 AM

Greetings again -


I spoke too soon. The old exception is still around, except for in more limited circumstances:



   at System.Windows.Forms.Control.get_Handle()
   at System.Windows.Forms.Control.PointToClientInternal(Point p)
   at System.Windows.Forms.Control.PointToClient(Point p)
   at Elegant.Ui.Control.PointToClient(IControlInternal control, Point point)
   at Elegant.Ui.Control.PointToClient(Point point)
   at Elegant.Ui.Grid.GridButton.OnInputSpyMouseUp(InputSpyMouseEventArgs e)
   at Elegant.Ui.InputSpy.NotifyAboutMouseUpEvent(IInputSpyMouseListener[] listeners, MouseButtons buttons, Int32 x, Int32 y, IntPtr hwnd)
   at Elegant.Ui.InputSpy.MouseHookProc(Int32 nCode, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at AVue.XFTimerCtrl.XTimerControlStart(delXStartupDelegate AStartupDelegate, Object[] AStartupArgs)

This one appears to be related to button on a elegant grid that sits within a form with elegant controls. The grid is V3.6 from the elegant ribbon package.


-A