tracker issue : CF-3774074

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

Mixed-in functions cannot access SUPER "scope" on first hit to a function

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 06/11/2014

Components: Language, Functions

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final / 12.0

Priority/Frequency: Normal / Few users will encounter

Locale/System: ALL / Platforms All

Vote Count: 4

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on August 25, 2019 using build 2016.0.01.298513
See for code

Basically if an object has a runtime mixin function, that function cannot access the object's SUPER "scope" on the first request after starting the CF instance. Subsequent calls work fine.

I'll be writing this up in my blog more thoroughly later, but I need the ticket reference for this ticket so I can finish the code.

This occurs on all versions of CF 9-11. And, FYI, not on Railo. IE: Railo works fine.


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

Watson Bug ID:	3774074

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:



More detailed troubleshooting here: -- Adam
Comment by External U.
11945 | June 11, 2014 08:00:47 AM GMT
+1 - this issue still exists in CF11 Update 3 (11,0,03,292024(PreRelease))
Vote by External U.
11967 | November 16, 2014 01:31:05 AM GMT
fix to be released in a future CF 11 udpate.
Comment by Piyush K.
11946 | January 16, 2015 06:05:01 AM GMT
Cheers Piyush. You sound a bit vague... do you mean "update 4" (which'd be the next one) or just "some update in the future, but dunno when / which"?
Comment by External U.
11947 | January 16, 2015 06:07:15 AM GMT
Oh, and what about ColdFusion 10? 10 is still under general support, and this bug affects that too. So ought to be fixed in 10 too.
Comment by External U.
11948 | January 16, 2015 06:08:07 AM GMT
The fix for this bug is available in the pre-release build of ColdFusion 11 Update 5
Comment by CFwatson U.
11949 | February 20, 2015 09:26:19 AM GMT
Confirmed fixed, cheers.
Comment by External U.
11950 | February 21, 2015 08:02:50 PM GMT
Current fix leads to regression in CFC inheritance where creating CFC instance in certain cases goes in infinite loop. Marking this bug as unfixed. (Comment added from ex-user id:sandeepp)
Comment by Adobe D.
11951 | April 13, 2015 02:13:41 AM GMT
As a note to others, I filed a bug here ( which presumably is the regression that Sandeep is referring to. On further testing, it appears that the bug is not limited to just application.cfc, but affects inheritance in general when the super keyword is used to invoke a base class's functions.
Comment by External U.
11952 | April 13, 2015 09:56:02 AM GMT
Dennis, are you saying Adobe have basically broken "super"????
Comment by External U.
11953 | April 13, 2015 09:58:33 AM GMT
Adam, see the attachment in the bug I posted for a repro case, but from what I can tell: It breaks if component A extends component B, and component B extends component C. If a function is defined on components B and C (but not explicitly defined on A), and the implementation in B includes a super call to C, then it appears that the super call will instead invoke B's implementation (which is an infinite loop). As in this issue, it only happens the first time after starting the CF instance. /shrug
Comment by External U.
11954 | April 13, 2015 10:03:29 AM GMT
OK, so a bit edge-casey then. I was wondering how it got through QA.
Comment by External U.
11955 | April 13, 2015 10:11:37 AM GMT
This is the latest issue blocking a long-overdue CF upgrade for my team.
Vote by External U.
11968 | April 13, 2015 12:23:08 PM GMT
I'm not convinced this is "edge-casey." As I see it, the issue Dennis posted shows that any inheritance beyond a single level has a high risk of being affected. Adobe team: did the initial fix to this bug (with the regression that Sandeep and Dennis mentioned) make it into the final release of CF11 Update 5? Or was it pulled pending a subsequent fix?
Comment by External U.
11956 | April 14, 2015 01:55:31 PM GMT
Well I said *a bit*. It initially sounded like SUPER was now completely shafted. I think two levels of inheritance (already suggests the model might not be cool) and specifically (not ~) implemented methods in that hierarchy is not "main stream" in my opinion. Obviously everyone has one of those, and has something else as well, as goes the addage. -- Adam
Comment by External U.
11957 | April 14, 2015 02:39:34 PM GMT
Paul: stop saying that! ;-)
Comment by External U.
11958 | April 14, 2015 03:02:33 PM GMT
Uh-oh... I have no idea how my post appeared 4x. Sorry about that! Is there a bug tracker for the bug tracker? :-) Anyway, I'll agree that it's less common to see two levels of inheritance than one. But if you're going to claim support of arbitrary levels of inheritance (and I'm unaware of any claims from Adobe that only one level is expected to work), then this is a pretty serious bug.
Comment by External U.
11959 | April 14, 2015 03:45:21 PM GMT
+1 -- this worked in prior versions of CF and should be supported!
Vote by External U.
11969 | April 14, 2015 05:03:15 PM GMT
I just found the answer to my own question. This bug is NOT listed in the release notes for Update 5, so it looks like the initial fix must have been pulled. Guess we're waiting for Update 6 now...
Comment by External U.
11960 | April 15, 2015 08:18:48 AM GMT
Paul, just to reaffirm, the initial fix was pulled from Update 5.
Comment by Piyush K.
11961 | April 17, 2015 01:20:05 AM GMT
Piyesh, can you pls correct the ticket then? It says "Fixed In Build CF11 Update5"
Comment by External U.
11962 | June 23, 2015 06:11:07 AM GMT
I see "Fixed In Build CF11 Update5" has changed to "Fixed In Build 12.0". But.. this ticket was filed for CF11 so shouldn't it be fixed in CF11? Thanks!, -Aaron
Comment by External U.
11963 | November 20, 2015 05:42:55 AM GMT
We started having this exact issue from update 11.. Also does the fixed in build 12 mean that this will be fixed in update 12? (as I mentioned... update 11 appears to break stuff for us)
Comment by Jeroen v.
11964 | April 05, 2017 01:17:50 PM GMT
Update 11 appears to create this exact problem for us.
Vote by Jeroen v.
11970 | April 05, 2017 01:18:39 PM GMT
Jeroen, This bug was fixed with the update 11 of CF11 and with CF2016. You should be able to observe the issue with all prior updates and releases. So, when you say "Update 11 appears to create this exact problem for us", do you mean that you were not running into this bug with CF10 update 10 and before, and it has cropped up after you have applied the update11? If that is the case, would it be possible for you to share the test script with which you can observe the issue, the output you are expecting and the output that you are actually getting? On a related note, you might want to clear the template/components cache from the CF Admin or alternatively delete the classes at <cf_root>\cfusion\wwwroot\WEB-INF\cfclasses directory before running your test script.
Comment by Piyush K.
11965 | April 07, 2017 06:45:02 AM GMT
Dear Piyush, We have tested by clearing \cfusion\wwwroot\WEB-INF\cfclasses, the issue still persists and is exactly as described above. This started on Cf11 update 11 (we have tested update 8, 9 & 10). Currently all our applications on Cf11.11 have this behaviour, only upon application startup. Other application on previous versions do not have this behaviour. We can consistently demonstrate this behaviour by deploying and calling a test script. Within function `OnBeforeSave` we conditionally call `super.OnBeforeSave()` : <!--- Bubble event up the chain ---> <cfif structKeyExists(super,"OnBeforeSave")> <cfset super.OnBeforeSave() /> </cfif> Unfortunately at this time we cannot free up the resources to isolate this into a test application. Can you work with this information?
Comment by Robert S.
11966 | April 11, 2017 10:06:57 AM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Thanks!, -Aaron
Comment by Aaron N.
31202 | August 25, 2019 07:48:36 AM GMT