You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected error with message Failed to execute 'setStart' on 'Range': The offset 4294967292 is invalid. #4353
IndexSizeError: Failed to execute 'setStart' on 'Range': The offset 4294967292 is invalid.
at Selection.select (file:///C:/Program%20Files/marktext/resources/app.asar/out/renderer/assets/index-DgUR2NkZ.js:91196:12)
at Selection.setCursorRange (file:///C:/Program%20Files/marktext/resources/app.asar/out/renderer/assets/index-DgUR2NkZ.js:91331:10)
at ContentState.setCursor (file:///C:/Program%20Files/marktext/resources/app.asar/out/renderer/assets/index-DgUR2NkZ.js:142811:15)
at ContentState.partialRender (file:///C:/Program%20Files/marktext/resources/app.asar/out/renderer/assets/index-DgUR2NkZ.js:142876:12)
at ContentState2.updateParagraph (file:///C:/Program%20Files/marktext/resources/app.asar/out/renderer/assets/index-DgUR2NkZ.js:138787:12)
at FrontMenu.selectItem (file:///C:/Program%20Files/marktext/resources/app.asar/out/renderer/assets/index-DgUR2NkZ.js:149759:22)
at Object.click (file:///C:/Program%20Files/marktext/resources/app.asar/out/renderer/assets/index-DgUR2NkZ.js:149666:20)
at invokeHandler (file:///C:/Program%20Files/marktext/resources/app.asar/out/renderer/assets/index-DgUR2NkZ.js:92215:13)
at handleEvent (file:///C:/Program%20Files/marktext/resources/app.asar/out/renderer/assets/index-DgUR2NkZ.js:92226:5)
at HTMLLIElement.handler (file:///C:/Program%20Files/marktext/resources/app.asar/out/renderer/assets/index-DgUR2NkZ.js:92231:5)
Thanks for the report. This crash belongs to a long-standing Range.setStart offset family (#2526, #2627, #2800, #3378, #3542, …, #4159, #4372) where, after partialRender, the captured caret offset can exceed the new container's legal range and trip IndexSizeError. The 4294967292 / 4294967293 values are negative offsets that wrapped through uint32 interpretation.
The defensive clamp landed on develop in #4358 (commit 1a2d2341, 2026-06-04): packages/muyajs/lib/selection/index.js now bounds the offset by childNodes.length for element nodes and by text length for text nodes before forwarding to Range.setStart / Range.setEnd / Selection.extend. Your version (v0.19.0) predates the fix.
Closing as already fixed on develop. The fix will ship in the next release — please give it a try once it's out and feel free to reopen if you can still reproduce it there.
Activity
Jocs commentedon Jun 6, 2026
Thanks for the report. This crash belongs to a long-standing
Range.setStartoffset family (#2526, #2627, #2800, #3378, #3542, …, #4159, #4372) where, afterpartialRender, the captured caret offset can exceed the new container's legal range and tripIndexSizeError. The4294967292/4294967293values are negative offsets that wrapped throughuint32interpretation.The defensive clamp landed on
developin #4358 (commit1a2d2341, 2026-06-04):packages/muyajs/lib/selection/index.jsnow bounds the offset bychildNodes.lengthfor element nodes and by text length for text nodes before forwarding toRange.setStart/Range.setEnd/Selection.extend. Your version (v0.19.0) predates the fix.Closing as already fixed on
develop. The fix will ship in the next release — please give it a try once it's out and feel free to reopen if you can still reproduce it there.