This morning, I was doing some local ColdFusion development as I am normally; and, everything was working fine until I suddenly started getting this ColdFusion JRUN error:
java.lang.StackOverflowError at coldfusion.compiler.ExprAssembler.assembleExpr(ExprAssembler.java:144) at coldfusion.compiler.ExprAssembler.cast(ExprAssembler.java:1108) at coldfusion.compiler.StmtAssembler.cast(StmtAssembler.java:362) at coldfusion.compiler.ExprAssembler.assembleExpr(ExprAssembler.java:163) at coldfusion.compiler.ExprAssembler.assembleExpr(ExprAssembler.java:321) at coldfusion.compiler.ExprAssembler.cast(ExprAssembler.java:1108) at coldfusion.compiler.StmtAssembler.cast(StmtAssembler.java:362) at
I was in the middle of making a few updates across various files so, I just assumed that I must have changed something that created a weird memory leak. After commenting out a whole lot of code, I finally narrowed down the cause of the problem to an enormous, compound CFIF statement. This particular CFIF statement had well over 200 conditionals (don't ask), so I could maybe see that it was taking a bunch of memory; but, not only did I not believe that it was killing all of the RAM, it wasn't even part of the code that I was updating.
Starting to suspect that my code was not the culprit at all, I took a look at the Activity Monitor. There, I found out that JRUN was only using about 120MB or RAM. That might sound like a lot, but this sexy beast typically muscles ahead at close to 600MB of RAM. For one reason or another this computer decided to knock JRUN's legs out from under it?
Anyway, I restarted the JRUN server and the RAM went back up to about 570MB. The random stack overflow error was gone. I have no idea what caused it; but, I'm throwing it out there in case anyone else runs into the same thing.