Crash with "TypeError: selectedFrame is undefined"
Categories
(DevTools :: Debugger, defect)
Tracking
(firefox123 fixed)
Tracking | Status | |
---|---|---|
firefox123 | --- | fixed |
People
(Reporter: 5i13ghzt462u, Assigned: bomsy)
References
Details
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta-
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Steps to reproduce:
Access a simple website index.html, it was really a one-html-site only, with inline JS that creates/appends some DIVs to the HTML. Nothing more, very basic HTML.
And opened or had open the devtools -> Debugger.
Actual results:
TypeError: selectedFrame is undefined
React Component Stack
componentStack
in Connect(Scopes)
in div
in aside
in div
in Accordion
in div
in div
in div
in SecondaryPanes
in Connect(SecondaryPanes)
in div
in div
in SplitBox
in AppErrorBoundary
in div
in App
in Connect(App)
in Provider
in Provider
Stacktrace
mapStateToProps@resource://devtools/client/debugger/src/components/SecondaryPanes/Scopes.js:301:53
mapToPropsProxy@resource://devtools/client/shared/vendor/react-redux.js:1776:92
handleNewState@resource://devtools/client/shared/vendor/react-redux.js:1937:41
handleSubsequentCalls@resource://devtools/client/shared/vendor/react-redux.js:1954:30
pureFinalPropsSelector@resource://devtools/client/shared/vendor/react-redux.js:1959:32
runComponentSelector@resource://devtools/client/shared/vendor/react-redux.js:1233:39
componentWillReceiveProps@resource://devtools/client/shared/vendor/react-redux.js:1357:23
callComponentWillReceiveProps@resource://devtools/client/shared/vendor/react-dom.js:8303:14
updateClassInstance@resource://devtools/client/shared/vendor/react-dom.js:8482:36
updateClassComponent@resource://devtools/client/shared/vendor/react-dom.js:10599:20
beginWork@resource://devtools/client/shared/vendor/react-dom.js:11419:16
performUnitOfWork@resource://devtools/client/shared/vendor/react-dom.js:14702:12
workLoop@resource://devtools/client/shared/vendor/react-dom.js:14720:24
renderRoot@resource://devtools/client/shared/vendor/react-dom.js:14803:15
performWorkOnRoot@resource://devtools/client/shared/vendor/react-dom.js:15655:17
performWork@resource://devtools/client/shared/vendor/react-dom.js:15567:24
performSyncWork@resource://devtools/client/shared/vendor/react-dom.js:15541:14
requestWork@resource://devtools/client/shared/vendor/react-dom.js:15410:5
scheduleWork@resource://devtools/client/shared/vendor/react-dom.js:15224:16
enqueueSetState@resource://devtools/client/shared/vendor/react-dom.js:8192:17
Component.prototype.setState@resource://devtools/client/shared/vendor/react.js:328:16
onStateChange@resource://devtools/client/shared/vendor/react-redux.js:1412:16
notify@resource://devtools/client/shared/vendor/react-redux.js:1159:21
notifyNestedSubs@resource://devtools/client/shared/vendor/react-redux.js:1198:20
onStateChange@resource://devtools/client/shared/vendor/react-redux.js:1409:16
dispatch@resource://devtools/client/shared/vendor/redux.js:265:7
waitUntilService/</<@resource://devtools/client/debugger/src/actions/utils/middleware/wait-service.js:71:24
promiseMiddleware/</<@resource://devtools/client/debugger/src/actions/utils/middleware/promise.js:39:14
context/</<@resource://devtools/client/debugger/src/actions/utils/middleware/context.js:85:12
thunk/</</<@resource://devtools/client/debugger/src/actions/utils/middleware/thunk.js:29:100
dispatch@resource://devtools/client/shared/vendor/redux.js:681:28
mapFrames/<@resource://devtools/client/debugger/src/actions/pause/mapFrames.js:149:13
Expected results:
No crash.
Bug 1533945 looks related, but is said to be fixed years ago.
Comment 2•11 months ago
|
||
not sure what's happening, but we have this code where we have a guard on selectedFrame, but we're accessing it before...
const why = getPauseReason(state, selectedFrame.thread);
const expandedScopes = getLastExpandedScopes(state, selectedFrame.thread);
...
if (!selectedFrame) {
return {};
}
so we might have reintroduced a bug (in Bug 1856270 I guess?)
Assignee | ||
Comment 3•11 months ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #2)
not sure what's happening, but we have this code where we have a guard on selectedFrame, but we're accessing it before...
const why = getPauseReason(state, selectedFrame.thread); const expandedScopes = getLastExpandedScopes(state, selectedFrame.thread); ... if (!selectedFrame) { return {}; }
so we might have reintroduced a bug (in Bug 1856270 I guess?)
Yep looks like that was introduced by me...will open a patch to fix.
Assignee | ||
Comment 4•11 months ago
|
||
Updated•11 months ago
|
Comment 7•11 months ago
|
||
bugherder |
Updated•10 months ago
|
Assignee | ||
Comment 10•10 months ago
|
||
Comment on attachment 9372788 [details]
Bug 1874382 - [devtools] Make sure to check the selectedFrame before trying to call it r=#devtools-reviewers
Beta/Release Uplift Approval Request
- User impact if declined: The devtools crashes for users.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): It's a small javascript change to check a value exists before it is used.
- String changes made/needed:
- Is Android affected?: Unknown
Comment 11•10 months ago
|
||
Comment on attachment 9372788 [details]
Bug 1874382 - [devtools] Make sure to check the selectedFrame before trying to call it r=#devtools-reviewers
The fix landed to mozilla-central during the 123 nightly cycle so it is already part of 123 beta, thanks!
Description
•