Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4049536
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:57:27+00:00 2026-05-20T13:57:27+00:00

During development of my WPF application I suddenly got the seemingly much-dreaded RaceOnRCWCleanup when

  • 0

During development of my WPF application I suddenly got the seemingly much-dreaded RaceOnRCWCleanup when closing the application while debugging. When executing without debugger attached everything was normal.

Image and text of the warning message:

enter image description here

Managed Debugging Assistant
‘RaceOnRCWCleanup’ has detected a
problem in
‘MyEXE’. Additional Information:
An attempt has been made to free an
RCW that is in use. The RCW is in use
on the active thread or another
thread. Attempting to free an in-use
RCW can cause corruption or data loss.

The stack trace was not very helpful:

   [External Code] 
>   mscoreei.dll!000007fef75c3309()     
    [Frames below may be incorrect and/or missing, no symbols loaded for mscoreei.dll]  
    mscoree.dll!000007fef7655b21()  
    kernel32.dll!0000000077b7f56d()     
    ntdll.dll!0000000077cb2cc1()    

Since the last bigger change I had made prior to the error occuring for the first time was using a COM object from my managed C# code I obviously suspected that OCX (written by me). Searching the net and stackoverflow did not yield any solution.

Then I found out that this only happens when the setting “Enable unmanaged code debugging” is activated. I had done that, because I wanted to debug my OCX written in unmanaged C++, too. Disabling unmanaged code debugging made the problem go away immediately.

This happened on Windows 7, Visual Studio 2010 without SP1.

Does anyone have an explanation what is happening here? Is this a bug?

Update: This problem was gone when I installed service pack 1 for Visual Studio 2010.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T13:57:27+00:00Added an answer on May 20, 2026 at 1:57 pm

    Not much to go by. However, do ignore this warning if you get it from terminating the debugging session early. It is caused by the MDA noticing a thread ending that has an outstanding COM interface call that’s being marshaled. Using Debug + Stop Debugging can certainly trip this warning, it terminates threads.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Probably everyone ran into this problem at least once during development: while(/*some condition here
What would be the application development process for WPF applications and silverlight application? Like
During development i find my self often having to restart my application which in
During development of an mvc web application, I'm encourtering issues running the local instance
(apologies for the somewhat lengthy intro) During development of an application which prefaults an
During development (and for debugging) it is very useful to run a Java class'
I found Windbg is very useful during development and debugging. but mostly i use
I am working on a large (100s of assemblies) asp.net application and during development
During development I had DEBUG = True and I got debug tracings. Then I
I have been using the Grails database-migration plugin during development of my application, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.