[r230][Chrome] Long strings are truncated

0 favourites
  • 4 posts
From the Asset Store
This collection of music is the beautiful performance of rather small strings ensemble (8 first violins, 6 second violin
  • Thread requested by Ashley

    Problem Description

    Strings above a certain lenght are truncated depending on the context, to about half a million caracters.

    Attach a Capx:


    The download contains two file: the capx project, and a text file of about one-million caracters that I used in the project.

    The text is made of a single line, at the beginning is a big "THIS IS THE BEGINNING", at the end a big "THIS IS THE TAIL".

    In between is simply some HTML code I've been processing, this part doesn't matter here

    I'll refer to the text as the "one-million string".

    Description of Capx

    The Capx contains only a text box, which has three instance variables:

    "Variable", a text variable into which I directly pasted the one-million string

    "Pasted_Lenght", a number programmed to reflect the length of the string pasted into the text box.

    "Variable_Lenght", a number programmed to reflect the lenght of "FullHTML"

    Additionally, I programmed "Variable" to automatically capture the exact content of the text box.

    Steps to Reproduce Bug

    Observed Result

    • Start the project with Chrome in debug mode

    • Look for "FullHTML" and "Variable_Lenght" in the debugger

    ==> You'll notice that "FullHTML is truncated in the middle of the html and doesn't display the TAIL. It's lenght is said to be 30.000 instead of the expected one million

    • Open the text file in the notepad, and copy-paste the one-million string into the text box.

    ==> While looking into the textbox itself, you'll see the ending TAIL, meaning the string was succesfully pasted as a whole

    • Look for "Text" and "Pasted_lenght" inside the debugger

    ==> You'll notice that the debugger does not display the pasted string whole. Again, it is truncated in the middle of the code. It's lenght is said to be 524.288

    • Go back into the text box an type/erase a few caracters.

    ==> The advertised length remains at 524.288. My guess is it can't go higher and won't go down until you actually erase enough caracters. As well, the "text" in the debugger won't move unless you change caracters early in the string.

    • Redoing the same within Firefox, all the numbers match the actual lenght of the One Million string, (1.095.764), which displays both head and tail in the debug window.

    Expected Result

    Being able to input and manipulate insanely long strings.

    Affected Browsers

    Chrome: yes

    Firefox: NO

    Microsoft Edge*: yes

    *wasn't able to paste the string into edge, too much lag. Only the truncated variable is confirmed.

    Operating System and Service Pack

    Windows 10 64bit

    Construct 2 Version ID


  • Can you test the latest version r230, as well as Firefox, as per the bug report requirements?

  • Sure, currently rewritting the OP.

    The bugs affect r230, however, firefox seems safe from this bug, sorry I omitted this.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think Chrome has a limit on how much text can be entered in to a text input (at half a megabyte). It seems pretty reasonable, since it's unlikely anybody will sit there and type half a million characters in to a single-line text control. This is also a limitation in Chrome and not a problem with Construct 2. It's easy to work around:

    • use a textarea instead, which appears to handle the full string just fine (and scrolls so you can view it more usefully)
    • import the file as a project file and AJAX request it, which also handles the full length just fine

    If, for some reason, you really want the ability to paste a megabyte of data in to a single-line text input, you could report this to Chrome. However I'm going to close this as won't fix and would suggest one of those workarounds.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)