[Mono-bugs] [Bug 75215][Maj] New - Error when using Image encoders with mod_mono in multiple applications

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jun 10 10:50:00 EDT 2005


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 m at pernecky.sk.

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

--- shadow/75215	2005-06-10 10:50:00.000000000 -0400
+++ shadow/75215.tmp.27959	2005-06-10 10:50:00.000000000 -0400
@@ -0,0 +1,80 @@
+Bug#: 75215
+Product: Mono: Class Libraries
+Version: 1.1
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Sys.Drawing.
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: m at pernecky.sk               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Error when using Image encoders with mod_mono in multiple applications
+
+When accessing image manipulation functionality (Image.Save, 
+ImageCodecInfo:GetImageEncoders etc.) in multiple mono applications in 
+Apache/mod_mono, the second application that invokes the function "crashes" 
+the drawing functions for all other applications.
+
+This bug is present in mono 1.1.6 and mono 1.1.7 running on Fedora Core 3 
+or RHEL 3 with Apache 2.0.52-3.1 and mod_mono & xsp 1.0.9.
+
+Test case description:
+We have two mono applications in Apache containing the same one ASP.NET 
+page that invokes a System.Drawing function. When accessing the page in 
+first application it works normally as expected. When we invoke the page in 
+second application the functionality breaks for all applications.
+
+Relevant Apache configuration (/etc/httpd/conf/httpd.conf):
+MonoApplications "/app1:/var/www/html/app1,/app2:/var/www/html/app2"
+
+Files:
+/var/www/html/app1/image.aspx
+/var/www/html/app2/image.aspx
+
+image.aspx contents:
+<%@ Page Language="c#" %>
+<script runat="server">
+protected override void OnInit (EventArgs e)
+{
+	base.OnInit (e);
+	System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders ();
+}
+</script>
+--- image.aspx end ---
+
+Steps to reproduce the problem:
+1. When accessing http://localhost/app1/image.aspx the page completes 
+succesfully.
+2. Then when accessing http://localhost/app2/image.aspx the page (with same 
+content) it throws an exception with following details:
+
+System.NullReferenceException: Object reference not set to an instance of 
+an object
+in <0x00000> <unknown method>
+in (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:
+PtrToStringUni (intptr)
+in <0x00063> System.Drawing.GdipImageCodecInfo:MarshalTo 
+(GdipImageCodecInfo gdipcodec, System.Drawing.Imaging.ImageCodecInfo codec)
+in <0x00180> System.Drawing.Imaging.ImageCodecInfo:GetImageEncoders ()
+in <0x00015> ASP.image_aspx:OnInit (System.EventArgs e)
+in <0x00168> System.Web.UI.Control:InitRecursive (System.Web.UI.Control 
+namingContainer)
+in <0x00051> System.Web.UI.Page:InternalProcessRequest ()
+in <0x000a9> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext 
+context)
+in <0x00233> System.Web.HttpApplication+ExecuteHandlerState:Execute ()
+in <0x0007c> System.Web.HttpApplication+StateMachine:ExecuteState 
+(IStateHandler state, System.Boolean readysync)
+
+3. When accessing http://localhost/app1/image.aspx again it also throws the 
+same exception.
+
+The Drawing.Imaging functions work normally until they are invoked from one 
+application. When other application invokes the functions all other 
+applications break.


More information about the mono-bugs mailing list