[Mono-bugs] [Bug 81667][Min] New - Crash from NotifyIcon.HideSystray on Form exit if not fully configured
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri May 18 07:19:40 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by andyhume32 at yahoo.co.uk.
http://bugzilla.ximian.com/show_bug.cgi?id=81667
--- shadow/81667 2007-05-18 07:19:40.000000000 -0400
+++ shadow/81667.tmp.16293 2007-05-18 07:19:40.000000000 -0400
@@ -0,0 +1,93 @@
+Bug#: 81667
+Product: Mono: Class Libraries
+Version: 1.2
+OS:
+OS Details: XP SP2
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com
+ReportedBy: andyhume32 at yahoo.co.uk
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Crash from NotifyIcon.HideSystray on Form exit if not fully configured
+
+Take a form containing containing a NotifyIcon instance, with _no_ icon
+set i.e. the NotifyIcon.Icon properrty not set. When the form is opened,
+not 'used' (no clicks on it etc), then closed the application exits with
+the runtime termination below.
+
+Mono 1.2.4. (installer). Tested only on Windows XP SP2, where it always
+occurs.
+
+[[
+Stacktrace:
+
+ at (wrapper managed-to-native)
+System.Windows.Forms.XplatUIWin32.Win32CreateWindow
+(uint,string,string,uint,int,int,int,int,intptr,intptr,intptr,intptr)
+<0x00004>
+ at (wrapper managed-to-native)
+System.Windows.Forms.XplatUIWin32.Win32CreateWindow
+(uint,string,string,uint,int,int,int,int,intptr,intptr,intptr,intptr)
+<0xffffffff>
+ at System.Windows.Forms.XplatUIWin32.CreateWindow
+(System.Windows.Forms.CreateParams) [0x0006b] in
+C:\cygwin\tmp\scratch\mono-1.2.4
+\mcs\class\Managed.Windows.Forms\System.Windows.Forms\XplatUIWin32.cs:1276
+ at System.Windows.Forms.XplatUI.CreateWindow
+(System.Windows.Forms.CreateParams) [0x00000] in
+C:\cygwin\tmp\scratch\mono-1.2.4
+\mcs\class\Managed.Windows.Forms\System.Windows.Forms\XplatUI.cs:340
+ at System.Windows.Forms.NativeWindow.CreateHandle
+(System.Windows.Forms.CreateParams) [0x0000d] in
+C:\cygwin\tmp\scratch\mono-1.2.4
+\mcs\class\Managed.Windows.Forms\System.Windows.Forms\NativeWindow.cs:108
+ at System.Windows.Forms.Control.CreateHandle () [0x0003f] in
+C:\cygwin\tmp\scratch\mono-1.2.4
+\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:3888
+ at System.Windows.Forms.Form.CreateHandle () [0x00000] in
+C:\cygwin\tmp\scratch\mono-1.2.4
+\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Form.cs:1664
+ at System.Windows.Forms.Control.get_Handle () [0x0002b] in
+C:\cygwin\tmp\scratch\mono-1.2.4
+\mcs\class\Managed.Windows.Forms\System.Windows.Forms\Control.cs:2610
+ at (wrapper remoting-invoke-with-check)
+System.Windows.Forms.Control.get_Handle () <0xffffffff>
+ at System.Windows.Forms.NotifyIcon.HideSystray () [0x00013] in
+C:\cygwin\tmp\scratch\mono-1.2.4
+\mcs\class\Managed.Windows.Forms\System.Windows.Forms\NotifyIcon.cs:516
+ at System.Windows.Forms.NotifyIcon.Dispose (bool) [0x0000b] in
+C:\cygwin\tmp\scratch\mono-1.2.4
+\mcs\class\Managed.Windows.Forms\System.Windows.Forms\NotifyIcon.cs:681
+ at System.ComponentModel.Component.Finalize () [0x00000] in
+C:\cygwin\tmp\scratch\mono-1.2.4
+\mcs\class\System\System.ComponentModel\Component.cs:92
+ at (wrapper runtime-invoke) System.Object.runtime_invoke_void
+(object,intptr,intptr,intptr) <0xffffffff>
+
+This application has requested the Runtime to terminate it in an unusual
+way.
+Please contact the application's support team for more information.
+]]
+
+I attach a simple repro, compile with:
+gmcs NotifyIconNoIconForm.cs /r:System.Drawing /r:System.Windows.Forms
+
+Run it with --debug, see the form, and immediately close it. See the
+fault.
+
+If the form is opened and the button is clicked, the fault does not occur.
+
+If the Icon property is set the problem again does not occur (even if
+form isnt clicked). To show this pass a .ico (etc?) filename on the
+command line.
+
+(Note a second fault, in that Icon..ctor(String filename) needs write-
+access to open the file.
+And a third, that the order of the properties is important, Visible must
+be set after Icon. I'll create two new bugs for those two).
More information about the mono-bugs
mailing list