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; }
okay, so it sounds like you are satisfied using the modified source code, is that right? i have fixed the SendEvents method to silently fail starting in 10.3. if you are looking for this to be resolved in a service release of an existing version, please let me know.
Sorry David, i have not replied sooner was away doing other things :¬(
I actualy meant 1/6 times the middle button was used inside the program and this tested on various machines.
This led me to belive the variable had been garbage collected due to the order of those 2 lines of code., but again I dont l know your gode as good as yourselves
I had 2 choices
Too wrap a catch around the null exception and make like it didnt happen (anoy the users) or to reverse the order of those calls in the source code - I chose the latter
thanks :¬)
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?
Bump due to change in support system - "Faster Responses, More Content and Better Infragistics Help" 11 may 2010