Article View: borland.public.jbuilder.java.api
Article #3547Re: StackOverFlowError?
From: mattasu
Date: Mon, 01 Dec 1997 00:00
Date: Mon, 01 Dec 1997 00:00
40 lines
2041 bytes
2041 bytes
Rich Wilkman wrote: > > James: > > I see that you have already been down that mobieus path <g>. > > -Rich > > James Rudnicki wrote: > > > > >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 Thanks. I see the light. Dennis
Technical Details
Message-ID:
<34837CC0.1BD8@gte.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3477D230.C2031A40@gte.net> <65dtss$nb8@forums.borland.com> <347B04AE.BE2098A6@corp.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,9108025ac09af366 X-Google-Attributes: gid1089d0,public From: mattasu@gte.net Subject: Re: StackOverFlowError? Date: 1997/12/01 Message-ID: <34837CC0.1BD8@gte.net> X-Deja-AN: 294351790 References: <3477D230.C2031A40@gte.net> <65dtss$nb8@forums.borland.com> <347B04AE.BE2098A6@corp.borland.com> Organization: None Newsgroups: borland.public.jbuilder.java.api