Crash in tile advance (Cannot destructure 'tile' from null) during measure on WebKit, since 6.39.0 #1720
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
@codemirror/viewcrashes during its measure/scroll cycle on WebKit (WKWebView /Safari engine), throwing repeatedly:
The crash originates in the tile iterator's
advancemethod, where({ tile, index } = parents.pop())is reached with an emptyparentsstack(so
parents.pop()isundefined). Each throw aborts the measure pass, whichcorrupts the height map —
scrollHeightthen balloons (observed 4492 → 7682 →10872, i.e. the document height added to itself each cycle) and the rendered
content "jumps". It is reliably retriggered by scrolling or drag-selecting.
Version bisection
Confirmed: 6.38.x
dist/index.jscontains noadvance(/resolveBlock; thecrash appeared with the tile/block-wrapper rendering introduced in 6.39.0.
Pinning
@codemirror/viewto 6.38.8 fixes it completely with no other change.Environment
EditorState.readOnly.of(true),EditorView.editable.of(false)).Stack trace (top frames)
Extensions in use
lineNumbers, highlightActiveLineGutter, foldGutter, highlightSpecialChars, drawSelection, bracketMatching, highlightActiveLine, highlightSelectionMatches, keymap(defaultKeymap+foldKeymap), syntaxHighlighting, EditorView.lineWrapping (compartment, was OFF when it crashed), a custom mark-decoration ViewPlugin, readOnly, editable=false. Document: a ~200-line Python file.Notes
I don't yet have a minimal standalone reproduction (it only manifests under
WebKit, and I couldn't isolate which input triggers the empty
parentsstack),but the version bisection above is precise and the stack points directly at the
parents.pop()inadvance. Happy to test a patch or help narrow down a reproin Safari.
It would help a lot if you could take the time to create a reproduction. I wasn't able to get this to happen going from your description.
This might be the same as this report. Could you see if @codemirror/view 6.43.4 makes the issue go away?