Last Comment Bug 645268 - Intermittent failure in toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
: Intermittent failure in toolkit/components/console/hudservice/tests/browser/b...
Status: RESOLVED FIXED
: intermittent-failure
Product: Firefox
Classification: Client Software
Component: Developer Tools (show other bugs)
: Trunk
: x86 Linux
: -- normal (vote)
: Firefox 6
Assigned To: Cameron McCormack (:heycam)
:
: J. Ryan Stinnett [:jryans] (use ni?)
Mentors:
Depends on:
Blocks: 438871 595934
  Show dependency treegraph
 
Reported: 2011-03-25 20:45 PDT by :Ehsan Akhgari
Modified: 2014-10-15 12:02 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch to maybe fix the randomness (1.40 KB, patch)
2011-04-18 22:57 PDT, Cameron McCormack (:heycam)
ehsan: review+
Details | Diff | Splinter Review
add some debugging info (1.22 KB, patch)
2011-04-24 17:01 PDT, Cameron McCormack (:heycam)
jwatt: review+
Details | Diff | Splinter Review
Random orange fix for browser_webconsole_bug_595934_message_categories.js; make sure we listen for the right load event. (3.13 KB, patch)
2011-04-30 18:32 PDT, Cameron McCormack (:heycam)
mihai.sucan: review+
Details | Diff | Splinter Review

Description :Ehsan Akhgari 2011-03-25 20:45:37 PDT
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1301103892.1301105180.20076.gz
Rev3 Fedora 12 mozilla-central opt test mochitest-other on 2011/03/25 18:44:52

TEST-START | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #0: message found 'text/css'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #0: error category 'CSS Loader'
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Error: "The stylesheet http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-css-loader.css was not loaded because its MIME type, "image/png", is not "text/css"." {file: "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-css-loader.html" line: 0}]
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #1: message found 'preventBubble()'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #1: error category 'DOM Events'
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Warning: "Event=DOMContentLoaded, use of preventBubble() is deprecated. Use W3C standard stopPropagation() instead." {file: "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-dom-events.html" line: 0}]
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #2: message found 'getElementById'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #2: error category 'DOM:HTML'
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Warning: "Non-standard document.all property was used. Use W3C standard document.getElementById() instead." {file: "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-dom-html.html" line: 8}]
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #3: message found 'shape="rect"'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #3: error category 'ImageMap'
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Warning: "The "coords" attribute of the <area shape="rect"> tag is not in the "left,top,right,bottom" format." {file: "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-imagemap.html" line: 0 column: 0 source: "coords="0,0,10,10,5""}]
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #3: message found 'shape="rect"'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #5: message found 'no element found'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #5: error category 'malformed-xml'
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Error: "no element found" {file: "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-malformedxml.xhtml" line: 11}]
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Error: "TESTS[pos].onload is not a function" {file: "chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js" line: 166}]
INFO TEST-END | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | finished in 675ms
Comment 1 :Ehsan Akhgari 2011-03-25 20:47:32 PDT
Happened on the same revision and platform as bug 645267.
Comment 2 Treeherder Robot 2011-03-26 17:27:47 PDT
ehsan%mozilla.com
http://tinderbox.mozilla.org/showlog.cgi?log=Cedar/1301180999.1301182198.1667.gz
Rev3 Fedora 12 cedar opt test mochitest-other on 2011/03/26 16:09:59

s: talos-r3-fed-041
PROCESS-CRASH | Main app process exited normally | application crashed (minidump found)
Thread 0 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
Comment 3 Treeherder Robot 2011-04-04 05:54:24 PDT
matspal%gmail.com [:mats]
http://tinderbox.mozilla.org/showlog.cgi?log=Cedar/1301919315.1301920557.9432.gz
Rev3 Fedora 12 cedar opt test mochitest-other on 2011/04/04 05:15:15

s: talos-r3-fed-019
PROCESS-CRASH | Main app process exited normally | application crashed (minidump found)
Thread 0 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
Comment 4 Treeherder Robot 2011-04-07 19:10:34 PDT
philor
http://tinderbox.mozilla.org/showlog.cgi?log=Services-Central/1302152462.1302153720.10285.gz
Rev3 Fedora 12 services-central opt test mochitest-other on 2011/04/06 22:01:02

s: talos-r3-fed-041
PROCESS-CRASH | Main app process exited normally | application crashed (minidump found)
Thread 0 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
Comment 5 Treeherder Robot 2011-04-07 19:28:32 PDT
philor
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1302227451.1302228671.27150.gz
Rev3 Fedora 12 mozilla-central opt test mochitest-other on 2011/04/07 18:50:51

