[Mono-bugs] [Bug 551009] New: System.Drawing crashes in multithreaded application

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Oct 29 10:46:49 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=551009


           Summary: System.Drawing crashes in multithreaded application
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: libgdiplus
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: alexander.shulgin at yessoftware.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=324698)
 --> (http://bugzilla.novell.com/attachment.cgi?id=324698)
test source file

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.3)
Gecko/20090910 Ubuntu/9.04 (jaunty) Shiretoko/3.5.3

A WinForms application crashes randomly when UI update is happening at the same
time as the background thread is making heavy use of System.Drawing.

This happens on Linux and OS X.

The background thread is _not_ using Graphics objects created in the main
thread, nor it tries to interact with UI by any means.  All work is done on
Bitmap and Graphics objects allocated in the background thread.


Reproducible: Always

Steps to Reproduce:
Compile and run sample code.

Actual Results:  
Application crashes with gdb stack trace (the signal can be SIGSEGV, SIGABRT,
SIGILL, etc.).

Expected Results:  
Application shouldn't crash.  All started threads should complete their work
and exit, after writing a completion message on console.


Also tested on the latest 2.6 preview.

Uncommenting lock {} lines in test C# code helps to avoid crashes.

Crashes can be reproduced with only Graphics.FromImage and Graphics.Dispose
calls, w/o any actual drawing in the threads.

-- 
Configure bugmail: http://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