Observed the following javascript error while debugging T190917: CX2: Fix issues in paragraph alignment
jQuery.Deferred exception: Cannot read property 'getRange' of undefined TypeError: Cannot read property 'getRange' of undefined at http://localhost/wiki/extensions/VisualEditor/lib/ve/src/dm/ve.dm.InternalList.js?a92bc:434:83 at Array.sort (native) at VeDmInternalList.ve.dm.InternalList.sortGroupIndexes (http://localhost/wiki/extensions/VisualEditor/lib/ve/src/dm/ve.dm.InternalList.js?a92bc:425:19) at VeDmInternalList.ve.dm.InternalList.onTransact (http://localhost/wiki/extensions/VisualEditor/lib/ve/src/dm/ve.dm.InternalList.js?a92bc:377:9) at VeDmDocument.oo.EventEmitter.emit (http://localhost/wiki/resources/lib/oojs/oojs.jquery.js?4bc88:829:12) at VeDmDocument.ve.dm.Document.commit (http://localhost/wiki/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Document.js?27bdb:330:7) at VeDmSurface.ve.dm.Surface.changeInternal (http://localhost/wiki/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Surface.js?7b00b:877:25) at VeDmSurface.ve.dm.Surface.change (http://localhost/wiki/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Surface.js?7b00b:841:7) at VeDmSurfaceFragment.ve.dm.SurfaceFragment.change (http://localhost/wiki/extensions/VisualEditor/lib/ve/src/dm/ve.dm.SurfaceFragment.js?2f9b0:128:15) at VeDmSurfaceFragment.ve.dm.SurfaceFragment.insertDocument (http://localhost/wiki/extensions/VisualEditor/lib/ve/src/dm/ve.dm.SurfaceFragment.js?2f9b0:903:8)
To reproduce, follow the steps as given in T190917: CX2: Fix issues in paragraph alignment and observe the dev console. While translating sections by clicking on place holder, in certain sections, you will see that instead of translation, it collapse and console shows the above error. As far as I can see this is not related to the content because if I retry the same translation the problematic section would not have any error, and some other random section will throw this error? Mostly observed while clicking on the sections one after another. Some internal race condition is suspected.