As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 804511 - RegisterWaitForSingleObject from Chromium ObjectWatcher crashes in Visual Studio
: RegisterWaitForSingleObject from Chromium ObjectWatcher crashes in Visual Studio
Product: Core
Classification: Components
Component: IPC (show other bugs)
: 14 Branch
: x86_64 Windows 7
: -- normal (vote)
: mozilla19
Assigned To: rmkn85
: Bill McCloskey (:billm)
Depends on:
  Show dependency treegraph
Reported: 2012-10-23 01:38 PDT by rmkn85
Modified: 2012-11-02 17:23 PDT (History)
3 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

RegisterWaitForSingleObject - don't ExecuteInWaitThread (997 bytes, patch)
2012-10-24 08:19 PDT, rmkn85
bent.mozilla: review+
Details | Diff | Splinter Review

Description User image rmkn85 2012-10-23 01:38:03 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

Steps to reproduce:

I ran a project with embedded XulRunner, using GeckoFX (, in Visual Studio 2012, and loaded a website with Adobe Flash to the browser object.

Actual results:

Got the following error message, and page loading hanged, usually crashing my application:

"WARNING: RegisterWaitForSingleObject failed: 6: file e:/builds/moz2_slave/rel-m-rel-xr-w32-bld/build/ipc/chromium/src/base/, line 62"

The crash is from here:

Expected results:

It should work without that error message, as it does when running as a standalone application and not from Visual Studio.

The bug is from the code borrowed from Chromium!
See Chromium bug about it:

Someone reported that:
Comment 1 User image rmkn85 2012-10-24 08:19:19 PDT
Created attachment 674666 [details] [diff] [review]
RegisterWaitForSingleObject - don't ExecuteInWaitThread

"The callback function is invoked by the wait thread itself. This flag should be used only for short tasks or it could affect other wait operations.
Deadlocks can occur if some other thread acquires an exclusive lock and calls the UnregisterWait or UnregisterWaitEx function while the callback function is trying to acquire the same lock."

Sometimes it indeed deadlocks (specifically when debugging from Visual Studio), so this flags should no be used.
Comment 2 User image Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-24 10:28:55 PDT
Comment on attachment 674666 [details] [diff] [review]
RegisterWaitForSingleObject - don't ExecuteInWaitThread

This exceeds my win32-fu.
Comment 3 User image Ben Turner (not reading bugmail, use the needinfo flag!) 2012-10-29 11:32:46 PDT
Comment on attachment 674666 [details] [diff] [review]
RegisterWaitForSingleObject - don't ExecuteInWaitThread

Review of attachment 674666 [details] [diff] [review]:

After reading the docs I think this is fine.
Comment 5 User image Ryan VanderMeulen [:RyanVM] 2012-11-02 17:23:01 PDT

Note You need to log in before you can comment on or make changes to this bug.