Hi Huw,
Huw Davies huw@codeweavers.com wrote:
This doesn't look right. At the very least, this won't work if the MTA isn't found, as it will return in the if block above. More fundamentally though, what's actually going on here? If the thread has joined an apartment-threaded apartment, then I'd expect that should be the one that's used. Some tests would help here.
I'm attaching the test that reproduces the problem. Since the app that I have here is .Net based it uses CoIncrementMTAUsage() that leads to an MTA creation, however creating an MTA in a separate thread (using CoInitializeEx(NULL, COINIT_MULTITHREADED) and leaving that thread run in background) reproduce this bug as well. The test runs fine under Windows however it crashes under Wine:
00b8:err:ole:get_stub_manager_from_ipid not found for ipid {00000001-00b8-00b4-8676-a9129dc206e7} 00b8:err:ole:unmarshal_ORPCTHIS invalid buffer length wine: Unhandled page fault on read access to 0302000D at address 019C903E (thread 00b8), starting debugger...
I'd appreciate any pointers or help with this bug.
Thanks.