[Mono-dev] Patches for mono-winforms
Steven Boswell II
ulatekh at yahoo.com
Sun Jul 29 15:44:22 UTC 2012
https://github.com/mono/mono/commit/38bdbad5071487a11f4330077c383375dce39840
This change introduced a OneIdlePerThread unit test that has never worked for me. All I get is the following exception:
System.InvalidOperationException : Cannot call Invoke or BeginInvoke on a control until the window handle is created
Patch #18 fixes that by creating a Form type that calls CreateHandle() in its constructor. But now the unit test hangs hard in Mono!
I created a project with the unit-test, and when run in Mono, it hangs hard; selecting "Run -> Pause" in MonoDevelop hangs MonoDevelop, and the debugged process chews up 100% of the CPU time
I ran the project in .NET, and instead of a hang, I get this exception:
System.InvalidOperationException: Cross-threaded operation not valid: Control '' accessed from a thread other than the thread it was created on.
Patch #18a fixes that by moving the creation of form2 into the right thread. Now the unit test passes.
So patch #18a can be checked in, but note that patch #18 demonstrates that Mono hangs in a situation where .NET throws an exception.
Steven Boswell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120729/cbebeaa4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mwf-18-FormEvent-OneIdlePerThread-unittest.patch
Type: application/octet-stream
Size: 1284 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120729/cbebeaa4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mwf-18a-FormEvent-OneIdlePerThread-unittest.patch
Type: application/octet-stream
Size: 1566 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120729/cbebeaa4/attachment-0001.obj>
More information about the Mono-devel-list
mailing list