s: talos-r3-fed-007
PROCESS-CRASH | Main app process exited normally | application crashed (minidump found)
Thread 0 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
Comment 6 Treeherder Robot 2011-04-10 22:03:23 PDT
rcampbell%mozilla.com
http://tinderbox.mozilla.org/showlog.cgi?log=Devtools/1302472955.1302474230.29420.gz
Rev3 Fedora 12 devtools opt test mochitest-other on 2011/04/10 15:02:35

s: talos-r3-fed-033
PROCESS-CRASH | Main app process exited normally | application crashed (minidump found)
Thread 0 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
Comment 7 Treeherder Robot 2011-04-16 03:29:16 PDT
Ms2ger%gmail.com
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1302948031.1302949245.31769.gz
Rev3 Fedora 12 mozilla-central opt test mochitest-other on 2011/04/16 03:00:31

s: talos-r3-fed-048
PROCESS-CRASH | Main app process exited normally | application crashed (minidump found)
Thread 0 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
Comment 8 Treeherder Robot 2011-04-18 18:36:20 PDT
philor
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox4.0/1303122268.1303123525.25786.gz
Rev3 Fedora 12 mozilla-2.0 opt test mochitest-other on 2011/04/18 03:24:28

s: talos-r3-fed-041
PROCESS-CRASH | Main app process exited normally | application crashed (minidump found)
Thread 0 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
Comment 9 Cameron McCormack (:heycam) 2011-04-18 22:57:20 PDT
Created attachment 526935 [details] [diff] [review]
patch to maybe fix the randomness

In testNext, the function passed to addEventListener closes over the pos variable, but I'm guessing that it could be incremented before the event listener is actually invoked.  You can see right after the TEST-UNEXPECTED-FAIL in comment 0 the "TESTS[pos].onload is not a function" message, so it looks like pos is going wrong.

This patch uses 'let' to capture the value of pos.
Comment 10 :Ehsan Akhgari 2011-04-19 15:26:10 PDT
Comment on attachment 526935 [details] [diff] [review]
patch to maybe fix the randomness

Makes sense.  r=me.
Comment 11 Cameron McCormack (:heycam) 2011-04-19 15:40:49 PDT
http://hg.mozilla.org/mozilla-central/rev/de5a3db2d9c0
Comment 12 Phil Ringnalda (:philor) 2011-04-24 15:04:56 PDT
http://tinderbox.mozilla.org/showlog.cgi?log=Try/1303678697.1303679923.26400.gz (a try push parented on m-c tip) says there's a disappointment headed your way.
Comment 13 Cameron McCormack (:heycam) 2011-04-24 17:01:12 PDT
Created attachment 528039 [details] [diff] [review]
add some debugging info

Boo.  Let's dump the unexpected error console message to see what it's getting.
Comment 14 Mihai Sucan [:msucan] 2011-04-25 02:15:46 PDT
I have a hunch what's happening here.

There have been some patches in Web Console which made the code somewhat more flimsy. It spits out errors when it shouldn't.

Those errors intervene in the way the test for bug 595934 works.

The fix should be in other parts of the Web Console, not in the test.

One such example error:

TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_view_source.js | Console message: [JavaScript Error: "[Exception... "'JavaScript component does not have a method named: "observe"' when calling method: [nsIObserver::observe]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  location: "JS frame :: resource:///modules/HUDService.jsm :: HS_registerHUDReference :: line 1704"  data: no]" {file: "resource:///modules/HUDService.jsm" line: 1704}]


registerHUDReference() holds:

Services.obs.notifyObservers(id, "web-console-created", null);

