The default bug view has changed. See this FAQ.

"WARNING: Failed to create timer: [...]/nsJSEnvironment.cpp, line 3387" spammed at least 4 times on shutdown

RESOLVED FIXED in mozilla7

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
mozilla7
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

6 years ago
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...?
(Assignee)

Comment 1

6 years ago
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.
Blocks: 630932
Yeah, we should probably just remove the NS_WARNING.
(Assignee)

Comment 3

6 years ago
Created attachment 535774 [details] [diff] [review]
fix

Here's a patch to remove the warning (and replace it with an explanatory comment).
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #535774 - Flags: review?(gal)

Comment 4

6 years ago
Comment on attachment 535774 [details] [diff] [review]
fix

Thanks!
Attachment #535774 - Flags: review?(gal) → review+
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/projects/cedar/rev/bda71423a5b4
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla7
Pushed:
http://hg.mozilla.org/mozilla-central/rev/bda71423a5b4
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
OS: Linux → All
Hardware: x86 → All
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
(Assignee)

Comment 7

6 years ago
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.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 8

6 years ago
Created attachment 536485 [details] [diff] [review]
followup: also fix PokeCC
Attachment #536485 - Flags: review?(gal)

Updated

6 years ago
Attachment #536485 - Flags: review?(gal) → review+
(Assignee)

Comment 9

6 years ago
Landed followup on cedar: http://hg.mozilla.org/projects/cedar/rev/4a47b6944cb5
Whiteboard: fixed-in-cedar
and pushed:
http://hg.mozilla.org/mozilla-central/rev/4a47b6944cb5
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Created attachment 555054 [details]
Firefox start error
(Assignee)

Comment 12

6 years ago
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.)
Attachment #555054 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.