"TypeError: this.markup is undefined: InspectorPanel_onNavigatedAway/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/inspector/inspector-panel.js:312" on all mochitest-bc runs

RESOLVED FIXED in Firefox 26


5 years ago
2 months ago


(Reporter: RyanVM, Assigned: pbro)


(Blocks: 1 bug)

Firefox 26
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(firefox25 unaffected, firefox26 fixed, firefox-esr24 unaffected)



(1 attachment, 1 obsolete attachment)



5 years ago
TBPL says this is a regression from bug 879578.


Ubuntu VM 12.04 fx-team opt test mochitest-browser-chrome on 2013-09-06 04:01:22 PDT for push bf671d77bdad
slave: tst-linux32-ec2-344

04:26:56     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/inspector/test/browser_inspector_select_last_selected.js | Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://mochi.test:8888/browser/browser/devtools/inspector/test/browser_inspector_select_last_selected2.html" line: 0}]
04:26:56     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/devtools/inspector/test/browser_inspector_select_last_selected.js | Node re-selected after navigation
04:26:56     INFO -  JavaScript error: resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/styleinspector/rule-view.js, line 1044: this.elementStyle is undefined
04:26:56     INFO -  TypeError: this.markup is undefined: InspectorPanel_onNavigatedAway/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/inspector/inspector-panel.js:312
04:26:56     INFO -  @resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/shared/event-emitter.js:63
04:26:56     INFO -  EventEmitter_emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/shared/event-emitter.js:107
04:26:56     INFO -  InspectorPanel__onMarkupFrameLoad@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/inspector/inspector-panel.js:606
04:26:56     INFO -  InspectorPanel_initMarkupPanel_onload@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/inspector/inspector-panel.js:588
04:26:56     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/devtools/inspector/test/browser_inspector_select_last_selected.js | Console message: [JavaScript Error: "TypeError: this.elementStyle is undefined" {file: "resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/styleinspector/rule-view.js" line: 1044}]
04:26:57     INFO -  INFO TEST-END | chrome://mochitests/content/browser/browser/devtools/inspector/test/browser_inspector_select_last_selected.js | finished in 4805ms


5 years ago
Flags: needinfo?(pbrosset)
This only seem to happen in this test I added for bug 879578.
Indeed, when similar a scenario is executed by a user, steps are not executed in the same event loop as when the markup-view is created or destroyed.

One of the errors I've identified comes from calling MarkupView._updateChildren after MarkupView has been destroyed.
Indeed, in its `detroy` function, MV does `this._containers`, and in `_updateChildren` MV does `if(!this._containers) {return promise.reject("markup view destroyed");}`.

I've managed to fix the failing test by adding many executeSoon(...). But it feels wrong to have to do this, however I can't figure out a better way at this stage (other than using setTimeout(..., 1000)).

Attaching the patch now to ask for help.
Flags: needinfo?(pbrosset)
Created attachment 801419 [details] [diff] [review]

Paul, could you please help me out here?
Attachment #801419 - Flags: feedback?(paul)
Comment on attachment 801419 [details] [diff] [review]

Transferring review to Mike as Paul won't have time now.
Attachment #801419 - Flags: feedback?(paul) → review?(mratcliffe)
Comment on attachment 801419 [details] [diff] [review]

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

::: browser/devtools/inspector/test/browser_inspector_select_last_selected.js
@@ +101,5 @@
>    function testSameNodeSelectedOnNavigateAwayAndBack() {
>      // On page2, select id5
>      let id = "id5";
>      let div = content.document.getElementById(id);
> +    

Nit: Whitespace
Attachment #801419 - Flags: review?(mratcliffe) → review+
Thanks Mike for the review.
Attaching a new patch now to remove the whitepsace.
Whiteboard: [land-in-fx-team]
Created attachment 802931 [details] [diff] [review]

Whitespace removed.
Attachment #801419 - Attachment is obsolete: true


5 years ago
Keywords: checkin-needed

Comment 8

5 years ago

FWIW, [land-in-fx-team] is needless these days IMO given that we're using fx-team as another integration branch that's merged 1-2 times daily to m-c.
Keywords: checkin-needed
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]

Comment 9

5 years ago
Last Resolved: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 26


5 years ago
Blocks: 920191


5 years ago
No longer blocks: 910614


5 years ago
status-firefox25: --- → unaffected
status-firefox26: --- → fixed
status-firefox-esr24: --- → unaffected


2 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.