https://bugzilla.novell.com/show_bug.cgi?id=687203
https://bugzilla.novell.com/show_bug.cgi?id=687203#c0 Summary: Form does not update and later deadlocks when using Invoke from a timer & moving window Classification: Mono Product: Mono: Class Libraries Version: 2.10.x Platform: PC OS/Version: Windows 7 Status: NEW Severity: Critical Priority: P5 - None Component: Windows.Forms AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Created an attachment (id=424700) --> (http://bugzilla.novell.com/attachment.cgi?id=424700) Sample project User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MALC) App has a simple win-form with 1 label and another background form that waits for WM_DEVICECHANGE notifications from windows to monitor device plug/unplug. When a device change is detected, we run a timer to push forward actual processing since multiple such notifications are sent by Windows. When we try to use a simple Invoke from the timer, as such, it does not update form if we move the form while all this is happening. private void PerformDeviceChange(object state) { this.Invoke(new UpdateDelegate(UpdateProc)); } void UpdateProc() { // increment text on label label1.Text = (Convert.ToInt32(label1.Text) + 1).ToString(); } Doing this directly, without a timer works. Offcourse this works for .NET. Once this happens, continuing to do so many times will result in the process later failing to exit - deadlocked in GDIPLUS. Reproducible: Always Steps to Reproduce: 1. Run sample app 2. Use any USB device that you have and plug in - see number on label increment 3. Now unplug device - same increment. 4. Now plug back while dragging window - label will not be updated (try a few times)... Actual Results: Label will not update every time I plug/unplug a device if I move the window while doing so. Expected Results: Label to be updated every time and process to exit even if I plug/unplug 20 times... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
