[Mono-bugs] [Bug 394531] New: Control. Invoke causes InvalidOperationException if CheckForIllegalCrossThreadCalls is used
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon May 26 11:25:33 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=394531
Summary: Control.Invoke causes InvalidOperationException if
CheckForIllegalCrossThreadCalls is used
Product: Mono: Class Libraries
Version: SVN
Platform: x86
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: daniel.grunwald at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=218146)
--> (https://bugzilla.novell.com/attachment.cgi?id=218146)
Test case
Description of Problem:
When CheckForIllegalCrossThreadCalls is set to true, MWF throws an exception
even for valid cross thread calls.
Steps to reproduce the problem:
1. Start attached test program
2. Click on the button
Actual Results:
Unhandled Exception: System.InvalidOperationException: Cross-thread access of
handle detected. Handle access only valid on thread that created the control
at System.Windows.Forms.Control.get_Handle () [0x00031] in
/home/daniel/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:2857
at (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control:get_Handle ()
at System.Windows.Forms.Control.BeginInvokeInternal (System.Delegate method,
System.Object[] args, System.Windows.Forms.Control control) [0x0000c] in
/home/daniel/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:1297
at System.Windows.Forms.Control.Invoke (System.Delegate method,
System.Object[] args) [0x0001a] in
/home/daniel/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:4007
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:Invoke
(System.Delegate,object[])
at System.Windows.Forms.Control.Invoke (System.Delegate method) [0x00020] in
/home/daniel/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:3994
at Form1.RunThread () [0x0003a] in /home/daniel/CrossThread.cs:28
Expected Results:
Button text changes to "OK"
--
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.
More information about the mono-bugs
mailing list