Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

ESTK string bug [CS5, CS5.5]

$
0
0

Hi all,

 

Consider this JavaScript:

 

var s = String.fromCharCode(65, 66, 67, 68, 69); 
$.writeln("string len=" + s.length);for (var i=0; i < s.length; i++) {  $.writeln("#" + i + " = " + s.charCodeAt(i));}

 

When run, this produces this output in the JavaScript console:

string len=5
#0 = 65
#1 = 66
#2 = 67
#3 = 68
#4 = 69

 

However, if I change one of the character codes to zero, so for example:

 

var s = String.fromCharCode(65, 66, 0, 68, 69)

 

Then the script runs once. After running, ESTK is locked up. I can mouse around and select menus, etc., but the menus don't do anything. Everything is frozen and I have to either quit or sometimes force-quit ESTK.

 

This happens to me on Windows 7 with ESTK 3.5.1.59 (CS5) and on Mac 10.6.6 with ESTK 3.6.0.2 (CS5.5).

 

I get the fact that odd things might happen to a string containing a null byte, but I would expect in the worst case to have the string output terminate prematurely, not have the whole IDE hang.

 

Is this something that's been noticed before (sorry if it has, forum searching is a big wonky these days)? Is there anything I can do about it?

 

Thanks in advance for suggestions.

 

-Chuck


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>