RaceOnRCWCleanup Error

R

Roger

Hi Guys,

I am using

MS VS2005 Standard , MS .net framework v2.0 , MS Visual Basic 2005



I have an app that uses a systems.threading.timer and also utilises some
system.security.policy classes.

When I am running the app from inside VS about 50% of the times I get an MDA
error window with the RaceOnRCWCleanup error.

I believe I am disposing of all the objects that I create in the app but yet
still the RaceOnRCWCleanup error occurs sometimes.

The error occurs on the very last 'End Sub' statement in my Sub Main.



These are the results from the callstack on the line before 'End Sub' and on
the 'End Sub' line when the RaceOnRCWCleanup error occurs.



Command issued on the line before 'End Sub'
Debug.ListCallStack /ShowExternalCode:yes

Index Function

--------------------------------------------------------------------------------

*1 ROJAV.exe!ROJAV.RojavMain.Main() ' this is my app

2 [Native to Managed Transition]

3 [Managed to Native Transition]

4 mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile,
System.Security.Policy.Evidence assemblySecurity, string[] args)

5
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

6 mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state)

7
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext
executionContext, System.Threading.ContextCallback callback, object state)

8 mscorlib.dll!System.Threading.ThreadHelper.ThreadStart()





Command issued at 'End Sub' when RaceOnRCWCleanup error occurs.
Debug.ListCallStack /ShowExternalCode:yes

Index Function

--------------------------------------------------------------------------------

1 mscorlib.dll!System.__ComObject.ReleaseSelf()

2
mscorlib.dll!System.Runtime.InteropServices.Marshal.ReleaseComObject(object o)

3
System.Management.dll!System.Management.ManagementObjectCollection.ManagementObjectEnumerator.Dispose()

4
System.Management.dll!System.Management.ManagementObjectCollection.ManagementObjectEnumerator.Finalize()



Any suggestions on what is causing the RaceOnRCWCleanup error and how can I
correct it?



Thanks much



..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top