Closed
Bug 1186095
Opened 10 years ago
Closed 7 years ago
child_process COM issue
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: alervdvcw, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Build ID: 20150713153304
Steps to reproduce:
1. Create a process using child_process API:
This happens on Windows XP only.
child_process.spawn (path);
2. In EXE create a new thread and try to create COM instance using CoCreateInstance.
3. In the same time, the main thread must be blocked in a call to fread from stdin.
Actual results:
CoCreateInstance hangs.
Expected results:
CoCreateInstance must NOT hang.
Test code:
DWORD WINAPI _threadTest (LPVOID)
{
Sleep (2000);
vmsComInitialize _com;
CoCreateInstance(...); // <---- hangs here
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
vmsComInitialize comInit;
{
CreateThread (0, 0, _threadTest, 0, 0, 0);
//Sleep (10000); // <---- if I remove comment from here and comment next 2 lines - problem does NOT reproduce.
uint32_t size = 0;
fread (&size, 4, 1, stdin);
}
return 0;
}
Problem does NOT reproduce in case I launch EXE from another process, e.g. cmd.exe.
Bug reproduces ONLY in case the process is launched by Firefox child_process SDK.
Happens ONLY under Windows XP.
CoInitializeEx(null, COINIT_APARTMENTTHREADED);
As was done here: https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes/Examples/Using_COM_from_js-ctypes
CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED) is the same as CoInitialize (0). Please do not waste my time. Just tried - did not help.
Oh... They use it in js-ctypes. I do not use. I know js-ctypes can be used. So what?
I do NOT want to.
I figured out the problem. I'm hesitant to share though as you are quite nasty and I don't want want anymore nastiness directed at me.
| Reporter | ||
Comment 10•10 years ago
|
||
You're a quite nasty for me as well :) You're trying to post a solution being unable to understand the context. :)
Comment 11•10 years ago
|
||
If anyone else wants to help him the info needed is in the stackoverflow topic: http://stackoverflow.com/q/31583913/1828637
I won't be helping him.
| Reporter | ||
Comment 12•10 years ago
|
||
You're a very kind person, thank you :D :D :D.
| Reporter | ||
Comment 13•10 years ago
|
||
I've already helped myself making a workaround. Sorry for this. :)
| Reporter | ||
Comment 14•10 years ago
|
||
It would be better for you to give me a solution instead of creating such a touching discussion. ))))
Comment 15•7 years ago
|
||
Add-on SDK is no longer supported so resolving bugs as INCOMPLETE
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•