Skip navigation
Currently Being Moderated

New lines in RichEditableText hangs app

Mar 25, 2010 7:23 AM

I've application when Im using RichEditableText in skin for TextInput. Also I'm binding "text" property from previosly entered text from server. If there is simple text, all is ok, if there are new lines (\n) after binding text to RichEditableText, whole app hangs or is it veeery slow. Cpu is 100%. In profiler I've found out, that there is infinite loop for recreating TextFlow objects. Really dont know what's problem.

 
Replies
  • Currently Being Moderated
    Mar 25, 2010 10:25 PM   in reply to franto kormanak

    I am not able to reproduce the problem, I think because of the bindings. Can you send me an example that has static text, fontSize, heightInLines, etc. defined? If its a bug in our code, we would really like the opportunity to fix it.

     

    Thanks!

     

    - robin

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 6, 2010 9:25 PM   in reply to franto kormanak

    TLF 1.1 included in Flex 4.1 has many long document performance improvements.  Suggest you try that out.  You can download it here.

     

    http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4

     

    Its in the nightly builds section.

     

    Hope that helps,

    Richard

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 7, 2010 3:21 PM   in reply to franto kormanak

    I've tried the code above in Flex 4.0 and 4.1 and haven't yet seen the hang. I get a fixed amount of DamageEvents in the profiler with the code in init() as it is above and taking the comments out.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 6:42 PM   in reply to franto kormanak

    I have this problem occuring now as well.  I had a TextArea set to 50% width and an explicit height.  It was used to display data from the server.  Suddenly, without apparent reason, it is throwing up all over me now.  However, from the beginning I have been putting new line chars in this text field.  Whatever.  What a PAITA.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 11:33 PM   in reply to jpwrunyan

    I can't reproduce this issue. Can you give us your code scrap so that we can have a deeper investigation? Thanks

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 4, 2011 5:59 AM   in reply to Gang Cai

    Hi

    I cannot because the problem appears to occur based on data from the server.  This is in production already so it requires luck to catch the error in time.  We are currently trying to find out just what exactly is in the string data from the server that makes the app crash.  All i can send are stack traces.  If we catch the error in real time before it gets replaced on the server, i will hopefully have the actual string data that reproduces the problem.  Please dont hold your breath though.

     

    Sent from my iPhone

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 11, 2012 6:49 PM   in reply to jpwrunyan

    We have so far confirmed that the hang-up happens when UTF-8 encoded double-byte characters are passed from the server and inserted into the TextArea component.

     

    In contrast, we tried changing to Shift-JIS and, although the component did not trigger an infinite loop, all the characters were moji-baked.

     

    So, the problem appears to be that TextArea cannot accept double-byte characters safely.

     

    I cannot reproduce this programmatically.  The string MUST come from an external source.

     

    Furthermore, the bug appears to be dependent upon a regular expression that is processing the string before it is assigned to the TextArea:

     

    textArea.text = value.replace(/\n\s*/g, " ") + "\n";

     

    If I remove the regular expression, the component does crash.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points