strange thing with Rev cgi

jbv jbv.silences at club-internet.fr
Wed Nov 8 07:26:11 EST 2006


Hi list,

I have a Rev cgi script that builds javascript data (mostly large 2
dimensions
arrays : typically 200 rows & 500 cols), then replaces some keywords
with
these js data in a HTML template file before pushing the content to the
client
browser.

Today, I suddenly got a code 500 error when processing very large
amounts
of data. I found that the script crashed in the middle of successive
"replace"
instructions. So I inserted something like that :

    put "myTest.txt" into path
    delete file path
    open file path
    write myVar1 &cr&cr&cr& myVar2 &cr&cr&cr& myVar3 to file path
    close file path

to determine which replace instruction was crashing the script.

And to my great surprise, I discovered that inserting the above lines
actually
prevents the script from crashing !!!!

I thought that may be there was a memory problem, so I tried to put
    put "" into myVar1
right after each replace instruction. But the script continues to choke.

Even stranger : if write only 1 variable to the test file, the script
keeps
crashing... I need to write at least 3 variables to prevent it from
choking...

Does anyone have a rational explanation for that ?

Best,
JB




More information about the use-livecode mailing list