Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
670
Middle Mouse Button Down causes crash 1-6 times on SOME of our test machines
posted

It appeares the "MouseEventArg e" is sometimes passed as null to...
Infragistics.Win.UltraWinChart.UltraChart.SendEvents(Primitive p, MouseEventArgs e)
causing the crash (about 1 in 6) on our testing (using middle mouse button)

After I make some source changes in UltraChart.cs, that moves the base.OnMousedown()  to after the Tools.MouseDown, the Mouse arguments are no longer randomly null in SendEvents

Below I have included my chages to UltraChart.cs:OnMOuseDown line 5967

        protected override void OnMouseDown(MouseEventArgs evt)
        {
            this.lastInput.ViewPoint = new Point(evt.X, evt.Y);
            this.lastInput.Buttons = evt.Button;
            this.lastInput.Modifiers = Control.ModifierKeys;
            this.lastInput.MouseEventArgs = evt;

            if (this.AcceptsFocus)
            {
                // RequestFocus();

                //MAC crash in UltraChart.SendEvents originate here
                //System.NullReferenceException: Object reference not set to an instance of an object.
                //at Infragistics.Win.UltraWinChart.UltraChart.SendEvents(Primitive p, MouseEventArgs e)
                //at Infragistics.Win.UltraWinChart.DefaultTool.MouseDown()
                //at Infragistics.Win.UltraWinChart.UltraChart.OnMouseDown(MouseEventArgs evt)
                //at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
                //MAC I belive base.OnMouseDown should be after Tool.Mousedown because
                //MAC sometimes evt is null inside SendEvents(p,e) 
                //MAC garbage collection?
                //base.OnMouseDown(evt);
                //MAC

                this.Tool.MouseDown();

                //MAC
                base.OnMouseDown(evt);
                //MAC
             
            }

            this.lastInput.MouseEventArgs = null;
        }

 

Parents
  • 28496
    Offline posted

    mac,

    sorry for the delay, the dev team has been going full steam on our next volume release, and this was not a question the support team could have helped with.

    in fact, base.OnMouseDown used to be called after this.Tool.MouseDown in an older version, but we had to change it due to some issues with focus in MDI applications.

    i think i would be more comfortable detecting the error from DefaultTool.MouseDown() and avoiding the exception from there.

    do you have any idea what's special about the 1 in 6 machines that produce this exception?

Reply Children