Copy link to clipboard
Copied
Code worked fine on fully patched 9.0.1. Breaks only after installation of CHF3. The entirety of the breaking code:
<cffunction name="myFxn">
<cfargument name="aCFC">
<cfreturn CreateObject("component", "a_relative_path." & aCFC)>
</cffunction>
Copy link to clipboard
Copied
Update: problem is the CFC being instantiated, not that innocuous little function above. Still trying to figure out what within the CFC is the problem.
Copy link to clipboard
Copied
Wow, and, the news couldn't possibly be worse. This is an obvious compiler flaw. There seems to be a new hard limit on the length of cfscript blocks. Looks like they can't be more than 45 lines long. Here's a video demonstrating the problem in action. http://screencast.com/t/E1gqKDjc
After finally diagnosing the flaw, I went to work on rewriting the affected code, but practically nothing I change makes this go away. I've got it throwing the jsr[168] error on just 2 lines of a = 1 alone in a cfscript block, which pretty clearly means I was wrong that it's the length of the cfscript that's the problem. It doesn't seem to be the length of the function either, since it works on some longer (incomplete) versions and fails on some shorter (incomplete) versions. I'm somewhat at a loss as to what the actual cause of the problem is, since no matter how I rewrite the affected code it keeps running into this error.
To be clear, this is still a compile-time error (the code in question is not even called on the demonstration page) with code that worked fine prior to CHF3.
Copy link to clipboard
Copied
Eventually the only way to get the code to run again as it did before CHF3 was to remove all cfscript blocks and write it as a big ugly pile of cfifs and cfsets.
Copy link to clipboard
Copied
Hi,
It shouldn't be the length of cfscript. Did you check the error in ColdFusion logs?
Regards,
Anit Kumar
Copy link to clipboard
Copied
Anit_Kumar: The error is
Copy link to clipboard
Copied
Did you also update your JVM to be Java 7?
--
Adam
Copy link to clipboard
Copied
Adam Cameron:
I didn't, it's still on 6.
Copy link to clipboard
Copied
Adam Cameron:
I didn't, it's still on 6.
Hmmm. OK, well it's good info for Adobe to know. Did you put that on the bugbase ticket you raised too?
--
Adam
Copy link to clipboard
Copied
@fedsol. We have not been able to reproduce the issue on CF901 with the supplied code, with or without CHF3 applied. Can you confirm the update jars you had in the following location prior to applying CHF3:
<cf_home>\WEB-INF\cfusion\lib\updates directory ...in case you are on a multiserver CF installation.
<cf_home>\lib\updates ... in case you are on a stand-alone CF installation.
We would be very interested in hearing from anyone else facing this issue.
Copy link to clipboard
Copied
I have verified this now on two physically different servers (not virtual machines, actual physical servers in physically different locations) running 9.0.1 CHF3. One of the servers is Win2K3, the other is Win2K8. Both are using Java 6 and are standalone installs, and both have only chf9010003.jar in lib/updates. I have also confirmed via a 3rd completely different server that this error does not occur on a fully-patched 9.0.1 standalone install without CHF3.
I've also found that I need to stop guessing about what the cause is, because it's clearly something internal that I know nothing about. It's not a file size limitation, and it's nearly merely a "this many lines" or "this many executable lines". I've been trying to find the minimum necessary to cause the compiler to die. I'll paste in here as far as I've gotten, because I do I have other work I need to get done, but I think someone who took the time could find a smaller, more elegant demonstration of the problem. There's something special about the code previously posted in the bugbase that triggers the compiler to die, but it's not sufficient by itself to cause the compiler to die. You also need... a seemingly random amount of additional empty code? I've tried various combinations of functions and a = 1s. Adding more functions means fewer a = 1s are required.
Simply load the CFC with <cfset CreateObject("component", "Test")> (Don't actually even need to assign it to anything, simply causing ColdFusion to look at it is enough.)
<cfcomponent>
<cffunction name="anUncalledFunction">
<cfloop query="q">
<cfscript>
if (a GT b) {
if (c Is d) {
if (!Len(e)) {
e = "L";
f++;
} else {
if (e Is "L")
f++;
}
} else {
if (!Len(e)) {
e = "W";
f++;
} else {
if (e Is "W")
f++;
else {
g = true;
break;
}
}
}
} else {
if (c Is d) {
if (!Len(e)) {
e = "W";
f++;
} else {
if (e Is "W")
f++;
else {
g = true;
break;
}
}
} else {
if (!Len(e)) {
e = "L";
f++;
} else {
if (e Is "L")
f++;
else {
g = true;
break;
}
}
}
}
</cfscript>
</cfloop>
</cffunction>
<cffunction name="doesNothingButIsNecessary1">
<cfscript>
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
</cfscript>
</cffunction>
<cffunction name="doesNothingButIsNecessary2">
<cfscript>
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
a = 1;
</cfscript>
</cffunction>
<cffunction name="doesNothingButIsNecessary3">
<cfset a = 1>
</cffunction>
</cfcomponent>