Variables get corrupted with read from text file

Got a problem you cannot solve? Try here.
Post Reply
PaavoN
Posts: 29
Joined: Mon Apr 20, 2009 4:45 pm

Variables get corrupted with read from text file

Post by PaavoN »

Hi

I have a quite large project with tens or hundreds of variables defined. When creating the database,
I use 'Read from text file' to read a SQL script into a variable and do some replacements there
before serving it to MS SQL plugin.

Now when one of the SQL script files has grown over 1.6Mb and I read the file (using #READALL) into
a variable, few of my previously defined variables get corrupted. Is there a memory leak or what
could be causing this behaviour ? Or isn't that command meant to be used with such a big files ...

I solved the problem temporarily by splitting the file into a smaller pieces, but this problem will
come back some day and it might not be noticed until some weird problems when our customer
is installing our product.

We are using version 9 R2 sp2 and the problems has occurred on various platforms.

Paavo Nieminen
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Variables get corrupted with read from text file

Post by mills »

What do you mean that your variables get corrupted?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
PaavoN
Posts: 29
Joined: Mon Apr 20, 2009 4:45 pm

Re: Variables get corrupted with read from text file

Post by PaavoN »

I mean that the variable's value get lost. After reading a large script when
I write the variable to a log file I get e.g HTTPPORT =$HTTPPORT$

This happens for some of the variables but not all which makes me think of memory leak ...

PaavoN
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Variables get corrupted with read from text file

Post by mills »

Is the 1.6MB the most recognizable threshold you've found?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
PaavoN
Posts: 29
Joined: Mon Apr 20, 2009 4:45 pm

Re: Variables get corrupted with read from text file

Post by PaavoN »

Threshold was actually somewhere between 1300Kb and 1400Kb.

PaavoN
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Variables get corrupted with read from text file

Post by mills »

I'll have to do some testing around this. It's on my list and should get some attention some time next week if I don't get to it tomorrow.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Post Reply