NullPointerException in palette [message #197697] |
Wed, 05 October 2005 05:39  |
Eclipse User |
|
|
|
Hi there,
I'm kind of stuck with a problem and I'm running out of ideas :(
A NullPointerException is thrown somewhere in the middle of a palette update
(?).
In FigureUtilities:
protected static void setFont(Font f) {
if (appliedFont == f || f.equals(appliedFont))
return;
getGC().setFont(f);
appliedFont = f;
metrics = null;
}
.... the passed Font is null - now I'm kind of confused how this can happen.
In ParagraphTextLayout.layout(), textFlow.getFont() (line 181) returns the
null that is passed all the way up to FigureUtilities and causes the
Exception.
Does anyone have an idea what I'm doing wrong? The DetailedLabeledFigure
alread has the null-Font entry, why is this happening only on certain
palette entries - they're all added and created the same way...
Any help is greatly appreciated!!
java.lang.NullPointerException
at org.eclipse.draw2d.FigureUtilities.setFont(FigureUtilities.j ava:369)
at
org.eclipse.draw2d.FigureUtilities.getFontMetrics(FigureUtil ities.java:58)
at
org.eclipse.draw2d.text.FlowUtilities.getAverageCharWidth(Fl owUtilities.java:66)
at
org.eclipse.draw2d.text.FlowUtilities.wrapFragmentInContext( FlowUtilities.java:189)
at
org.eclipse.draw2d.text.ParagraphTextLayout.layout(Paragraph TextLayout.java:181)
at
org.eclipse.draw2d.text.FlowFigureLayout.layout(FlowFigureLa yout.java:101)
at org.eclipse.draw2d.Figure.layout(Figure.java:1033)
at org.eclipse.draw2d.Figure.validate(Figure.java:1736)
at
org.eclipse.draw2d.text.FlowContainerLayout.layoutChildren(F lowContainerLayout.java:112)
at
org.eclipse.draw2d.text.FlowContainerLayout.layout(FlowConta inerLayout.java:98)
at
org.eclipse.draw2d.text.FlowFigureLayout.layout(FlowFigureLa yout.java:101)
at org.eclipse.draw2d.Figure.layout(Figure.java:1033)
at org.eclipse.draw2d.Figure.validate(Figure.java:1736)
at org.eclipse.draw2d.text.BlockFlow.validate(BlockFlow.java:30 0)
at org.eclipse.draw2d.text.FlowPage.validate(FlowPage.java:132)
at
org.eclipse.draw2d.DeferredUpdateManager.validateFigures(Def erredUpdateManager.java:271)
at
org.eclipse.draw2d.DeferredUpdateManager.performUpdate(Defer redUpdateManager.java:143)
at
org.eclipse.draw2d.LightweightSystem.controlResized(Lightwei ghtSystem.java:147)
at
org.eclipse.draw2d.LightweightSystem$1.controlResized(Lightw eightSystem.java:99)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:149)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1036)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1041)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:620)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:9 68)
at org.eclipse.swt.widgets.Canvas.setBounds(Canvas.java:239)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:482)
at
org.eclipse.gef.ui.palette.FlyoutPaletteComposite$PaletteCom posite.layout(FlyoutPaletteComposite.java:1000)
at
org.eclipse.gef.ui.palette.FlyoutPaletteComposite$10.handleE vent(FlyoutPaletteComposite.java:966)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1036)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1041)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:620)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:9 68)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:510)
at
org.eclipse.gef.ui.palette.FlyoutPaletteComposite.layoutComp onentsWest(FlyoutPaletteComposite.java:408)
at
org.eclipse.gef.ui.palette.FlyoutPaletteComposite.layout(Fly outPaletteComposite.java:356)
at
org.eclipse.gef.ui.palette.FlyoutPaletteComposite$22.handleE vent(FlyoutPaletteComposite.java:211)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1036)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1041)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:620)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:9 68)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:510)
at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:198 )
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.jav a:1143)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:9 71)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:482)
at org.eclipse.swt.custom.CTabFolderLayout.layout(CTabFolderLay out.java:78)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.jav a:1143)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:9 71)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:510)
at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:198 )
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.jav a:1143)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:9 71)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:510)
at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:198 )
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.jav a:1143)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:9 71)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:482)
at org.eclipse.ui.internal.LayoutPart.setBounds(LayoutPart.java :299)
at
org.eclipse.ui.internal.presentations.PresentablePart.setBou nds(PresentablePart.java:131)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.layoutContent(PresentablePartFolder.java:131)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.layout(PresentablePartFolder.java:418)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:289)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:387)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1131)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1084)
at
org.eclipse.ui.internal.WorkbenchPage.internalBringToTop(Wor kbenchPage.java:713)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage .java:551)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2334)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2258)
at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage .java:2250)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.ja va:2236)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2231)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2204)
Thanks a lot!!
Fabian
|
|
|
|
|
|
|
|
|
Re: NullPointerException in palette [message #197859 is a reply to message #197828] |
Wed, 05 October 2005 15:32  |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
The readme file for all maintenance releases contains the list of bugs fixed
in there. Similarly, you can just find out all bugs fixed in milestone
builds by just using appropriate bugzilla queries.
Every build page has a link to a build log at the top. Currently, it's
empty. We do plan to fix it so that the bugs fixed in that build would
actually be in there.
The figure was removed because its editpart was disposed. This may happen
when refreshing an editpart's children (as happens when you reload the
palette, for instance), deleting an editpart, etc.
For more information about the bug that you ran into, see:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=77941
"Fabian Wolf" <Fabian.Wolf@informatik.uni-ulm.de> wrote in message
news:di174o$ml6$1@news.eclipse.org...
> Hi Pratik,
>
> thanks a lot,... updating worked well!
> Are there any changelogs available for the different builds?
> Back to the previous post: How can the figure become "kicked off" its
figure
> hierarchy? That does sound more like I did something wrong... anything I
> have to look into?
>
> Regards,
> Fabian
>
> Pratik Shah wrote:
>
> > This has been fixed in 3.1.1 (and 3.2M2). Try a newer build. If a
> > figure's font returns null, it means the figure is not a part of the
> > figure hierarchy anymore.
> >
> > "Fabian Wolf" <Fabian.Wolf@informatik.uni-ulm.de> wrote in message
> > news:di070l$5c5$1@news.eclipse.org...
> >> Hi there,
> >>
> >> I'm kind of stuck with a problem and I'm running out of ideas :(
> >> A NullPointerException is thrown somewhere in the middle of a palette
> > update
> >> (?).
> >> ...
> >>
> >> ... the passed Font is null - now I'm kind of confused how this can
> > happen.
> >> In ParagraphTextLayout.layout(), textFlow.getFont() (line 181) returns
> >> the null that is passed all the way up to FigureUtilities and causes
the
> >> Exception.
> >> Does anyone have an idea what I'm doing wrong? The
DetailedLabeledFigure
> >> alread has the null-Font entry, why is this happening only on certain
> >> palette entries - they're all added and created the same way...
> >> ...
|
|
|
Powered by
FUDForum. Page generated in 0.03715 seconds