Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BD5F3200BA3 for ; Thu, 20 Oct 2016 10:50:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BBF39160AF2; Thu, 20 Oct 2016 08:50:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B3C67160ADB for ; Thu, 20 Oct 2016 10:50:42 +0200 (CEST) Received: (qmail 27410 invoked by uid 500); 20 Oct 2016 08:50:41 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 27397 invoked by uid 99); 20 Oct 2016 08:50:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2016 08:50:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id ED35E180149 for ; Thu, 20 Oct 2016 08:50:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.021 X-Spam-Level: X-Spam-Status: No, score=-0.021 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id i7ieHvtzejoT for ; Thu, 20 Oct 2016 08:50:38 +0000 (UTC) Received: from mail-qt0-f174.google.com (mail-qt0-f174.google.com [209.85.216.174]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 8EC5560CEA for ; Thu, 20 Oct 2016 08:50:38 +0000 (UTC) Received: by mail-qt0-f174.google.com with SMTP id s49so44328937qta.0 for ; Thu, 20 Oct 2016 01:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=2eESB9uIfwzagYFvaeXcjpEHLHVnYFKupsjz19+5EOk=; b=WbSZELlI4gEe8Ay7nLr6nxtBj8neykBifbL9Y+WPm9s1rkzygz57zZcA5GYDAMD0EL SooIDqdqc4e8mPdIFssXd3CxtXtAyPRwhiHjoeF0hegIW0nDj8hmbdLZE5cWL818n0R9 kDIbU2P5V9xd5VjLQKaRvyr2JuiEE+IQgjPPTCCV6IDg7B9mUNQUxfUx14JHvMG7YASP PvCThel8k1Ognz94IcuZMj40T4fD28THAo++juRwT1Ow92lJAdLTJWIqBjn/1f821qht /DjbRGRibEutyoIYNbFoAtYi9R/hGBHSkh1/bjtIK06yaOa+qgMrOIhAuG7nVtJV9Adf gL1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=2eESB9uIfwzagYFvaeXcjpEHLHVnYFKupsjz19+5EOk=; b=A9trBU0AKpeD0S2Cag6ZL/adtlZZ8AhqrFDFphKjbhWvDQdztFI29oQZotmafxKWDr KxGHUDNwjbcBb2vrNyJGuu+wPTsw6IZUYonzP4BzJPM3ylCJOhjTmhZiFkGj11amw38E Q7BAIG936WRV3P4TAO6BKvKx2TgMONsF24mT0CL5eB35hvVFIUkKPFg3ZpW2CWdZnT1x yluAD4QdRzH6xVYMalidQ1tA6vJSwROykqIh6eKw+wuf5EBP7Aam07fyjqL5h+Yrw53+ oCsR7vFhyddMacHrVj07cd6PAdEaGOyFxPzah2mAHzHAZtvG+sYyfMiy/pty0woh4+vp xLDw== X-Gm-Message-State: AA6/9RmeA4HXkscAD/3Cc5RX2ST9rhA2fFxZmVvKFNCbkzfchdnSo3dd9bKfmB+sL8TfR1/KZ/adE4nUb7dzPA== X-Received: by 10.28.127.14 with SMTP id a14mr7554574wmd.80.1476953136095; Thu, 20 Oct 2016 01:45:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.145.55 with HTTP; Thu, 20 Oct 2016 01:45:15 -0700 (PDT) In-Reply-To: <18D82294-258F-4506-B29F-5C778C72A8D2@gmail.com> References: <37229ADD-B41C-4851-8203-9D2D3E2B2EEF@gmail.com> <18D82294-258F-4506-B29F-5C778C72A8D2@gmail.com> From: Mihai Chira Date: Thu, 20 Oct 2016 10:45:15 +0200 Message-ID: Subject: Re: [jira] [Comment Edited] (FLEX-35078) Fatal when SelectionManager tries to reapply selection onto changed textFlow To: "dev@flex.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable archived-at: Thu, 20 Oct 2016 08:50:43 -0000 No problem, and thanks for that, I appreciate it! Will email you a reminder= . On 20 October 2016 at 10:37, Harbs wrote: > Hi Mihai, > > I forgot about this. I=E2=80=99m not going to have time to look into this= for at least a week or two. > > Please email me a reminder to take a look in a couple of weeks=E2=80=A6 > > Harbs > > On Oct 20, 2016, at 11:29 AM, Mihai Chira wrote: > >> If anyone with TLF knowledge wants to take a look at this, it would be >> quite helpful. Some of the investigation work is already done, and >> someone who understands what _should_ happen can probably spot the >> problem quickly. Thank you! >> >> On 29 August 2016 at 15:26, Mihai Chira wrote: >>> Hi Harbs, just a quick reminder about this ticket, for when you have ti= me. >>> >>> Many thanks! >>> Mihai >>> >>> On 13 April 2016 at 12:54, Mihai Chira wrote: >>>> Actually this bug seems to occur when the empty span is *not* removed. >>>> Thanks for taking a look! >>>> >>>> On 13 April 2016 at 12:53, Harbs wrote: >>>>> I think TLF is more aggressive than it used to be in removing empty s= pans. >>>>> >>>>> I=E2=80=99ll try to look into this when I find the time. >>>>> >>>>> On Apr 13, 2016, at 1:22 PM, Mihai Chira wrot= e: >>>>> >>>>>> Hey guys, I feel I've done as much as I can on this ticket to pave t= he >>>>>> way for someone with more TLF knowledge to hopefully have an easy ti= me >>>>>> understanding and fixing it. Do any of you have time to take a look? >>>>>> Many thanks! >>>>>> >>>>>> On 13 April 2016 at 11:50, Mihai Chira (JIRA) wrot= e: >>>>>>> >>>>>>> [ https://issues.apache.org/jira/browse/FLEX-35078?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15238824#comment-15238824 ] >>>>>>> >>>>>>> Mihai Chira edited comment on FLEX-35078 at 4/13/16 9:49 AM: >>>>>>> ------------------------------------------------------------- >>>>>>> >>>>>>> * in {{TextFlowLine.makeSelectionBlocks()}} {{textLine.getAtomIndex= AtCharIndex(27) =3D=3D -1}} although {{textLine.rawTextLength =3D=3D 37}} >>>>>>> * after validation (see the *Workaround* in the ticket description)= the text flow >>>>>>> {noformat} >>>>>>>

The bug is in the function TextFlowLine.adjustEndElementForBidi<= /p> >>>>>>> {noformat} is converted into {noformat} >>>>>>>

The bug is in the functio= n TextFlowLine.adjustEndElementForBidi

{noformat} >>>>>>> (where the empty span is where the bullet text used to be) and the = fatal isn't thrown. >>>>>>> >>>>>>> >>>>>>> was (Author: evolverine): >>>>>>> * in {{TextFlowLine.makeSelectionBlocks()}} {{textLine.getAtomIndex= AtCharIndex(27) =3D=3D -1}} although {{textLine.rawTextLength =3D=3D 37}} >>>>>>> * after validation (see the *Workaround* in the ticket description)= the text flow >>>>>>> {noformat} >>>>>>>

The bug is in the function TextFlowLine.adjustEndElementForBidi<= /p> >>>>>>> {noformat} is converted into {noformat} >>>>>>>

The bug is in the functio= n TextFlowLine.adjustEndElementForBidi

{noformat} >>>>>>> where the empty span is where the bullet text used to be. >>>>>>> >>>>>>>> Fatal when SelectionManager tries to reapply selection onto change= d textFlow >>>>>>>> ------------------------------------------------------------------= ---------- >>>>>>>> >>>>>>>> Key: FLEX-35078 >>>>>>>> URL: https://issues.apache.org/jira/browse/FLEX-3507= 8 >>>>>>>> Project: Apache Flex >>>>>>>> Issue Type: Bug >>>>>>>> Components: Spark: RichEditableText, TLF >>>>>>>> Affects Versions: Apache Flex 4.15.0 >>>>>>>> Reporter: Mihai Chira >>>>>>>> Assignee: Mihai Chira >>>>>>>> Fix For: Apache Flex 4.16.0 >>>>>>>> >>>>>>>> Attachments: Main.mxml >>>>>>>> >>>>>>>> >>>>>>>> *Steps to reproduce*: >>>>>>>> * run the attached mxml >>>>>>>> * click on the "Bullets" button >>>>>>>> *Expected results*: the bullet text is removed from the paragraph = and the RichEditableText is focused. >>>>>>>> *Actual results*: the bullet text is removed, but when the focus m= oves back to the RichEditableText component, the following fatal is thrown: >>>>>>>> {noformat} >>>>>>>> [Fault] exception, information=3DRangeError: Error #2006: The supp= lied index is out of bounds. >>>>>>>> at flash.text.engine::TextLine/getAtomBidiLevel() >>>>>>>> at flashx.textLayout.compose::TextFlowLine/adjustEndElementForBidi= ()[C:\Users\evolverine\Adobe Flash Builder 4.7\FLEX-33058\src\flashx\textLa= yout\compose\TextFlowLine.as:2499] >>>>>>>> at flashx.textLayout.compose::TextFlowLine/makeSelectionBlocks()[C= :\Users\evolverine\Adobe Flash Builder 4.7\FLEX-33058\src\flashx\textLayout= \compose\TextFlowLine.as:1812] >>>>>>>> at flashx.textLayout.compose::TextFlowLine/http://ns.adobe.com/tex= tLayout/internal/2008::calculateSelectionBounds()[C:\Users\evolverine\Adobe= Flash Builder 4.7\FLEX-33058\src\flashx\textLayout\compose\TextFlowLine.as= :1517] >>>>>>>> at flashx.textLayout.compose::TextFlowLine/getSelectionShapesCache= Entry()[C:\Users\evolverine\Adobe Flash Builder 4.7\FLEX-33058\src\flashx\t= extLayout\compose\TextFlowLine.as:1428] >>>>>>>> at flashx.textLayout.compose::TextFlowLine/createSelectionShapes()= [C:\Users\evolverine\Adobe Flash Builder 4.7\FLEX-33058\src\flashx\textLayo= ut\compose\TextFlowLine.as:1664] >>>>>>>> at flashx.textLayout.compose::TextFlowLine/http://ns.adobe.com/tex= tLayout/internal/2008::hiliteBlockSelection()[C:\Users\evolverine\Adobe Fla= sh Builder 4.7\FLEX-33058\src\flashx\textLayout\compose\TextFlowLine.as:219= 6] >>>>>>>> at flashx.textLayout.container::ContainerController/http://ns.adob= e.com/textLayout/internal/2008::addSelectionShapes()[C:\Users\evolverine\wo= rkspace\tlf\textLayout\src\flashx\textLayout\container\ContainerController.= as:2920] >>>>>>>> at flashx.textLayout.edit::SelectionManager/addSelectionShapes()[C= :\Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\edit\Sele= ctionManager.as:1240] >>>>>>>> at flashx.textLayout.edit::SelectionManager/refreshSelection()[C:\= Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\edit\Select= ionManager.as:1272] >>>>>>>> at flashx.textLayout.edit::SelectionManager/http://ns.adobe.com/te= xtLayout/internal/2008::setSelectionFormatState()[C:\Users\evolverine\works= pace\tlf\textLayout\src\flashx\textLayout\edit\SelectionManager.as:896] >>>>>>>> at flashx.textLayout.edit::SelectionManager/focusInHandler()[C:\Us= ers\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\edit\Selectio= nManager.as:2279] >>>>>>>> at flashx.textLayout.container::ContainerController/focusInHandler= ()[C:\Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\conta= iner\ContainerController.as:2452] >>>>>>>> at flashx.textLayout.container::TextContainerManager/focusInHandle= r()[C:\Users\evolverine\workspace\tlf\textLayout\src\flashx\textLayout\cont= ainer\TextContainerManager.as:2089] >>>>>>>> at spark.components.supportClasses::RichEditableTextContainerManag= er/focusInHandler()[C:\Users\evolverine\workspace\flex-sdk\frameworks\proje= cts\spark\src\spark\components\supportClasses\RichEditableTextContainerMana= ger.as:642] >>>>>>>> at flashx.textLayout.container::ContainerController/http://ns.adob= e.com/textLayout/internal/2008::requiredFocusInHandler()[C:\Users\evolverin= e\workspace\tlf\textLayout\src\flashx\textLayout\container\ContainerControl= ler.as:2470] >>>>>>>> at flash.display::Stage/set focus() >>>>>>>> at mx.core::UIComponent/setFocus()[C:\Users\evolverine\workspace\f= lex-sdk\frameworks\projects\framework\src\mx\core\UIComponent.as:10437] >>>>>>>> at spark.components::RichEditableText/setFocus()[C:\Users\evolveri= ne\workspace\flex-sdk\frameworks\projects\spark\src\spark\components\RichEd= itableText.as:3122] >>>>>>>> at Main/bulletList_clickHandler()[C:\Users\evolverine\Adobe Flash = Builder 4.7\FLEX-33058\src\Main.mxml:39] >>>>>>>> at Main/__bulletsButton_click()[C:\Users\evolverine\Adobe Flash Bu= ilder 4.7\FLEX-33058\src\Main.mxml:71] >>>>>>>> {noformat} >>>>>>>> *Workaround*: call {{display.validateNow();}} before {{display.set= Focus();}} >>>>>>>> *Notes*: >>>>>>>> * couldn't reproduce the bug with only one line; we seem to need t= he text to wrap around the second line. >>>>>>>> * couldn't reproduce the bug if the span representing the bullet t= ext wasn't set to an explicit font size (of any value). >>>>>>>> * could reproduce the bug with many random (non-empty) strings for= the bullet text, including one space. >>>>>>>> * could reproduce the bug when I set the fontWeight instead of the= fontSize on the bullet span. It seems that anything that will get the bull= et placed into a separate span rather than merged with the span containing = the main text will reproduce the bug. >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> This message was sent by Atlassian JIRA >>>>>>> (v6.3.4#6332) >>>>> >