Closed
Bug 1296589
Opened 7 years ago
Closed 7 years ago
TypeError: this._locationStore is null when navigating from about:newtab with DevTools open
Categories
(DevTools :: General, defect, P2)
DevTools
General
Tracking
(firefox51 fixed)
RESOLVED
FIXED
Firefox 51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: jsnajdr, Assigned: jbhoosreddy)
References
Details
Attachments
(1 file, 2 obsolete files)
2.07 KB,
patch
|
jbhoosreddy
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce: 1. Open about:newtab 2. Open DevTools on the about:newtab page 3. Navigate to another page in the same tab (e.g., by clicking on one of the tiles offered by about:newtab) Result: TypeError: this._locationStore is null: SourceMapService.prototype.reset@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/framework/source-map-service.js:44:3 SourceMapService.prototype.destroy@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/framework/source-map-service.js:49:3 Toolbox.prototype.destroy@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/framework/toolbox.js:2060:7 emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/event-emitter.js:191:13 TabTarget.prototype.destroy@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/framework/target.js:567:5 TabTarget.prototype._setupRemoteListeners/this._onTabDetached@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/framework/target.js:481:9 eventSource/aProto.emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:132:9 DebuggerClient.prototype.onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:1007:7 LocalDebuggerTransport.prototype.send/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/transport/transport.js:570:13 exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14 exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
Comment 1•7 years ago
|
||
Tentatively blocking on the source maps in console bug since I'm assuming that's when this started
Blocks: 670002
Assignee | ||
Comment 2•7 years ago
|
||
Apparently, I'm unable to assign myself to this bug, but I can take this.
Assignee | ||
Comment 3•7 years ago
|
||
Added guards to reset and unsubscribe methods for the source map service to prevent access to the store, if it is not initialized yet.
Attachment #8783066 -
Flags: review?(jsantell)
Updated•7 years ago
|
Assignee: nobody → jaideepb
Assignee | ||
Updated•7 years ago
|
Status: NEW → ASSIGNED
Comment 4•7 years ago
|
||
Comment on attachment 8783066 [details] [diff] [review] 1296589.patch Review of attachment 8783066 [details] [diff] [review]: ----------------------------------------------------------------- Looks good -- I wonder if we should just clear the map upon destroy rather than having these checks and nullifying the maps.
Attachment #8783066 -
Flags: review?(jsantell) → review+
Reporter | ||
Comment 5•7 years ago
|
||
There might be a better way to fix this. The error stack trace suggests that the sourceMapService.destroy() method is called on already destroyed (or unitialized) instance. Jaideep's patch adds guards in this method, effectively hiding the error instead of really fixing it. Jaideep, maybe you could investigate what is going on and why the incorrect calls happen? This would lead to a fix that takes more effort, but ultimately leads to cleaner and better code.
Assignee | ||
Comment 6•7 years ago
|
||
(In reply to Jarda Snajdr [:jsnajdr] from comment #5) > There might be a better way to fix this. The error stack trace suggests that > the sourceMapService.destroy() method is called on already destroyed (or > unitialized) instance. Jaideep's patch adds guards in this method, > effectively hiding the error instead of really fixing it. Jaideep, maybe you > could investigate what is going on and why the incorrect calls happen? This > would lead to a fix that takes more effort, but ultimately leads to cleaner > and better code. Jordan and I discussed about this before, and this is one of the things I have to investigate, in one of my follow up bugs. I believe I already have a follow up bug filed for the issue of handling toolbox events, where I was planning on looking into this more deeply, as I go through my notes when I go back. Personally, I would like land this patch so that this error does not add noise for others trying out the feature. But if a little delay is okay, I can resolve this in this bug itself. I am planning to tackle the root cause of the issue though. (In reply to Jordan Santell [:jsantell] [@jsantell] (Away from Bugzilla for awhile) from comment #4) > Comment on attachment 8783066 [details] [diff] [review] > 1296589.patch > > Review of attachment 8783066 [details] [diff] [review]: > ----------------------------------------------------------------- > > Looks good -- I wonder if we should just clear the map upon destroy rather > than having these checks and nullifying the maps. I still have to try it out but I feel like you are right about not nullifying the Map objects. I looked into the toolbox events which the source map service listens to, and I think I understand why we were seeing that behavior. I will look into it and submit another patch if it works better.
(In reply to Jaideep Bhoosreddy [:jbhoosreddy] from comment #2) > Apparently, I'm unable to assign myself to this bug, but I can take this. (I have given your new Bugzilla account permission to make changes.)
Priority: -- → P2
Assignee | ||
Comment 8•7 years ago
|
||
Removed listener in the Source Map Service for the toolbox "close" event, as it is handled by the toolbox itself, which explicitly calls the destroy method for this.
Attachment #8783066 -
Attachment is obsolete: true
Attachment #8784104 -
Flags: review+
Assignee | ||
Comment 9•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8b720d2cb778
Assignee | ||
Updated•7 years ago
|
Attachment #8784104 -
Attachment is obsolete: true
Assignee | ||
Comment 10•7 years ago
|
||
Attachment #8784191 -
Flags: review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 11•7 years ago
|
||
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/fx-team/rev/cb2e635542cf Add guard to prevent accessing location store before it is initialized. r=jsantell
Keywords: checkin-needed
Comment 12•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cb2e635542cf
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
Comment 13•6 years ago
|
||
I have reproduced this bug with Firefox nightly 51.0a1(build id:20160819030226)on windows 7(64 bit) I have verified this bug as fixed with Firefox beta 51.0b8(build id:20161215085501) User Agent:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 [bugday-20161214]
Updated•5 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•