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
245
Bug report for UltraDesktopAlert: System.ComponentModel.Win32Exception upon timed autoclose
posted

Hello :)

A user of our software encountered a difficult to reproduce bug. Our software crashed with a System.ComponentModel.Win32Exception in relation to the UltraDesktopAlert. The stack trace looks like this:

Stack trace:
at System.Windows.Forms.Form.UpdateLayered()
at System.Windows.Forms.Form.set_Opacity(Double value)
at Infragistics.Win.DesktopAlertWindowFormBase.ShowWindow(Rectangle bounds, Single opacity)
at Infragistics.Win.Misc.UltraDesktopAlertWindow.Show(Rectangle initialBounds, Single initialOpacity)
at Infragistics.Win.Misc.UltraWinDesktopAlert.DesktopAlertWindowAnimationManager.Start(AnimationSequence animationSequence, Boolean mouseEnter)
at Infragistics.Win.Misc.UltraWinDesktopAlert.DesktopAlertWindowAnimationManager.Stop()
at Infragistics.Win.Misc.UltraDesktopAlertWindowInfo.BeforeCloseHelper(DesktopAlertCloseReason closeReason)
at Infragistics.Win.Misc.UltraWinDesktopAlert.DesktopAlertWindowAnimationManager.OnAutoCloseTimerTick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Research in our development team found that this might be because the window's opacity is set when the window already has been disposed of, as per http://social.msdn.microsoft.com/Forums/en/winforms/thread/71ae31e0-13e2-48b7-9883-2e7f724f5171 .

Given the only spot our own code touches anything in relation to timing and the desktop alerts is setting the autoclose delay, we believe this might be an issue with the UltraDesktopAlert.

To provide as much (hopefully useful) detail as possible, I enclosed details below.

With best regards,
C. Kopp


 

public DesktopAlertHandler(IIconResourceService iconResourceService)
{
m_IconResourceService = iconResourceService;
m_DesktopAlert = new UltraDesktopAlert();
m_DesktopAlert.AnimationStyleShow = AnimationStyle.None;
m_DesktopAlert.AnimationStyleAutoClose = AnimationStyle.Fade;
m_DesktopAlert.Style = DesktopAlertStyle.Office2007;
m_DesktopAlert.AutoCloseDelay = 10000;
m_DesktopAlert.AutoClose = DefaultableBoolean.True;
m_DesktopAlert.MultipleWindowDisplayStyle = MultipleWindowDisplayStyle.None;
m_DesktopAlert.TreatCaptionAsLink = DefaultableBoolean.False;
m_DesktopAlert.TreatFooterTextAsLink = DefaultableBoolean.False;
m_DesktopAlert.TreatTextAsLink = DefaultableBoolean.False;

m_DesktopAlert.DesktopAlertLinkClicked += OnDesktopAlertLinkClicked;
m_DesktopAlert.DesktopAlertClosing += OnDesktopAlertClosing;
}

private void OnDesktopAlertLinkClicked(object sender, DesktopAlertLinkClickedEventArgs e)
{
if (e.LinkType != DesktopAlertLinkType.Text && e.LinkType != DesktopAlertLinkType.Caption)
{
return;
}
e.CloseWindow = true;

// ...
}

private void OnDesktopAlertClosing(object sender, DesktopAlertClosingEventArgs e)
{
// ...
}

The client's environment is this:

--- Environment ---
CLR: .NET Framework 2.0.50727.3623
CLR Type: .NET
CLR Version: 2.0.50727.3623
Platform: Win32NT
OS: Microsoft Windows XP Professional Service Pack 3
OS Version: 5.1.2600.196608
ARCH: x86
Culture: de-CH
UI Culture: en-US
Running with 32-bit.

Working directory: C:\Documents and Settings\<foo>\My Documents\<bar>\<baz>

 

Parents Reply Children
No Data