[Mono-bugs] [Bug 80798][Wis] New - Calling CoInitialize on a Thread causes Abort in GC

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Feb 11 17:52:01 EST 2007


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 joncham at gmail.com.

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

--- shadow/80798	2007-02-11 17:52:01.000000000 -0500
+++ shadow/80798.tmp.26293	2007-02-11 17:52:01.000000000 -0500
@@ -0,0 +1,51 @@
+Bug#: 80798
+Product: Mono: Runtime
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: GC
+AssignedTo: lupus at ximian.com                            
+ReportedBy: joncham at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Calling CoInitialize on a Thread causes Abort in GC
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+I implemented Thread Apartment state related things and ran into this
+issue. If I call CoInitialize on a thread (setting apartment state to STA -
+single threaded apartment), I sometimes see an abort in the GC. The
+attached sample is a modified version of runtime test thread5.
+
+Steps to reproduce the problem:
+1. Run attached sample on windows a few times. 
+2. See abort ~1/3 of the time.
+3. 
+
+Actual Results:
+"SuspendThread failed" ABORT from win32_threads.c
+
+Expected Results:
+No abort.
+
+How often does this happen? 
+~1/3 of the time.
+
+Additional Information:
+This may only happen with an unhandled exception on a thread, as test
+thread5 seems to be the only time I've seen this problem. But, it may just
+aggrevate the problem. I really need some support for thread apartment
+states to make COM Interop useable, but I don't want to submit a patch that
+causes aborts. 
+
+Note that all Winforms apps need to be STA. They actually already do set
+apartment state now internally to support OLE drag and drop. As I've never
+seen this error before reported for any winform app, I do wonder if it only
+happens under extenuating circumstances (like test thread5).


More information about the mono-bugs mailing list