tracker issue : CF-3671567

select a category, or use search below
(searches all categories and all time range)
Title:

ColdFusion 10 Enterprise Patch 12 - URLEncodedFormat using recycled response

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): bobo beebop / bobo beebop (bobo beebop)

Created: 11/19/2013

Components: Core Runtime

Versions: 10.0

Failure Type: Crash

Found In Build/Fixed In Build: Final /

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 1

Problem Description: URLEncodedFormat does not work correctly in cfthread.  I get an error in application.log that "The response object has been recycled and is no longer associated with this facade."  This works correctly in ColdFusion 10 Developer Edition, but fails in ColdFusion 10 Enterprise Edition.

Steps to Reproduce: Run the following code:

<cfthread action="run" name="testThread">
  <cfset Sleep(10000)>
  <cfset foo = URLEncodedFormat('bar')>
</cfthread>

(pastebin here: http://pastebin.com/CHG8vhne)

Actual Result: The following error shows up in application.log after the 10 second sleep, and the thread fails to complete: "Error","cfthread-10","11/19/13","11:57:27",,"TESTTHREAD: The response object has been recycled and is no longer associated with this facade"

Expected Result: No error.

Any Workarounds: Manually do url encoding in cfthread.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3671567

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: avejidah
External Customer Email:  
External Test Config: My Hardware and Environment details: Windows Server 2012 Standard (not an available selection in the Platform drop down).  6GB memory, 2.7GHZ Zeon.

Attachments:

Comments:

Clear the component cache after changing the code.
Comment by External U.
13925 | November 19, 2013 02:56:27 PM GMT
Hi, We are not able to reproduce this problem.Can you please pass on any additional info? Thanks Viny (Comment added from ex-user id:vnigam)
Comment by Adobe D.
13926 | December 17, 2013 04:20:35 AM GMT
I'm not sure what other information to provide, but I'm more than happy to provide whatever you need. The above snippet of code causes the listed exception on our machine every time we run it. The same piece of code does not cause an exception on our development server (CF10 Dev Edition). Our production server is a vanilla CF10 Enterprise install, patch 12. We're running Mura CMS for what it's worth. Is there anything else I can provide that would help you to track down this issue?
Comment by External U.
13927 | December 17, 2013 11:12:51 AM GMT
Thanks for the info Will try this and get back to you (Comment added from ex-user id:vnigam)
Comment by Adobe D.
13928 | December 17, 2013 12:26:39 PM GMT
I encountered a similar problem in CF 10 Std. Removing the call the URLEncodedFormat() resolved the error I was getting. See my notes.
Vote by External U.
13933 | June 18, 2014 03:23:09 PM GMT
I am running both CF10 Dev and Std., and I encountered the same error when calling URLEncodedFormat() from inside a thread. After finding this bug, I removed the call to URLEncodedFormat() and the error went away.
Comment by External U.
13929 | June 18, 2014 03:25:12 PM GMT
Not reproducable at my end. Tried this one.. Let me know If I am missing something. HI <cfthread action="run" name="testThread"> <cfset Sleep(10000)> <cfset foo = URLEncodedFormat('bar')> <cfdump var="#foo#" output="console" > </cfthread>
Comment by Awdhesh K.
13930 | November 26, 2014 12:32:58 AM GMT
I wanted to add that I've run into this exact same issue today. In my local cfdev environment the above code works with no issues. However as soon as I upload it to my host I've found that urlENcodedFormat() as well as toBase64() will cause this exact error. It was found that on my web host I'm in a Sandbox. They had me enable sandbox on my dev machine and as soon as I did the errors started happening on my local dev environment as well. The only fix I've found to stop this is by replacing the toBase64() and urlEncodedFormat() methods with the following to make use of java methods: This is the replacement for toBase64(): var encoder = createObject("java","javax.xml.bind.DatatypeConverter"); var myKey = "testkey123"; var base64Key = encoder.printBase64Binary( myKey.getBytes("UTF-8") ); This is the replacement for urlEncodedFormat(): var encoder = createObject("java","java.net.URLEncoder"); var myKey = "testkey123"; var urlEncoded = encoder.encode(myKey);
Comment by External U.
13931 | June 24, 2015 01:48:26 PM GMT
I ran into this same issue and wanted to post my solution in case someone else happens along this page later. We stood up a new server and were required to enable the Sandbox which introduced this bug. Within my cfthread I was using this statement, which was causing the error: <cfset data = ToBinary(ToBase64(data))> I changed that line to this and it worked: <cfset data = charsetDecode( data, "utf-8" ) >
Comment by GEORGE A.
13932 | May 23, 2017 04:38:40 PM GMT