| || |
False concatenation of variables
Recently, I have been running into this problem: While it seems to be random, it does occur within the same script; a fairly complex script which calls hundreds of supporting functions and usually runs from 4 to 10 hours.
The problem relates to the setting or re-setting of variables. In some instances, it is as if SilkTest is not setting variables correctly or not freeing the memory for the current or prior variable. For instance: let's say, I am reading data from a .txt or .csv file and initializing the string variable named sString to "TEXT1". Then the next iteration reads the data file and should reset sString to "TEXT2" and so on. Let's say this works fine for 1000 iterations, then on the 1001st iteration the sString variable actually gets concatenated with the previous variable - something like this: sString is now "TEXTTEXT1001" instead of just "TEXT1001".
The data file from which it reads, seems fine. i.e. the string "TEXTTEXT1001" does not exist anywhere in the file, yet the script is attempting to use this falsely concatenated string and results in an error.
Before I log a call into support, has anyone else experienced this problem or have any resolutions? I am going to make a pseudo attempt at freeing the memory by resetting the variables to a null value after they are used. I will post if this is successful.
Re: False concatenation of variables
I have no solution for you, but want to encourage you to post once you have one. This is an intriguing problem you've run into.