0
New Here
,
/t5/coldfusion-discussions/cf-8-dump-stack-overflow/td-p/492103
Dec 14, 2007
Dec 14, 2007
Copy link to clipboard
Copied
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#" >
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#" >
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
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#" >
...
<cfset rDataNew = duplicate(rData)>
<cfset StructInsert(rDataNew, "Q2", qData) >
<cfdump var="#rDataNew#" >
Valorous Hero
,
/t5/coldfusion-discussions/cf-8-dump-stack-overflow/m-p/492104#M44701
Dec 14, 2007
Dec 14, 2007
Copy link to clipboard
Copied
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#" >
...
<cfset rDataNew = duplicate(rData)>
<cfset StructInsert(rDataNew, "Q2", qData) >
<cfdump var="#rDataNew#" >
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
dash13cbg13
AUTHOR
New Here
,
LATEST
/t5/coldfusion-discussions/cf-8-dump-stack-overflow/m-p/492105#M44702
Dec 14, 2007
Dec 14, 2007
Copy link to clipboard
Copied
Thanks for the easier work around.
I found a even sloppier work around by running it thru wddx.
cfml2wddx --> wddx2cfml --> cfdump. brutal
I found a even sloppier work around by running it thru wddx.
cfml2wddx --> wddx2cfml --> cfdump. brutal
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

