[Mono-bugs] [Bug 73001][Blo] Changed - StreamGetBytesImpl Delegates are being garbage collected prematurely.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 25 Feb 2005 16:45:03 -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 grompf@sublimeintervention.com.

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

--- shadow/73001	2005-02-25 16:43:16.000000000 -0500
+++ shadow/73001.tmp.3189	2005-02-25 16:45:03.000000000 -0500
@@ -1,16 +1,16 @@
 Bug#: 73001
-Product: Mono: Class Libraries
+Product: Mono: Runtime
 Version: 1.1
 OS: unknown
 OS Details: 
 Status: REOPENED   
 Resolution: 
 Severity: Unknown
 Priority: Blocker
-Component: Sys.Drawing.
+Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: scott.mohekey@telogis.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Summary: StreamGetBytesImpl Delegates are being garbage collected prematurely.
@@ -103,6 +103,18 @@
 
 
 ------- Additional Comments From grompf@sublimeintervention.com  2005-02-25 16:43 -------
 Created an attachment (id=14418)
 managed source
 
+
+------- Additional Comments From grompf@sublimeintervention.com  2005-02-25 16:45 -------
+I will eat my crow as well.
+
+I have attached a better standlone testcase and am moving this bug back to Runtime.
+
+If you run mono test.exe foo; the GCHandle is created which prevents finalization of the 
+delegate and the code works as expected; otherwise the delegate falls out of scope before 
+the pinvoke.
+
+Please note this happens on X86 && AMD64 but not PPC.  This also only occurs with 
+pinvoked delegates.