Evaluating `1..toString(); debugger;` in console crashes Debugger when cm6 is enabled
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(firefox129 verified, firefox130 verified)
People
(Reporter: nchevobbe, Assigned: bomsy)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
Steps to reproduce
- With
devtools.debugger.features.codemirror-next
set to true, open the console - Evaluate
1..toString(); debugger;
Actual results
The Debugger panel is selected but it crashes. (if it didn't, resume, go back to the console and evaluate the same expression again)
Error:
RangeError: Position 15 is out of range for changeset of length 8
React Component Stack:
in InlinePreviews
in Connect(InlinePreviews)
in div
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:
mapPos@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:11260
Rt@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:41583
compare@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:38317
update/r<@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:88753
update@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:88780
update@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:170567
Bs/this.dispatchTransactions<@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:168450
dispatch@resource://devtools/client/shared/sourceeditor/codemirror6/codemirror6.bundle.mjs:1:169233
removeLineContentMarker@resource://devtools/client/shared/sourceeditor/editor.js:858:8
componentWillUnmount@resource://devtools/client/debugger/src/components/Editor/InlinePreviews.js:114:23
callComponentWillUnmountWithTimer@resource://devtools/client/shared/vendor/react-dom.js:12816:12
safelyCallComponentWillUnmount@resource://devtools/client/shared/vendor/react-dom.js:12824:40
commitUnmount@resource://devtools/client/shared/vendor/react-dom.js:13147:41
commitNestedUnmounts@resource://devtools/client/shared/vendor/react-dom.js:13178:18
unmountHostComponents@resource://devtools/client/shared/vendor/react-dom.js:13439:27
commitDeletion@resource://devtools/client/shared/vendor/react-dom.js:13498:26
commitAllHostEffects@resource://devtools/client/shared/vendor/react-dom.js:14142:25
commitRoot@resource://devtools/client/shared/vendor/react-dom.js:14344:9
completeRoot/<@resource://devtools/client/shared/vendor/react-dom.js:15731:15
unstable_runWithPriority@resource://devtools/client/shared/vendor/react.js:617:12
completeRoot@resource://devtools/client/shared/vendor/react-dom.js:15730:27
performWorkOnRoot@resource://devtools/client/shared/vendor/react-dom.js:15659:21
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
selectLocation/<@resource://devtools/client/debugger/src/actions/sources/select.js:269:13
Comment 1•4 months ago
|
||
Bomsy, cna you check this error? Thanks
Assignee | ||
Comment 2•4 months ago
|
||
I can confirm the crash, will fix as part of the codemirror 6 fixes.
Assignee | ||
Comment 3•3 months ago
|
||
Assignee | ||
Comment 4•3 months ago
|
||
Depends on D213012
Comment 5•3 months ago
|
||
Comment on attachment 9406305 [details]
WIP: Bug 1898157 - [devtools] Refactor lineContentMarkers to use StateFields from ViewPlugins
Revision D213012 was moved to bug 1892684. Setting attachment 9406305 [details] to obsolete.
Updated•2 months ago
|
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d1d037b18c11 [devtools] Refactor positionContentMarkers to use StateFields from ViewPlugins r=devtools-reviewers,nchevobbe
Comment 7•2 months ago
|
||
bugherder |
Updated•2 months ago
|
Comment 8•2 months ago
|
||
Reproducible on a 2024-05-22 Nightly build on Windows 10 using the steps from Comment 0.
Verified as fixed on Firefox Nightly 130.0a1 and Firefox 129.0b4 on Windows 10, Ubuntu 22, macOS 14.
Description
•