[Mono-bugs] [Bug 69793][Wis] Changed - Graphics.DrawString hangs when the rectangle passed in is too small

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 22 Nov 2004 09:21:25 -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 rkumar@novell.com.

http://bugzilla.ximian.com/show_bug.cgi?id=69793

--- shadow/69793	2004-11-22 08:49:35.000000000 -0500
+++ shadow/69793.tmp.15156	2004-11-22 09:21:25.000000000 -0500
@@ -1,14 +1,14 @@
 Bug#: 69793
 Product: Mono: Class Libraries
 Version: 1.1
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: Sys.Drawing.
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: rkumar@novell.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -56,6 +56,29 @@
 How often does this happen? 
 Always
 
 Additional Information:
 For a Font size of 10 pts, it starts hanging when rectangle width is less
 than or equal to font.Height/2-2. I've Cairo-HEAD, libgdiplus-HEAD.
+
+------- Additional Comments From rkumar@novell.com  2004-11-22 09:21 -------
+Following line seems to be making i as 0 all the time.
+
+graphics.c: line: 2340: i+=StringDetails[i].LineLen-1;
+
+It's hanging at this loop. Following patch keeps printing i : 0.
+
+Index: graphics.c
+===================================================================
+--- graphics.c  (revision 36248)
++++ graphics.c  (working copy)
+@@ -2253,6 +2253,7 @@
+                }
+  
+                for (i=0; i<StringLen; i++) {
++               printf ("i : %u\n", i);
+                        if (StringDetails[i].Flags &
+STRING_DETAIL_LINESTART) {
+                                /* To support the LineLimit flag */
+                                if ((StringDetails[i].Flags &
+STRING_DETAIL_HIDDEN)!=0){
+