[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.albireo] Re: CTRL-C stack overflow

Never mind.  As it turns out, it was an ID-10-T error.

The original RCP application I built on top of had an accelerator set for
'ctrl+x' to shutdown the application.  This was never removed and sat around
for a year before I noticed it.

Sorry to waste anyone's time.

-James

"James Peltzer" <canadianguy@xxxxxxxxx> wrote in message
news:ft0qlu$f2o$1@xxxxxxxxxxxxxxxxxxxx
> Hey all,
> It's been a while.  I am still using my modified version of the original
> article code.  I was wondering if anyone has experienced problems with
> ctrl+x crashing the VM.  It seems to be unrelated to the ctrl+c problem I
> had before.
>
> Anyone?  Anyone?
>
> -James
>
>
> "James Peltzer" <canadianguy@xxxxxxxxx> wrote in message
> news:fej2em$2oi$1@xxxxxxxxxxxxxxxxxxxx
> > I have noticed an interesting problem when you are using a Swing editor.
> > In a text field in the editor, hit CTRL-C.  Open another editor.  Watch
> the
> > stack overflow errors pile up.
> >
> > Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
> >  at java.util.Arrays.mergeSort(Arrays.java:1270)
> >  at java.util.Arrays.sort(Arrays.java:1210)
> >  at java.util.Collections.sort(Collections.java:159)
> >  at
> >
>
javax.swing.SortingFocusTraversalPolicy.enumerateAndSortCycle(SortingFocusTr
> > aversalPolicy.java:119)
> >  at
> >
>
javax.swing.SortingFocusTraversalPolicy.getFirstComponent(SortingFocusTraver
> > salPolicy.java:434)
> >  at
> >
>
javax.swing.LayoutFocusTraversalPolicy.getFirstComponent(LayoutFocusTraversa
> > lPolicy.java:148)
> >  at
> >
>
javax.swing.DefaultFocusManager.getFirstComponent(DefaultFocusManager.java:9
> > 9)
> >  at
> >
>
javax.swing.LegacyGlueFocusTraversalPolicy.getFirstComponent(LegacyGlueFocus
> > TraversalPolicy.java:115)
> >  at
> >
>
javax.swing.LegacyGlueFocusTraversalPolicy.getDefaultComponent(LegacyGlueFoc
> > usTraversalPolicy.java:133)
> >  at
> >
>
javax.swing.SortingFocusTraversalPolicy.getFirstComponent(SortingFocusTraver
> > salPolicy.java:447)
> >  ...
> >
> > I was able to fix this by moving the focus policy from the frame down to
> the
> > JApplet.  I notice your article code says to 'consider' this in its
> > comments, is there any reason why you didn't do it?
> >
> > -James
> >
> > Modified code (inside addRootPaneContainer):
> >         ...
> >         JApplet applet = new JApplet();
> >
> >         // In JRE 1.4, the JApplet makes itself a focus cycle root. This
> >         // interferes with the focus handling installed on the parent
> frame,
> > so
> >         // change it back to a non-root here.
> >         // TODO: consider moving the focus policy from the Frame down to
> the
> > JApplet
> >
> >         EmbeddedChildFocusTraversalPolicy policy = new
> > EmbeddedChildFocusTraversalPolicy(awtHandler);
> >         applet.setFocusTraversalPolicy(policy);
> >         frame.add(applet);
> >
> >         return applet;
> >
> >
>
>