|
Re: NullPointerException in palette [message #197732 is a reply to message #197697] |
Wed, 05 October 2005 14:27 |
Eclipse User |
|
|
|
Originally posted by: mvsteenbergen.eljakim.scratch-this.nl
Are you by any chance using a MPE with several GraphicalEditors? :)
I have the same problem, but only when my MPE contains more than one
GraphicalEditor (it contains an arbitrary number of GraphicalEditors,
depending on the contents of the input file). I have no idea yet what's
causing this, but I thought I'd add this; maybe it helps.
Regards,
Martijn.
Fabian Wolf wrote:
> 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
> (?).
|
|
|
|
Re: NullPointerException in palette [message #197778 is a reply to message #197732] |
Wed, 05 October 2005 16:07 |
Eclipse User |
|
|
|
Originally posted by: mvsteenbergen.eljakim.scratch-this.nl
Here's the stack trace.
org.eclipse.swt.SWTException: Failed to execute runnable
(java.lang.NullPointerException)
(...)
Caused by: java.lang.NullPointerException
at org.eclipse.draw2d.FigureUtilities.setFont(FigureUtilities.j ava:369)
at
org.eclipse.draw2d.FigureUtilities.getStringDimension(Figure Utilities.java:112)
at
org.eclipse.draw2d.text.FlowUtilities.measureString(FlowUtil ities.java:140)
at
org.eclipse.draw2d.text.FlowUtilities.wrapFragmentInContext( FlowUtilities.java:237)
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.DeferredUpdateManager$UpdateRequest.run(D eferredUpdateManager.java:40)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
... 18 more
M.
|
|
|
Re: NullPointerException in palette [message #197786 is a reply to message #197770] |
Wed, 05 October 2005 16:22 |
Eclipse User |
|
|
|
Originally posted by: mvsteenbergen.eljakim.scratch-this.nl
You're right; if I create an empty PaletteRoot instead of my usual
palette filled with tools, the error doesn't occur. I can create drawers
and groups, but as soon as I fill a drawer or group with an entry
(PanningSelectionToolEntry, CombinedTemplateCreationEntry, it doesn't
seem to matter) *and* open more than two GraphicalEditors in one MPE,
the NPE is thrown.
Regards,
Martijn.
Fabian Wolf wrote:
> Uh, yes I am using a MPE with several GraphicalEditors,...
> There was no problem however until recently I added a new entry to the
> palette which is no different than any other palette entry - this is what
> puzzles me. It happens somewhere in DetailedLabelFigure that the Font is
> not set or somehow set to null?!?
|
|
|
Re: NullPointerException in palette [message #197797 is a reply to message #197697] |
Wed, 05 October 2005 17:34 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
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
> (?).
> 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.ja
va: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 lowContainerLayo
ut.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 erredUpdateManag
er.java:271)
> at
>
org.eclipse.draw2d.DeferredUpdateManager.performUpdate(Defer redUpdateManager
..java:143)
> at
>
org.eclipse.draw2d.LightweightSystem.controlResized(Lightwei ghtSystem.java:1
47)
> 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(Fl
youtPaletteComposite.java:1000)
> at
>
org.eclipse.gef.ui.palette.FlyoutPaletteComposite$10.handleE vent(FlyoutPalet
teComposite.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(Flyou
tPaletteComposite.java:408)
> at
>
org.eclipse.gef.ui.palette.FlyoutPaletteComposite.layout(Fly outPaletteCompos
ite.java:356)
> at
>
org.eclipse.gef.ui.palette.FlyoutPaletteComposite$22.handleE vent(FlyoutPalet
teComposite.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(PresentableP
art.java:131)
> at
>
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.layoutConte
nt(PresentablePartFolder.java:131)
> at
>
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.layout(Pres
entablePartFolder.java:418)
> at
>
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(Pres
entablePartFolder.java:289)
> at
>
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftTo
RightTabOrder.java:65)
> at
>
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPar
t(TabbedStackPresentation.java:387)
> at
>
org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.jav
a: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.ja
va: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 19: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.03592 seconds