[Mono-bugs] [Bug 641756] New: WinForms -> X11 Clipboard handling causes Application.Idle processing, which is bad of any idle handling calls clipboard functions.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 24 13:23:38 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=641756

https://bugzilla.novell.com/show_bug.cgi?id=641756#c0


           Summary: WinForms -> X11 Clipboard handling causes
                    Application.Idle processing, which is bad of any idle
                    handling calls clipboard functions.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tom_hindle at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=391489)
 --> (http://bugzilla.novell.com/attachment.cgi?id=391489)
Test case which reproduces bug.

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.5
(KHTML, like Gecko) Chrome/4.0.249.43 Safari/532.5

Mono X11 Clipboard handling calls UpdateMessageQueue, which has the side affect
of potentially calling Idle handlers.

If any Idle handlers call Clipboard functions, this can cause idle handler
reentry.

See attached test case.

Incidentally removing the reentry check from the idle handler will actually
cause mono to segfault.


I will attach a patch shortly which fixes this by overloading
UpdateMessageQueue to allow Clipboard methods to call a version that doesn't
run idle processing. 

Reproducible: Always

Steps to Reproduce:
1. Compile and run attached test case.

Actual Results:  
Unhandled Exception: System.ApplicationException: Idle ReEntry

Expected Results:  
Exception should not be thrown.
Program should repeatably display "In HandleApplicationIdle" to the Console.

-- 
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