Closed Bug 1913061 Opened 1 year ago Closed 1 year ago

The Debugger panel has crashed.

Categories

(DevTools :: Debugger, defect, P2)

Firefox 129
defect

Tracking

(firefox131 fixed)

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: vrbnjak.vid, Assigned: bomsy, NeedInfo)

References

Details

Attachments

(1 file)

This happens while on a breakpoint of a js file, which comes from within a iframe, and when you close the iframe the debugger crashes

Error:
TypeError: can't access property "codeMirror", editor is null

React Component Stack:
in Editor
in Connect(Editor)
in div
in main
in div
in div
in SplitBox
in div
in div
in SplitBox
in AppErrorBoundary
in div
in App
in Connect(App)
in Provider
in Provider

Stacktrace:
UNSAFE_componentWillReceiveProps@resource://devtools/client/debugger/src/components/Editor/index.js:298:41
callComponentWillReceiveProps@resource://devtools/client/shared/vendor/react-dom.js:8306: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
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:38:14
context/</<@resource://devtools/client/debugger/src/actions/utils/middleware/context.js:84:12
thunk/</</<@resource://devtools/client/debugger/src/actions/utils/middleware/thunk.js:29:100
dispatch@resource://devtools/client/shared/vendor/redux.js:681:28
removeTarget/<@resource://devtools/client/debugger/src/actions/threads.js:50:13
thunk/</</<@resource://devtools/client/debugger/src/actions/utils/middleware/thunk.js:29:45
bindActionCreator/<@resource://devtools/client/shared/vendor/redux.js:520:12
onTargetDestroyed@resource://devtools/client/debugger/src/client/firefox.js:164:11
_emit@resource://devtools/shared/event-emitter.js:242:32
emit@resource://devtools/shared/event-emitter.js:186:18
emit@resource://devtools/shared/event-emitter.js:330:18
_onTargetDestroyed@resource://devtools/shared/commands/target/target-command.js:342:28
_emit@resource://devtools/shared/event-emitter.js:242:32
emit@resource://devtools/shared/event-emitter.js:186:18
emit@resource://devtools/shared/event-emitter.js:330:18
_onTargetDestroyed@resource://devtools/client/fronts/watcher.js:74:12
_emit@resource://devtools/shared/event-emitter.js:242:32
emit@resource://devtools/shared/event-emitter.js:186:18
emit@resource://devtools/shared/event-emitter.js:330:18
onPacket@resource://devtools/shared/protocol/Front.js:348:13
onPacket@resource://devtools/client/devtools-client.js:458:13
send/<@resource://devtools/shared/transport/local-transport.js:67:25
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22

Thanks for reporting!

Looks like we might be hitting a scenario where the editor is null and there is also likely no selected source on the next props, in which case we should bail out and not load the component. This is related to https://searchfox.org/mozilla-central/rev/b1b87f95ecea00828298d1b3cd3d8718f9fcc3fc/devtools/client/debugger/src/components/Editor/index.js#142-144

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Flags: needinfo?(hmanilla)

Hi Vid,
I tried to create a test case using the information you provided, but i could not get it to crash.

Here is my STR

  • Open the debugger on this testpage
  • Go to script.js
  • Set a breakpoint on line 7
  • Click the close the iframe button
  • The script.js source will get removed.

Does this STR match yours or am i missing something?

I have a patch that should fix the issue, but it be nice to get a reproducible STR, so a test can be added.

Flags: needinfo?(hmanilla) → needinfo?(vrbnjak.vid)
Assignee: nobody → hmanilla
Status: NEW → ASSIGNED
Duplicate of this bug: 1914804

Hi Ege,
Thanks for reporting Bug 1914804.
Can you provide any steps to help reproduce the issue?

Flags: needinfo?(usingnot07)
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3e873449c83a [devtools] Fix crash when no editor and no next selected source r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
QA Whiteboard: [qa-131b-p2]
Duplicate of this bug: 1919466
Duplicate of this bug: 1917182
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: