Burn failed to initialize COM at EngineRun(). #4778

Closed
wixbot opened this Issue May 27, 2015 · 4 comments

Comments

Projects
None yet
2 participants
Collaborator

wixbot commented May 27, 2015

CoInitializeEx returns 0x80010106 - Cannot change thread mode after it is set.

// initialize COM
hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
ExitOnFailure(hr, "Failed to initialize COM.");
fComInitialized = TRUE;

// Initialize dutil.
LogInitialize(::GetModuleHandleW(NULL));
fLogInitialized = TRUE;

This happened when I have installed Lingoes 2.9.1(http://www.lingoes.net/) and run it in the back.

When the bundle starts, it will load a dll from Lingoes.(C:\Users\Administrator\AppData\Local\Lingoes\Translator\lingoes-us\OpenText32.dll)

It looks like OpenText32.dll will call CoInitializeEx using a different thread mode before bundle's EngineRun().

When using the debug version of burn.exe, the generated bundle will crash because "ExitOnFailure(hr, "Failed to initialize COM.");" try to use the LogStringWork() before LogInitialize().

When using the release version of burn.exe, it won't crash.
but the CoInitializeEx is failed and I assume the COM is not initialized with COINIT_MULTITHREADED.
Will this affect the bundle's behavior?

I searched CoInitializeEx on msdn and it says,

Because there is no way to control the order in which in-process servers are loaded or unloaded, do not call CoInitialize, CoInitializeEx, or CoUninitialize from the DllMain function.

There is certainly something Lingoes is doing wrong, but maybe we should still make sure the bundle will behavior good under such environment .

Originally opened by uni

Collaborator

wixbot commented Jun 2, 2015

AssignedTo set to robmen
Release changed from v3.9 to v3.10

Collaborator

wixbot commented Jun 10, 2015

This is not quite about the crash thing. The release version won't crash.

The problem is whether "CoInitializeEx returns 0x80010106" is an ignorable situation or an error.

If it is an ignorable situation, then this issue could be just ignored too.

If it is an error, then maybe something could be done to mitigate the pain. It may be difficult to convince the user to uninstall those bad apps.

Originally posted by uni

Collaborator

wixbot commented Jun 16, 2015

Fixed by pull request #270

Originally posted by robmen

Collaborator

wixbot commented Jun 16, 2015

Should be fixed in next build.

Originally posted by robmen
Resolution set to fixed
Status changed from Open to Resolved

@wixbot wixbot added bug burn labels Dec 20, 2015

robmen was assigned by wixbot Dec 20, 2015

wixbot added this to the v3.10 milestone Dec 20, 2015

wixbot closed this Dec 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment