Debug Panel Error on Railo 4.1

We started getting the following error today while working on our application. It goes away when we set coldbox.debugMode=false but when we change it back to true it reappears. This started happening after we restarted the Railo process. Does anyone have any idea what might be causing this? We don’t have any custom code interacting directly with the debugger code.

Railo 4.1.2.005 Error (expression)
Message No matching Method/Function for Number.getDebugPanelFlag() found
Stacktrace The Error Occurred in
/var/coldbox/system/Coldbox.cfc: line 365

363: <cfset cbController.getDebuggerService().recordProfiler()>
364: <!— Render DebugPanel —>
365: <cfif event.getDebugPanelFlag()>
366: <!— Render Debug Log —>
367: #interceptorService.processState(“beforeDebuggerPanel”)##cbController.getDebuggerService().renderDebugLog()##interceptorService.processState(“afterDebuggerPanel”)#

called from /vagrant/Application.cfc: line 30

Java Stacktrace No matching Method/Function for Number.getDebugPanelFlag() found
at railo.runtime.reflection.Reflector.throwCall(Reflector.java:887):887
at railo.runtime.reflection.Reflector.callMethod(Reflector.java:818):818
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:722):722
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1471):1471
at system.coldbox_cfc$cf.udfCall1(/var/coldbox/system/Coldbox.cfc:365):365
at system.coldbox_cfc$cf.udfCall(/var/coldbox/system/Coldbox.cfc):-1
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:95):95
at railo.runtime.type.UDFImpl._call(UDFImpl.java:308):308
at railo.runtime.type.UDFImpl.call(UDFImpl.java:212):212
at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:704):704
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:713):713
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1471):1471
at application_cfc$cf.udfCall(/vagrant/Application.cfc:30):30
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:95):95
at railo.runtime.type.UDFImpl._call(UDFImpl.java:308):308
at railo.runtime.type.UDFImpl.call(UDFImpl.java:212):212
at railo.runtime.ComponentImpl._call(ComponentImpl.java:588):588
at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1732):1732
at railo.runtime.listener.ModernAppListener.call(ModernAppListener.java:387):387
at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:113):113
at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18):18
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2135):2135
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2102):2102
at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:332):332
at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728):728
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305):305
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210):210
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51):51
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243):243
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210):210
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222):222
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123):123
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502):502
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171):171
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100):100
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118):118
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408):408
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041):1041
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603):603
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310):310
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source):-1
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-1
at java.lang.Thread.run(Unknown Source):-1

Timestamp 1/22/14 7:53:07 PM UTC

The error message “No matching Method/Function for Number.getDebugPanelFlag() found” is the key. It thinks the event object is a number!

Looking at the method, the event variable is defaulted to “0” at the top. Then, inside of a try/catch, it is set to the actual request context. Something is throwing an error, which is causing the try/catch to kick in. The problem is that the debugger code is AFTER the end of the try so it runs regardless of whether the code in the try was successful.

To get your code running, figure out what the actual error is by looking in your logs, or putting an abort before the debug stuff.

Regarding the bug, I entered this ticket: [COLDBOX-242] Debug mode can throw an error when request doesn't complete correctly. - Welcome

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com