https://bugzilla.novell.com/show_bug.cgi?id=467202
Summary: Bitmap creating from other bitmap not thread safe.
Classification: Mono
Product: Mono: Class Libraries
Version: unspecified
Platform: x86-64
OS/Version: Linux
Status: NEW
Severity: Major
Priority: P5 - None
Component: libgdiplus
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
Found By: ---
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5)
Gecko/2008122221 Gentoo Firefox/3.0.5
When two thread are trying to create bitmaps at same time, Mono crashes in
libgdiplus.so.
This code easily triggers crash:
using System.Drawing;
using System.Threading;
class Foo
{
public static void Main ()
{
new Thread (Worker).Start ();
new Thread (Worker).Start ();
}
static void Worker ()
{
Bitmap test = new Bitmap (100, 100);
while (true)
using (Bitmap bmp = new Bitmap (test))
;
}
}
Furthermore, I would expect the code above to be safe even if 'test' was static
member of Foo, initialized once.
Setting severity to major, as there is no easy workaround (in my case, two
different unrelated libraries are trying to create bitmaps).
Reproducible: Always
--
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