Suggestion 1.

Is it feasible for you to avoid the problem ?

i.e. rather than something like (I assume what you currently have)

    put URL ("file:inputdata.txt") into myVar
    replaceText (...)
    put myModifiedVar into URL("file:output.txt")

do the processing within a read / write loop, something very vaguely like

  open file "inputdata.txt" for read
  open file "output.txt" for write
  repeat forever
     read from file "inputdata.txt" until CR
     if the result is EOF then exit repeat
     put it into t
     replace comma with ";" in t
     write t & CR to file "output.txt"
  end repeat

Suggestion 2.
You mentioned a synthetic example (i.e. creating a data string and processing it). Can you post the snippet(s) of code to create and operate that sample, and let others try it to see if
(a) they also encounter a problem
   and
(b) can find a variant that will work

Thanks
Alex.


On 26/03/2015 20:42, R.H. wrote:
I am trying in varying ways to process large chunks of text data, actually
in this current application trying to read my Gmail contact data (cvs
export) and converting such data to lists / arrays.

Using lists I want to exchange commas and returns inside quoted text and
keep records as lines to be able to import to Excel or do whatever.

Using either a "repeat for" or "repeat with" loop, using replaceTex(),
offset() or simply going through each characters and changing one or the
other character .... whatever I do, LiveCode fails operating and crashes
after processing part of the data.

I tried other versions of 7. I need UTF-8 character encoding, so going to
6.x is not an option.

Nothing helps. It crashes and crashes.

Trying to understand when what is happening, I multiplied step by step
thousands and then millions of times a line of 50-100 commas and tried
replacing this list with semikolons using any of the methods available -
but it crashes.

Also going through it line by line, adding lines to another text variable,
or whatever I do, the same happens.

LiveCode 7 ff obviously runs into a memory problem.

Maybe there is a work-around I did not yet recognize?

I already have filed a bug report first seeing this behaviour with the
replacetext() function. But it happens whatever processing is done on such
largers text blocks.

Roland
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to