Closed Bug 1227775 Opened 5 years ago Closed 5 years ago

Assertion failure: gUIThreadId (InitUIThread was not called!), at ipc/glue/WindowsMessageLoop.cpp:1200 running gtests

Categories

(Core :: IPC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

On Windows 10, if I run `./mach gtest *GeckoMediaPlugin*`, I hit a fatal assertion:


Note: Google Test filter = *GeckoMediaPlugin*
[==========] Running 23 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 23 tests from GeckoMediaPlugins
[ RUN      ] GeckoMediaPlugins.GMPTestCodec
Assertion failure: gUIThreadId (InitUIThread was not called!), at c:/Users/cpearce/src/mozilla/purple/ipc/glue/WindowsMessageLoop.cpp:1200
#01: mozilla::ipc::MessageChannel::Call (c:\users\cpearce\src\mozilla\purple\ipc\glue\messagechannel.cpp:1052)
#02: mozilla::gmp::PGMPParent::CallStartPlugin (c:\users\cpearce\src\mozilla\purple\objdir\ipc\ipdl\pgmpparent.cpp:223)
#03: mozilla::gmp::GMPParent::LoadProcess (c:\users\cpearce\src\mozilla\purple\dom\media\gmp\gmpparent.cpp:172)
#04: mozilla::gmp::GMPParent::EnsureProcessLoaded (c:\users\cpearce\src\mozilla\purple\dom\media\gmp\gmpparent.cpp:567)
#05: mozilla::gmp::GMPParent::GetGMPContentParent (c:\users\cpearce\src\mozilla\purple\dom\media\gmp\gmpparent.cpp:1032)
#06: mozilla::gmp::GeckoMediaPluginServiceParent::GetContentParentFrom (c:\users\cpearce\src\mozilla\purple\dom\media\gmp\gmpserviceparent.cpp:498)
#07: mozilla::gmp::GeckoMediaPluginService::GetGMPVideoDecoder (c:\users\cpearce\src\mozilla\purple\dom\media\gmp\gmpservice.cpp:452)
#08: RunTestGMPVideoCodec<GMPVideoDecoderProxy,GMPVideoGetterCallback<GMPVideoDecoderProxy>,{mozilla::gmp::GeckoMediaPluginService::`vcall'{24}',0}>::Get (c:\users\cpearce\src\mozilla\purple\dom\media
\gtest\testgmpcrossorigin.cpp:94)
#09: RunTestGMPVideoCodec<GMPVideoDecoderProxy,GMPVideoGetterCallback<GMPVideoDecoderProxy>,{mozilla::gmp::GeckoMediaPluginService::`vcall'{24}',0}>::Run (c:\users\cpearce\src\mozilla\purple\dom\media
\gtest\testgmpcrossorigin.cpp:74)
#10: GMPTestRunner::RunTestGMPTestCodec1 (c:\users\cpearce\src\mozilla\purple\dom\media\gtest\testgmpcrossorigin.cpp:113)
#11: nsRunnableMethodArguments<GMPTestMonitor &>::apply<GMPTestRunner,void (__thiscall GMPTestRunner::*)(GMPTestMonitor &)> (c:\users\cpearce\src\mozilla\purple\objdir\dist\include\nsthreadutils.h:677
)
#12: nsRunnableMethodImpl<void (__thiscall GMPTestRunner::*)(GMPTestMonitor &),1,GMPTestMonitor &>::Run (c:\users\cpearce\src\mozilla\purple\objdir\dist\include\nsthreadutils.h:872)
#13: nsThread::ProcessNextEvent (c:\users\cpearce\src\mozilla\purple\xpcom\threads\nsthread.cpp:964)
#14: NS_ProcessNextEvent (c:\users\cpearce\src\mozilla\purple\xpcom\glue\nsthreadutils.cpp:297)
#15: mozilla::ipc::MessagePumpForNonMainThreads::Run (c:\users\cpearce\src\mozilla\purple\ipc\glue\messagepump.cpp:326)
#16: MessageLoop::RunInternal (c:\users\cpearce\src\mozilla\purple\ipc\chromium\src\base\message_loop.cc:235)
#17: MessageLoop::RunHandler (c:\users\cpearce\src\mozilla\purple\ipc\chromium\src\base\message_loop.cc:228)
#18: MessageLoop::Run (c:\users\cpearce\src\mozilla\purple\ipc\chromium\src\base\message_loop.cc:202)
#19: nsThread::ThreadFunc (c:\users\cpearce\src\mozilla\purple\xpcom\threads\nsthread.cpp:378)
#20: _PR_NativeRunThread (c:\users\cpearce\src\mozilla\purple\nsprpub\pr\src\threads\combined\pruthr.c:397)
#21: pr_root (c:\users\cpearce\src\mozilla\purple\nsprpub\pr\src\md\windows\w95thred.c:90)
#22: _callthreadstartex (f:\dd\vctools\crt\crtw32\startup\threadex.c:376)
#23: _threadstartex (f:\dd\vctools\crt\crtw32\startup\threadex.c:354)
#24: BaseThreadInitThunk[KERNEL32 +0x13744]
#25: __RtlUserThreadStart[ntdll +0x5a064]
#26: _RtlUserThreadStart[ntdll +0x5a02f]


This makes running gtests locally impossible.
Try calling mozilla::ipc::windows::InitUIThread() in RunGTestFunc()...

https://treeherder.mozilla.org/#/jobs?repo=try&revision=5ca5dca9199a
This sets up IPC so it expects to work. I expect. Doesn't seem to break anything...
Assignee: nobody → cpearce
Status: NEW → ASSIGNED
Attachment #8691692 - Flags: review?(bgirard)
Attachment #8691692 - Flags: review?(bgirard) → review+
https://hg.mozilla.org/mozilla-central/rev/937ea2e34813
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.