[Mono-bugs] [Bug 73181][Maj] Changed - Multithreaded Drawstring causes NullReference exception

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 2 Mar 2005 00:28:23 -0500 (EST)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by david.mitchell@telogis.com.


--- shadow/73181	2005-03-01 18:26:36.000000000 -0500
+++ shadow/73181.tmp.26362	2005-03-02 00:28:23.000000000 -0500
@@ -2,13 +2,13 @@
 Product: Mono: Class Libraries
 Version: 1.1
 OS: GNU/Linux [Other]
 OS Details: 
 Status: NEW   
+Severity: Unknown
 Priority: Major
 Component: Sys.Drawing.
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: david.mitchell@telogis.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -57,6 +57,34 @@
 Sample attached
 ------- Additional Comments From david.mitchell@telogis.com  2005-03-01 18:26 -------
 Created an attachment (id=14477)
 Test case
+------- Additional Comments From david.mitchell@telogis.com  2005-03-02 00:28 -------
+After playing with the test program for a while we've discovered a few
+If you add a static member like this:
+static object o = new object();
+and then use that to synchronize the doChart method by surrounding the
+body of the method with:
+lock (o) {
+Then this bug still shows up. However, changing the code so that it
+isn't multithreaded but just calls doChart several times does stop the
+bug occuring.
+Statically declaring the font so that only one font object is used
+also doesn't stop this bug appearing.
+Changing the doChart method so that it draws lines instead of a string
+will stop the bug occuring so it appears to be some combination of
+multithreading and drawString that causes this to appear.
+Hope this helps.