I have the following Code in windows forms .NET 2 Framework applicaion
private UltraMonthViewSingle uMonthView;
private UltraDayView uDay;
this.uMonthView.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.uMonthView_MouseEnterElement); this.uMonthView.MouseLeaveElement += new Infragistics.Win.UIElementEventHandler(this.uMonthView_MouseLeaveElement);
this.uMonthView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.uMonthView_MouseMove);
this.uDay.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.uDay_MouseEnterElement); this.uDay.MouseLeaveElement += new Infragistics.Win.UIElementEventHandler(this.uDay_MouseLeaveElement);
this.uDay.MouseMove += new System.Windows.Forms.MouseEventHandler(this.uDay_MouseMove);
I am seeing a stackoverflow exception when my mouse pointer lies on the calendar.
(v) wsCalendar ctor(): DEFAULT(v) wsCalendar uDay_InitializeVisibleDay(): DEFAULT(v) wsCalendar uDay_InitializeVisibleDay(): DEFAULT(v) wsCalendar SetAppearances(): DEFAULT(v) wsCalendar PopulateContextMenu(): DEFAULT(v) wsCalendar SetVisibleView(): 0: DEFAULT(v) wsCalendar SetVisibleView(): .. 0: DEFAULT(v) wsCalendar uDay_InitializeVisibleDay(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar DayMonth_Paint: DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULT(v) wsCalendar uMonthView_MouseMove(): DEFAULTAn unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll
Event Viewer information ...
Fault bucket 2108143563755997667, type 5Event Name: CLR20r3Response: Not availableCab Id: 1893868279290822969
Problem signature:P1: myapp.exeP2: 100.18.327.1858P3: 5aba94abP4: mscorlibP5: 2.0.0.0P6: 59a7213cP7: 1fe0P8: 69P9: ExceptionP10:
Hello windy,
I have done an initial investigation into this stack overflow exception that you are seeing, and from the code and stack trace alone, I cannot seem to decipher what exactly may be happening to cause this exception. If I had to guess, this appears to be likely due to something happening in the MouseMove event that is forcing the UltraMonthViewSingle to repaint and/or fire the MouseMove event again.
In order to test this, I would like you to try unhooking the MouseMove event at the beginning of the MouseMove event and then re-hooking it at the end of that event handler. This will allow us to determine whether or not the actions in the MouseMove event are essentially causing it to fire again and again.
If this does not work, then would it be possible for you to please provide the code that you are using in the MouseMove event for your UltraMonthViewSingle, along with the version of NetAdvantage for Windows Forms that you are using when targeting .NET 2?
Please let me know if you have any other questions or concerns on this matter.
The same code is working fine for .NET 4
If targeting .NET 4 is an option for you, that may be your best solution.
If you do need to target .NET 2.0, then we need more information to assist you including the result of the test that Andrew suggested?
If that does indeed resolve the stack overflow exception, that may be the solution for .NET 2.0.
If that doesn't work to resolve the issue, we need a sample that reproduces the issue that we can debug. If you provide the logic that you have in the uDay_MouseMove event handler, we may be able to use that to replicate the behavior internally. Even if we just have the code we may be able to suggest other possible solutions even if we can't replicate the issue.