none
RPC_E_WRONG_THREAD error after appying Win10 1903 updates. RRS feed

  • Question

  • Folks, 

    We develop a COM based application that has been running for several years (about 15).

    Recently, when the 1903 patch was applied to our Win10 machines, the application faults right away with a simple call. The HRESULT is RPC_E_WRONG_THREAD.

    No issues with Server OSs (2012, 2016) that are recently patched.

    Has anyone else experienced this? Is this a known issue?

    More specifically, we have an unmanaged (C++) COM+ component (SERVER mode, out of proc) calling into a managed (C#) COM+ component (SERVER mode, out of proc).

    We use IGlobalInterfaceTable to marshall the interface. 

    All components are running as Free Threaded.

    We find that calls into ANY managed component, from our unmanaged component, will fail (unless the object in the managed component was created by the current thread). Calls into other unmanaged components work fine.

    Any feedback/ideas on resolving this are greatly appreciated.

    Wednesday, July 10, 2019 11:41 PM

All replies

  • Hi,

    RPC_E_WRONG_THREAD means that the application did a CoCreateInstance of an Single Threaded Apartment COM object in one thread, but used it in another thread. 
    Check this document: When to Use the Global Interface Table and try the resolution it provides.

    Best regards,

    Drake


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 11, 2019 7:56 AM
    Moderator
  • Thanks Drake,

    All objects should be using MTA.

    Also, the particular objects involved are out of process... and we are already using the Global Interface Table to marshal their proxies (also, we are not using aggregation either so there was not anything new to try from your suggest link). So it doesn't make sense to me that we would EVER get RPC_E_WRONG_THREAD, unless the IGlobalInterfaceTable implementation is now broken??? Even if this were the case, this would have to be for managed com objects only because this same operation is working fine with our unmanaged com objects. 

    Note, that Win10 1803 never returns this HRESULT. After updating the machine to Win10 1903, this happens immediately.

    Any other ideas/questions?

    Thursday, July 11, 2019 10:48 PM
  • This seems an update issue, I suggest to report a problem on Feedback Hub.

    Best regards,

    Drake


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, July 15, 2019 1:57 AM
    Moderator