Framestack - how to prevent to run into it?

368 views
Skip to first unread message

Benjamin

unread,
Jan 21, 2014, 2:46:14 PM1/21/14
to intersystems...@googlegroups.com
Hi,

any tips to prevent from running into a FRAMESTACK error?

Benjamin

Ben Irwin

unread,
Jan 21, 2014, 2:53:59 PM1/21/14
to intersystems...@googlegroups.com
Benjamin,

Is it a Framestack Overflow error.

DAiMor

unread,
Jan 21, 2014, 3:00:54 PM1/21/14
to intersystems...@googlegroups.com
Write good code. :)
You could use some utils for analize performance like ^PERFMON, ^%SYS.MONLBL.
And if you have already known where you catch a FRAMESTACK error, you could put debug code with analyze $STACK variable, and if your code get for example more than 50 steps, you must get stack trace like me 
s $ze="testframestack",t=$$LOG^%ETN(),$ze=""
And after that, you can see this stack in SMP System > System Logs > View Application Error Log


вторник, 21 января 2014 г., 23:46:14 UTC+4 пользователь Benjamin написал:

Ben Irwin

unread,
Jan 21, 2014, 3:52:27 PM1/21/14
to intersystems...@googlegroups.com
The number 1 reason for a FRAMESTACK OVERFLOW error is a misplaced "NEW" command in a loop.

Michae...@kp.org

unread,
Jan 21, 2014, 4:31:01 PM1/21/14
to intersystems...@googlegroups.com
Interesting difference:

%SYS>f  n

F  N
   ^
<MAXSCOPE>
%SYS>f  n x

F  N x
   ^
<FRAMESTACK>
%SYS>

Why, I wonder?

David Whitten

unread,
Jan 21, 2014, 4:44:39 PM1/21/14
to intersystems...@googlegroups.com
The <MAXSCOPE> error is talking about exceeding the maximum number of NEW-stack levels (each of which doesn't actually have any variables in it, since you said you wanted to hide all variables by not putting a name after the NEW command).

The <FRAMESTACK> error is talking about running out of space in the NEW -STACK levels (each of which hides only one variable - the one named lower-case-x )

David


--
--
Caché, Ensemble, DeepSee
 
---
You received this message because you are subscribed to the Google Groups "Caché, Ensemble, DeepSee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-publi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Anil Agarwal

unread,
Jan 21, 2014, 10:42:31 PM1/21/14
to intersystems...@googlegroups.com
You can also get framestack error if you are calling A() from B() and then again B() from A().
--
--
Thanks & Regards

David Whitten

unread,
Jan 22, 2014, 9:26:29 AM1/22/14
to intersystems...@googlegroups.com
I don't think you automatically get a <FRAMESTACK> when you have two mutually recursive routines. I think it only happens if the mutual recursion (or just plain recursion i.e. where A() calls A() ) uses up all the available storage for a stack.

David
713-870-3834
Reply all
Reply to author
Forward
0 new messages