Sg2.9
Running a script multiple tim...
Recent RSS
Running a script multiple times -> strange behavior (Mac CS4)
From:  szx
Date:  23. December 2010, 02:48

Bug replicated with this script from the first tutorial:

var myPath = new Path();
myPath.add(new Point(0, 0));
myPath.add(new Point(100, 100));

Run it about 10 times and the canvas get corrupted (see attachment to see what I mean). All subsequent operations are affected, until the file is closed.

Re: Running a script multiple times -> strange behavior (Mac CS4)
From:  Jürg Lehni
Date:  25. December 2010, 14:48

I cannot reproduce this at my end. Does this happen straight away upon starting Illustrator? Are you running the latest version?

Re: Running a script multiple times -> strange behavior (Mac CS4
Date:  26. December 2010, 16:14

I have also noted this occurence.

I was fiddling around with some code although can't remember exactly what I was trying to achieve.
I first noticed that the entire artboard changed properties and every time I ran the code the same as pictured above happened until the artboard dissapeared entirely.

I'm running the latest version of Scriptographer on a Mac with CS4.

Re: Running a script multiple times -> strange behavior (Mac CS4
From:  Jürg Lehni
Date:  26. December 2010, 16:26

Sounds very odd! Could you describe the steps needed to reproduce this?

Re: Running a script multiple times -> strange behavior (Mac CS4
Date:  26. December 2010, 17:10

I will try to find the code I used to make this happen. Not so sure I have it, though.
If I find it, and if I am abel to recreate this occurence, I will post it and the steps here.

Re: Running a script multiple times -> strange behavior (Mac CS4
Date:  29. December 2010, 02:12

Hi,

I have not found my original code but I have, however, noticed that this happens on every script I run. At least the ones I am currently writing.

It corrupts the artboard in some way. After a few runs the artboard seems to shrink somehow and the coordinates gets all messed up. Finally the artboard disappears entirely.
I have to close the document and open a new one to reset it.

Seems that it mostly happens after SG encounters an error, one such as this:

Error: Invalid coordinates: [[NaN, 0, NaN], [0, NaN, NaN]]
at Scriptographer Scripts/Testfile.js:100
at Scriptographer Scripts/Testfile.js:21

I am now running the latest version of SG on CS4 and did not have this problem on the previous version.

Setup:
MacBook 2.16 GHz Intel Core 2 Duo
2 GB 667 MHz DDR2 SDRAM

OS X 10.5.8

AI CS4

SG 2.9.070

Java 1.5.0_26

New points and artboard corrupted.
Should look like this.
Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Themed colours 06.08.12