Opened 9 years ago

Closed 8 years ago

#13307 closed Bug (expired)

Uncaught IndexSizeError: Failed to execute 'extend' on 'Selection': 1... in Blink-browsers

Reported by: Martin Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc: glen.84@…


Seemingly at random, I get this exception when calling editor.getData() in my application. The error message is identical to #12727, but I believe it is a different bug since I use neither Div Editing Area or Content Template plugin.

I haven't been able to reproduce the bug myself, but I'm using a bugtracking tool with a console recorder in the public version of my application that tells me that the error occurs quite frequently. It seems to be a Blink-only problem and has been around since 4.4.6 at least.

Screenshot and build-config attached. I'll try switching to an uncompressed version of CKEditor to see if I can get some more info from the console recorder.

Attachments (2)

build-config.js (2.4 KB) - added by Martin 9 years ago.
console.JPG (29.9 KB) - added by Martin 9 years ago.

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by Martin

Attachment: build-config.js added

Changed 9 years ago by Martin

Attachment: console.JPG added

comment:1 Changed 9 years ago by Jakub Ś

Status: newpending
Version: 4.4.7

I can't reproduce this issue in default editor and this is required condition to accept the bug.

Please either provide steps to reproduce this problem in default standalone editor or try to identify this problem in your application. This might be caused by third-party script conflicting with editor, chrome custom plugins (they are known to break JS applications), CKEditor core code modifications or CKEditor third-party scripts.

Removing them and attaching one by one (with cache cleared) should show what is causing this problem.

comment:2 Changed 9 years ago by Piotrek Koszuliński

I've seen more this kind of errors recently - #12727, #13241. I'll check the code, maybe I'll have some ideas what may be wrong.

Last edited 9 years ago by Piotrek Koszuliński (previous) (diff)

comment:3 Changed 9 years ago by Martin

I have not made any modifications to the source code and I don't believe it's being caused by Chrome custom plugins. The problem first appeared after upgrading to 4.4.6, but it might just as well be a Chrome update from the same period causing the problem.

I should probably also mention that I have only seen this problem occur when using the inline editor and only when there are multiple editor instances on the same page, but most parts of my application uses multiple inline instances on the same page so this might be a coincidence as well since the problem seems to be intermittent.

comment:4 Changed 9 years ago by Piotrek Koszuliński

We've changed the related code in 4.4.6 IIRC so it makes sense that it started happening around this version. This code is a pretty complicated and ugly workaround for a Webkit and Blink issue with selection – these engines cannot maintain selection in empty inline elements and few other cases.

I've checked the code and it's pretty straightforward in that specific place. Before getData a filling char that we use to keep selection in place is removed and after getData it is restored. The position of selection is stored as references to focus and anchor nodes and offsets in them. As long as nothing changes in the editor on getData() this should work flawlessly, because the nodes and offsets should be valid.

So, what do you do with the data? Do you change anything in the DOM immediately after getting them? Do you perhaps modify contents of the editor from which you got them?

comment:5 Changed 9 years ago by Artur Delura

There are three related issues: #13389 #13307 #13284

comment:6 Changed 9 years ago by Szymon Cofalik

#13513 fixes #13389 and probably this but I can't be 100% sure because I can't reproduce a ticket with such general description.

comment:7 Changed 9 years ago by darkangel

Cc: glen.84@… added

comment:8 Changed 8 years ago by Jakub Ś

Resolution: expired
Status: pendingclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy