[Mono-bugs] [Bug 72605][Wis] Changed - NullReferenceException, GdiPlus and rsh problem

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 16 Feb 2005 05:37:19 -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 vguzev@yandex.ru.

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

--- shadow/72605	2005-02-15 10:05:18.000000000 -0500
+++ shadow/72605.tmp.6938	2005-02-16 05:37:19.000000000 -0500
@@ -1,12 +1,12 @@
 Bug#: 72605
 Product: Mono: Runtime
 Version: unspecified
 OS: GNU/Linux [Other]
 OS Details: Linux skif 2.4.25 #2 SMP Fri Apr 23 14:03:00 MSD 2004 i686 athlon i386 GNU/Linux
-Status: NEEDINFO   
+Status: REOPENED   
 Resolution: 
 Severity: Unknown
 Priority: Wishlist
 Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: vguzev@yandex.ru               
@@ -386,6 +386,105 @@
 
 
 Thanks.
 
 Yury Serdyuk
 
+
+------- Additional Comments From vguzev@yandex.ru  2005-02-16 05:37 -------
+One more letter from Yury Serdyuk:
+--8<---------------------------------------------
+Hi !
+
+NullReferenceException is thrown when trying to launch GDI 
+application
+which 
+uses a lot of threads :
+
+
+using System;
+using System.Threading;
+using System.Drawing;
+
+public class TestGDIPlus  {
+ public static void Main( string[] args ) {
+  int nThreads = int.Parse( args [0] );
+  
+  for ( int i = 0; i < nThreads; i++ ) {
+   Thread t = new Thread( new ThreadStart( TestGDIPlus.Run ) );
+   t.Start();
+  }
+ }
+
+ public static void Run() {
+  Bitmap bmp = new Bitmap ( 1000, 1000, 
+                  
+System.Drawing.Imaging.PixelFormat.Format32bppArgb );
+ }
+}
+
+We run it as
+
+
+mono /path/to/TestGDIPlus.exe 8
+
+
+Actual Results:
+It throws this exception for each thread
+
+Unhandled Exception: System.NullReferenceException: Object reference 
+not 
+set to an instance of an object
+in (unmanaged) (wrapper managed-to-native) 
+System.Drawing.GDIPlus:GdipCreateBitmapFromScan0 
+(int,int,int,System.Drawing.Imaging.PixelFormat,intptr,intptr&)
+in <0x00004> (wrapper managed-to-native) 
+System.Drawing.GDIPlus:GdipCreateBitmapFromScan0 
+(int,int,int,System.Drawing.Imaging.PixelFormat,intptr,intptr&)
+in <0x00058> System.Drawing.Bitmap:.ctor 
+(int,int,System.Drawing.Imaging.PixelFormat)
+in <0x0006f> (wrapper remoting-invoke-with-check) 
+System.Drawing.Bitmap:.ctor 
+(int,int,System.Drawing.Imaging.PixelFormat)
+in <0x00036> TestGDIPlus:Run ()
+in <0x0005f> (wrapper delegate-invoke) 
+System.MulticastDelegate:invoke_void ()
+
+or this one
+[serdyuk@itk-104 tmp]$ mono TestGDIPlus.exe 8
+
+Unhandled Exception: System.NullReferenceException: Object reference 
+not
+set to an instance of an object
+in (unmanaged) System.Drawing.Bitmap:.ctor
+(int,int,System.Drawing.Imaging.PixelFormat)
+
+This failure is occured only occasionally,
+so one needs to try run program multiply ones,
+as 
+
+> [serdyuk@itk-104 tmp]$ mono TestGDIPlus.exe 8 [serdyuk@itk-104 tmp]
+$ 
+> mono TestGDIPlus.exe 8 [serdyuk@itk-104 tmp]$ mono TestGDIPlus.exe 
+8 
+> [serdyuk@itk-104 tmp]$ mono TestGDIPlus.exe 8 [serdyuk@itk-104 tmp]
+$ 
+> mono TestGDIPlus.exe 8 Unhandled Exception: 
+> System.NullReferenceException: Object reference not set to an 
+instance 
+> of an object in (unmanaged) System.Drawing.Bitmap:.ctor 
+> (int,int,System.Drawing.Imaging.PixelFormat) [serdyuk@itk-104 tmp]$
+
+
+We have tested under Mono 1.0.5 ( libgdiplus-1.0.5 ) and
+Mono 1.1.3 ( libgdiplus-1.1.3 ) with the same result.
+We have used two diffrent glib-2.0 libraries -
+
+2.2.1 and  2.4.7 .
+
+Please, help.
+
+Thanks.
+
+Yury Serdyuk.
+
+--8<---------------------------------------------