Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CF 8 Dump Stack Overflow

New Here ,
Dec 14, 2007 Dec 14, 2007
The code below is a simplified version of production code we have running on a CF 7 server. We are migrating over to CF 8 and when it executes it produces a stack overflow.

Does anybody have any insight on why this is happening?

----------------------------------------------------------
<cfscript>
Q=QueryNew('c');
QueryAddRow(Q, 1);
QuerySetCell(Q,'c','A');
</cfscript>

<cfquery dbtype="query" name="qData" result="rData">select * from Q</cfquery>

<cfset StructInsert(rdata, "Q2", qData) >

<cfdump var="#rdata#" >
299
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Dec 14, 2007 Dec 14, 2007
Interesting that the error occurs with cfdump. Perhaps there is still some reference linkage between the rdata structure and qData. If you duplicate(rdata) first, then call StructInsert() the problem goes away.

...
<cfset rDataNew = duplicate(rData)>
<cfset StructInsert(rDataNew, "Q2", qData) >
<cfdump var="#rDataNew#" >
Translate
Valorous Hero ,
Dec 14, 2007 Dec 14, 2007
Interesting that the error occurs with cfdump. Perhaps there is still some reference linkage between the rdata structure and qData. If you duplicate(rdata) first, then call StructInsert() the problem goes away.

...
<cfset rDataNew = duplicate(rData)>
<cfset StructInsert(rDataNew, "Q2", qData) >
<cfdump var="#rDataNew#" >
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 14, 2007 Dec 14, 2007
LATEST
Thanks for the easier work around.

I found a even sloppier work around by running it thru wddx.
cfml2wddx --> wddx2cfml --> cfdump. brutal


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources