Last Comment Bug 658849 - "WARNING: Failed to create timer: [...]/nsJSEnvironment.cpp, line 3387" spammed at least 4 times on shutdown
: "WARNING: Failed to create timer: [...]/nsJSEnvironment.cpp, line 3387" spamm...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla7
Assigned To: Daniel Holbert [:dholbert]
:
Mentors:
Depends on:
Blocks: 630932
  Show dependency treegraph
 
Reported: 2011-05-21 23:49 PDT by Daniel Holbert [:dholbert]
Modified: 2011-08-23 02:33 PDT (History)
4 users (show)
mounir: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (915 bytes, patch)
2011-05-27 16:21 PDT, Daniel Holbert [:dholbert]
gal: review+
Details | Diff | Review
followup: also fix PokeCC (964 bytes, patch)
2011-05-31 17:30 PDT, Daniel Holbert [:dholbert]
gal: review+
Details | Diff | Review
Firefox start error (347.40 KB, image/jpeg)
2011-08-23 02:23 PDT, Trif Andrei-Alin[:AlinT]
no flags Details

Description Daniel Holbert [:dholbert] 2011-05-21 23:49:52 PDT
WARNING: Failed to create timer: file /scratch/work/builds/mozilla-central/mozilla-central.10-10-08.07-25/mozilla/dom/base/nsJSEnvironment.cpp, line 3387

STEPS TO REPRODUCE:
1. Start debug build of firefox.
2. Quit.

ACTUAL RESULTS:
At least 4 instances of this warning will be the last thing you see in your terminal output:
> WARNING: Failed to create timer: file mozilla/dom/base/nsJSEnvironment.cpp, line 3387

This affects both a just-created profile as well as profile that I've used for a bit.


Snippet of source that's involved here:
> 3376 void
> 3377 nsJSContext::PokeCC()
> 3378 {
[...]
> 3384   CallCreateInstance("@mozilla.org/timer;1", &sCCTimer);
> 3385 
> 3386   if (!sCCTimer) {
> 3387     NS_WARNING("Failed to create timer");
> 3388     return;
> 3389   }
http://mxr.mozilla.org/mozilla-central/source/dom/base/nsJSEnvironment.cpp#3375

I'm guessing the timer-creation is failing because we're in XPCOM shutdown...?
Comment 1 Daniel Holbert [:dholbert] 2011-05-21 23:52:22 PDT
The warning was added just a few months ago, actually.  Flagging as blocking the bug that added it, on the assumption that this has been happening since then.
Comment 2 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-05-23 10:48:08 PDT
Yeah, we should probably just remove the NS_WARNING.
Comment 3 Daniel Holbert [:dholbert] 2011-05-27 16:21:42 PDT
Created attachment 535774 [details] [diff] [review]
fix

Here's a patch to remove the warning (and replace it with an explanatory comment).
Comment 4 Andreas Gal :gal 2011-05-27 16:24:40 PDT
Comment on attachment 535774 [details] [diff] [review]
fix

Thanks!
Comment 5 Daniel Holbert [:dholbert] 2011-05-27 16:55:41 PDT
http://hg.mozilla.org/projects/cedar/rev/bda71423a5b4
Comment 6 Mounir Lamouri (:mounir) 2011-05-30 05:58:51 PDT
Pushed:
http://hg.mozilla.org/mozilla-central/rev/bda71423a5b4
Comment 7 Daniel Holbert [:dholbert] 2011-05-31 17:15:46 PDT
d'oh, I missed that there are two copies of this same warning -- one in PokeGC (fixed by already-checked-in-patch), and another one in PokeCC.

So, we still spam this on shutdown, from PokeCC.  Patch coming up to silence that one, too.
Comment 8 Daniel Holbert [:dholbert] 2011-05-31 17:30:50 PDT
Created attachment 536485 [details] [diff] [review]
followup: also fix PokeCC
Comment 9 Daniel Holbert [:dholbert] 2011-05-31 17:44:21 PDT
Landed followup on cedar: http://hg.mozilla.org/projects/cedar/rev/4a47b6944cb5
Comment 10 Mounir Lamouri (:mounir) 2011-06-01 01:39:46 PDT
and pushed:
http://hg.mozilla.org/mozilla-central/rev/4a47b6944cb5
Comment 11 Trif Andrei-Alin[:AlinT] 2011-08-23 02:23:13 PDT
Created attachment 555054 [details]
Firefox start error
Comment 12 Daniel Holbert [:dholbert] 2011-08-23 02:33:00 PDT
Comment on attachment 555054 [details]
Firefox start error

(I don't believe comment 11 is related to this bug at all. --> Obsoleting the screenshot attached therein.)

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