There must be an observer registered that does not have the "observe" method.
Comment 15 Cameron McCormack (:heycam) 2011-04-25 14:16:30 PDT
Landed the debug patch: http://hg.mozilla.org/mozilla-central/rev/0a4d4e02747e
Comment 16 :Ehsan Akhgari 2011-04-30 08:28:21 PDT
Mihai, is what you're talking about in comment 14 something which could have caused bug 645267 as well?
Comment 17 Mihai Sucan [:msucan] 2011-04-30 11:29:15 PDT
(In reply to comment #16)
> Mihai, is what you're talking about in comment 14 something which could have
> caused bug 645267 as well?

I highly doubt that, I am 99% sure that comment 14 is unrelated to bug 645267.

However I am quite certain that that comment is sufficiently accurate - I continue to believe this orange is caused by what I said in the aforementioned comment. Someone can track the regression, when the code was added, and why the error occurs. Once we fix that error, I expect we will no longer see intermittent failures in the test discussed in this bug report.

If wanted, I can take the bug.
Comment 18 Cameron McCormack (:heycam) 2011-04-30 17:19:56 PDT
From the debug log, I'm thinking the problem is that the load event listener is getting called for the previous subtest's document load -- the loop comes around to running subtest #4 (the one with the onload), but this sometimes happens before the document from subtest #3 has finished loading (i.e. the console message gets shown before the document's load event is dispatched).  This would be why the querySelector("form") call is not returning an element.

Patch coming up after a tryserver run.
Comment 19 Cameron McCormack (:heycam) 2011-04-30 18:32:39 PDT
Created attachment 529324 [details] [diff] [review]
Random orange fix for browser_webconsole_bug_595934_message_categories.js; make sure we listen for the right load event.
Comment 20 :Ehsan Akhgari 2011-05-01 14:01:51 PDT
(In reply to comment #18)
> From the debug log, I'm thinking the problem is that the load event listener is
> getting called for the previous subtest's document load -- the loop comes
> around to running subtest #4 (the one with the onload), but this sometimes
> happens before the document from subtest #3 has finished loading (i.e. the
> console message gets shown before the document's load event is dispatched). 
> This would be why the querySelector("form") call is not returning an element.

This makes sense to me.  Relying on the order of load events is a mistake, as we all know.  :-)
Comment 21 Treeherder Robot 2011-05-01 21:20:40 PDT
philor
http://tinderbox.mozilla.org/showlog.cgi?log=Devtools/1303559706.1303560988.27681.gz
Rev3 Fedora 12 devtools opt test mochitest-other on 2011/04/23 04:55:06

s: talos-r3-fed-018
PROCESS-CRASH | Main app process exited normally | application crashed (minidump found)
Thread 0 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
Comment 22 Treeherder Robot 2011-05-01 22:04:13 PDT
philor
http://tinderbox.mozilla.org/showlog.cgi?log=Devtools/1303559706.1303560988.27681.gz
Rev3 Fedora 12 devtools opt test mochitest-other on 2011/04/23 04:55:06

s: talos-r3-fed-018
PROCESS-CRASH | Main app process exited normally | application crashed (minidump found)
Thread 0 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
Comment 23 Mihai Sucan [:msucan] 2011-05-02 11:51:06 PDT
Comment on attachment 529324 [details] [diff] [review]
Random orange fix for browser_webconsole_bug_595934_message_categories.js; make sure we listen for the right load event.

The patch change is fine, but I am not sure if these changes are sufficient.
Comment 24 Cameron McCormack (:heycam) 2011-05-02 14:16:46 PDT
Thanks, landed: http://hg.mozilla.org/mozilla-central/rev/11a6a67cf3a9
Comment 25 Treeherder Robot 2011-05-21 07:46:55 PDT
philor
http://tinderbox.mozilla.org/showlog.cgi?log=Mozilla-Aurora/1305978692.1305980289.20578.gz
Rev3 Fedora 12 mozilla-aurora opt test mochitest-other on 2011/05/21 04:51:32

s: talos-r3-fed-042
PROCESS-CRASH | Main app process exited normally | application crashed (minidump found)
Thread 0 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
Comment 26 Treeherder Robot 2011-05-23 06:13:53 PDT
hsivonen%iki.fi
http://tinderbox.mozilla.org/showlog.cgi?log=Mozilla-Aurora/1306151305.1306152682.12661.gz
Rev3 Fedora 12 mozilla-aurora opt test mochitest-other on 2011/05/23 04:48:25

s: talos-r3-fed-042
PROCESS-CRASH | Main app process exited normally | application crashed (minidump found)
Thread 0 (crashed)
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
Comment 27 Treeherder Robot 2011-08-27 09:17:16 PDT
longsonr%gmail.com
http://tinderbox.mozilla.org/showlog.cgi?log=Mozilla-Inbound/1314459401.1314460676.1898.gz
Rev3 Fedora 12 mozilla-inbound opt test mochitest-other on 2011/08/27 08:36:41

s: talos-r3-fed-063
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser/browser_webconsole_bug_595934_message_categories.js | test #5: error category 'malformed-xml' - Got XPConnect JavaScript, expected malformed-xml
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser/browser_webconsole_bug_595934_message_categories.js | chrome://browser/content/tabbrowser.xml:430; [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIHttpChannel.isNoStoreResponse]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: chrome://browser/content/tabview.js :: ThumbnailStorage_onStateChange :: line 7719"  data: no]

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