mail-archives/mono-bugs/2006-February/038857.html

150 строки
5.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 77436][Nor] New - Appdomain unloading doesn't work
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2077436%5D%5BNor%5D%20New%20-%20Appdomain%20unloading%20doesn%27t%20work&In-Reply-To=bug-77436%40chernobyl.ximian.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="038856.html">
<LINK REL="Next" HREF="038858.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 77436][Nor] New - Appdomain unloading doesn't work</H1>
<B>bugzilla-daemon at bugzilla.ximian.com</B>
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2077436%5D%5BNor%5D%20New%20-%20Appdomain%20unloading%20doesn%27t%20work&In-Reply-To=bug-77436%40chernobyl.ximian.com"
TITLE="[Mono-bugs] [Bug 77436][Nor] New - Appdomain unloading doesn't work">bugzilla-daemon at bugzilla.ximian.com
</A><BR>
<I>Wed Feb 1 10:42:16 EST 2006</I>
<P><UL>
<LI>Previous message: <A HREF="038856.html">[Mono-bugs] [Bug 74932][Maj] Changed - Cast fails under MacOS 10.4
when it should succeed.
</A></li>
<LI>Next message: <A HREF="038858.html">[Mono-bugs] [Bug 77191][Nor] Changed - [PATCH] Mono remoting
runtime can not resolve overload method during remote request
method call processing.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#38857">[ date ]</a>
<a href="thread.html#38857">[ thread ]</a>
<a href="subject.html#38857">[ subject ]</a>
<a href="author.html#38857">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>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 <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">joe at otee.dk.</A>
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=77436">http://bugzilla.ximian.com/show_bug.cgi?id=77436</A>
--- shadow/77436 2006-02-01 10:42:16.000000000 -0500
+++ shadow/77436.tmp.8006 2006-02-01 10:42:16.000000000 -0500
@@ -0,0 +1,77 @@
+Bug#: 77436
+Product: Mono: Runtime
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: misc
+AssignedTo: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
+ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">joe at otee.dk</A>
+QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Appdomain unloading doesn't work
+
+Appdomains don't seem to be unloaded correctly.
+When i create a domain, execute an assembly in it, then unload it again, the executed assembly
+will not get unloaded.
+
+When i create a new app domain and try to load the executable at the same path again, but in
+between have modified the assembly, then i will still get the old assembly i loaded earlier.
+
+
+Run the following code
+mcs AssemblyStressTest.cs
+mono AssemblyStressTest.exe
+
+If you are not running this code from Mac OS X you will have to modify the paths to mcs and
+libMonoPosixHelper.
+
+C# code:
+
+using System;
+using System.Collections;
+using System.Reflection;
+using System.IO;
+using System.Runtime.InteropServices;
+
+/*
+ This should print
+ 0
+ 1
+ 2
+ 3
+ 3
+ 4
+*/
+
+class Test
+{
+ [DllImport (&quot;/Library/Frameworks/Mono.framework/Libraries/libMonoPosixHelper.dylib&quot;,
+CallingConvention=CallingConvention.Cdecl, SetLastError=true)]
+ public static extern int system (string @string);
+
+ static void Main (string[] commands)
+ {
+ for (int i=0;i&lt;5;i++)
+ {
+ StreamWriter sw = new StreamWriter(&quot;GeneratedAssembly.cs&quot;);
+ sw.Write(&quot;public class AssemblyStress { static void Main()
+{ System.Console.WriteLine(&quot;);
+ sw.Write(i.ToString());
+ sw.Write(&quot;); } }\n&quot;);
+ sw.Close();
+ system(&quot;/Library/Frameworks/Mono.framework/Commands/mcs
+GeneratedAssembly.cs&quot;);
+
+ AppDomain tempDomain = AppDomain.CreateDomain(&quot;TempDomain&quot;);
+ tempDomain.ExecuteAssembly(&quot;GeneratedAssembly.exe&quot;);
+
+ AppDomain.Unload(tempDomain);
+ }
+ }
+}
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="038856.html">[Mono-bugs] [Bug 74932][Maj] Changed - Cast fails under MacOS 10.4
when it should succeed.
</A></li>
<LI>Next message: <A HREF="038858.html">[Mono-bugs] [Bug 77191][Nor] Changed - [PATCH] Mono remoting
runtime can not resolve overload method during remote request
method call processing.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#38857">[ date ]</a>
<a href="thread.html#38857">[ thread ]</a>
<a href="subject.html#38857">[ subject ]</a>
<a href="author.html#38857">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
mailing list</a><br>
</body></html>