Closed Bug 1026583 Opened 10 years ago Closed 6 years ago

TypeError: this._extraPools is null

Categories

(DevTools :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(firefox63 fixed)

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: sole, Assigned: ochameau)

References

Details

(Whiteboard: [nightly-js-sentry:2908569])

Attachments

(4 files)

I keep getting this error on the console and when it happens it just breaks the rest of my code-whether devtools is open or not.

I don't know why this happens - it's very random. I think it might have something to do with the particular things I am trying to inspect but I am not quite sure how I am triggering it.

I got it while inspecting a WebGL + Web Audio demo with the Shader editor: http://5013.es/toys/to_the_beat_js/

And I also got it while inspecting a Web Audio + Web Components thing with the Web Audio inspector: http://sole.github.io/audio-tags/examples/07_mini_synth/

The error points to "main.js:1019" in devtools code, file is /Applications/FirefoxNightly.app/Contents/MacOS/omni.ja!/modules/devtools/server/main.js

And the code that triggers the error:
for (let pool of this._extraPools) {
      if (pool.has(aActorID)) {
        return pool;
      }
    }
Does the error message contain a stack as well?
No, I just get this error in the console output (see screenshot) and when I click on the line number I get the source code for the above mentioned file-that's it!
Attached image error in console
Product: Firefox → DevTools
We're seeing this in Sentry now: https://sentry.prod.mozaws.net/operations/nightly-js-errors/issues/2908569/

It was happening between 100-200 times a day, but jumped to 1000-2000 times a day on August 3rd and has stayed there ever since.
Whiteboard: [nightly-js-sentry:2908569]
I tried to shake the netmonitor, but can't reproduce this exeption.
It is hard to debug without a stack trace as it happens in a low level function.
Also, I looked into treeherder, and none of the mochitests throw this exception.
See Also: → 1299344
It seems to happen if you close DevTools while loading resources in the netmonitor 
The stack trace I had was:

  addActorPool (main.js#1440)
  _poolMap (protocol.js#848)
  manage (protocol.js#860)
  addResponseContent (network-event.js#434)
  _onComplete (network-monitor.js#686)
  onStreamClose (network-monitor.js#643)
  onInputStreamReady (network-monitor.js#737)
Assignee: nobody → poirot.alex
The first patch, against protocol.js is to address the low level issue, where protocol.js still tries to emit an event when the related actor is already destroyed.
In sendEvent, we should check for actorID being trying to emit it:
  https://searchfox.org/mozilla-central/source/devtools/shared/protocol.js#988-998

The two other patches are to prevent even trying to emit an event from netmonitor codebase.
Because the first patch still emits an error.

The second patch is to avoid doing that from the network response listener, that relates to the exception reported in this bug.

The third patch is to avoid these exception, that I reproduce very easily in today's build:
JavaScript error: resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/webconsole/listeners/document-events.js, line 78: TypeError: this.console.conn is null, can't access property "send" of it
Comment on attachment 9004200 [details]
Bug 1026583 - Prevent emitting webconsole event when its actor is already destroyed. r=Honza

Jan Honza Odvarko [:Honza] has approved the revision.
Attachment #9004200 - Flags: review+
Comment on attachment 9004199 [details]
Bug 1026583 - Avoid sending network monitor events when the related actors are already destroyed. r=Honza

Jan Honza Odvarko [:Honza] has approved the revision.
Attachment #9004199 - Flags: review+
Comment on attachment 9004198 [details]
Bug 1026583 - Avoid sending events for already destroyed actors. r=yulia

Yulia Startsev [:yulia] has approved the revision.
Attachment #9004198 - Flags: review+
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dd0901f47236
Avoid sending events for already destroyed actors. r=yulia
https://hg.mozilla.org/integration/mozilla-inbound/rev/7dee3ca1609f
Avoid sending network monitor events when the related actors are already destroyed. r=Honza
https://hg.mozilla.org/integration/mozilla-inbound/rev/3cd4ee02dfc3
Prevent emitting webconsole event when its actor is already destroyed. r=Honza
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: