LC 7.03 ff Crashing on larger text blocks
alex at tweedly.net
Thu Mar 26 18:40:55 EDT 2015
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
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
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"
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
(b) can find a variant that will work
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.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode