Closed Bug 1756341 Opened 2 years ago Closed 2 years ago

Console crashed: child is null in devtools/client/shared/components/menu/MenuList.js

Categories

(DevTools :: Console, defect, P1)

Firefox 97
defect

Tracking

(firefox100 fixed)

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: mtgmsvdrzmtsczqaoj, Assigned: nchevobbe, NeedInfo)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0

Steps to reproduce:

Using Construct3 to make a game and logging debug messages to console.
I left the game running for a while, and when I came back I found the console crash.

Actual results:

The Console panel has crashed.
File Bug Report
TypeError: child is null
React Component Stack

componentStack

in MenuList

in button

in MenuButton

in EvaluationContextSelector

in Connect(EvaluationContextSelector)

in Connect(Connect(EvaluationContextSelector))

in div

in div

in JSTerm

in Connect(JSTerm)

in div

in div

in App

in VisibilityHandler

in Unknown

in Connect(Component)

in AppErrorBoundary

in Provider

in Provider
Stacktrace

render/<@resource://devtools/client/shared/components/menu/MenuList.js:146:11

forEachSingleChild@resource://devtools/client/shared/vendor/react.js:1908:8

traverseAllChildrenImpl@resource://devtools/client/shared/vendor/react.js:1823:13

traverseAllChildrenImpl@resource://devtools/client/shared/vendor/react.js:1839:23

traverseAllChildren@resource://devtools/client/shared/vendor/react.js:1883:10

forEachChildren@resource://devtools/client/shared/vendor/react.js:1928:22

render@resource://devtools/client/shared/components/menu/MenuList.js:145:14

finishClassComponent@resource://devtools/client/shared/vendor/react-dom.js:10638:31

updateClassComponent@resource://devtools/client/shared/vendor/react-dom.js:10601:44

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

dispatch@resource://devtools/client/shared/vendor/redux.js:265:7

waitUntilService/</<@resource://devtools/client/shared/redux/middleware/wait-service.js:59:24

promiseMiddleware/</<@resource://devtools/client/shared/redux/middleware/promise.js:24:14

thunk/</</<@resource://devtools/client/shared/redux/middleware/thunk.js:18:11

_onTargetDestroyed@resource://devtools/client/framework/toolbox.js:766:18

_emit@resource://devtools/shared/event-emitter.js:244:34

emit@resource://devtools/shared/event-emitter.js:190:18

emit@resource://devtools/shared/event-emitter.js:342:18

_onTargetDestroyed@resource://devtools/shared/commands/target/target-command.js:306:28

_destroyExistingTargetsOnTargetSwitching@resource://devtools/shared/commands/target/target-command.js:245:14

_onTargetAvailable@resource://devtools/shared/commands/target/target-command.js:179:14

_emit@resource://devtools/shared/event-emitter.js:244:34

emit@resource://devtools/shared/event-emitter.js:190:18

emit@resource://devtools/shared/event-emitter.js:342:18

_onTargetAvailable@resource://devtools/client/fronts/watcher.js:60:10

_emit@resource://devtools/shared/event-emitter.js:244:34

emit@resource://devtools/shared/event-emitter.js:190:18

emit@resource://devtools/shared/event-emitter.js:342:18

onPacket@resource://devtools/shared/protocol/Front.js:336:13

onPacket@resource://devtools/client/devtools-client.js:482:13

send/<@resource://devtools/shared/transport/local-transport.js:68:25

exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22

exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22

Close and reopen the toolbox to clear this error.

Thanks a lot for the report
Would you have a link to the page you saw that on?

This is caused by this: https://searchfox.org/mozilla-release/rev/f8a114d1d43fe6a329547882faef5c724e6c81a9/devtools/client/shared/components/menu/MenuList.js#146 , but it would be great if we could reproduce it ourselves to see why it's failing.

As a workaround to get the console working again, you can disable the context selector by going to about:config and flipping devtools.webconsole.input.context to false.

Severity: -- → S2
Priority: -- → P1
Summary: The Console panel has crashed. → Console crashed: child is null in devtools/client/shared/components/menu/MenuList.js

Also, would you be able to check Beta (and Nightly if Beta is impacted) to see if we fixed that issue in the meantime ?

Flags: needinfo?(mtgmsvdrzmtsczqaoj)

@mtgmsvdrzmtsczqaoj: any chance to get some steps to reproduce the problem? It would be great help since otherwise there is not much we can do to fix this. Thank you!

Nicolas, since this is P1, and we don't have any STRs, should we just add a NPE condition to fix this?

Flags: needinfo?(nchevobbe)

sure, I don't think it would hurt. it would be nice to understand where the issue come from though.

I wonder if we aren't seeing a case that Alex saw when he added devtools/client/webconsole/components/Input/EvaluationContextSelector.js#160
Because otherwise, we should have any null children in the MenuList in the end (from the EvaluationContextSelector)

Flags: needinfo?(nchevobbe)
Assignee: nobody → nchevobbe
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/559805215a64
[devtools] Guard access to props in MenuList. r=Honza.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: