🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #3604

Re: StackOverFlowError?

#3604
From: James Rudnicki
Date: Mon, 24 Nov 1997 00:00
26 lines
1774 bytes
>I get the error message  "StackOverFlowError" whenever I instantiate two
>frames in each other.  What I mean is, I've got two frames: frame1 and
>frame2.  I instantiate frame1 in frame2 and instantiate frame2 in
>frame1.  This causes the error.  For some reason, it only lets me
>instantiate one-way, but not both ways.


Ahh, the recursive stack death trick.  If you single step through the code
by hand, you will have great fun and quickly see what is going on: the
constructor for frame1 creates an instance of frame2 which creates an
instance of frame1 which in turn creates its own instance of frame2 which in
turn creates its own instance of frame1 which in turn creates its own
instance of frame2 which in turn creates its own instance of frame1 which in
turn creates its own instance of frame2 which in turn creates its own
instance of frame1 which in turn creates its own instance of frame2 which in
turn creates its own instance of frame1 which in turn creates its own
instance of frame2 which in turn creates its own instance of frame1 which in
turn creates its own instance of frame2 which in turn creates its own
instance of frame1 which in turn creates its own instance of frame2 which in
turn creates its own instance of frame1...

okay you get the idea.

bye,
Jim.rudnicki@best.com
Technical Details
Message-ID: <65dtss$nb8@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3477D230.C2031A40@gte.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,9108025ac09af366
X-Google-Attributes: gid1089d0,public
From: "James Rudnicki" <rudnicki@best.com>
Subject: Re: StackOverFlowError?
Date: 1997/11/24
Message-ID: <65dtss$nb8@forums.borland.com>
X-Deja-AN: 292457765
References: <3477D230.C2031A40@gte.net>
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Organization: None
Newsgroups: borland.public.jbuilder.java.api