Hi Roger,
i found the problem when selecting a row in a table, placed in a (hidden) tab.
If the selection involves an item not currently displayed in the table . I do
not use any secondary thread right now.
I m afraid that i can not come up with a simple test case. I encountered the
problem in one of our apps (ui is fully generated by a code-gen). The problem
is only present, when the size of the mainwindow is restricted (like
400x400px).
I attached a stack trace ...
Exception thrown during paint(): java.lang.NullPointerException
java.lang.NullPointerException
at
org.apache.pivot.wtk.skin.terra.TerraTableViewHeaderSkin.paint(TerraTableViewHeaderSkin.java:288)
at org.apache.pivot.wtk.Component.paint(Component.java:2092)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at org.apache.pivot.wtk.Container.paint(Container.java:414)
at
org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintDisplay(ApplicationContext.java:607)
at
org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintVolatileBuffered(ApplicationContext.java:565)
at
org.apache.pivot.wtk.ApplicationContext$DisplayHost.paint(ApplicationContext.java:443)
at org.apache.pivot.wtk.Display.repaint(Display.java:93)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Component.repaint(Component.java:2063)
at org.apache.pivot.wtk.Viewport.repaint(Viewport.java:174)
at
org.apache.pivot.wtk.skin.ScrollPaneSkin.scrollTopChanged(ScrollPaneSkin.java:1035)
at
org.apache.pivot.wtk.Viewport$ViewportListenerList.scrollTopChanged(Viewport.java:46)
at org.apache.pivot.wtk.Viewport.setScrollTop(Viewport.java:92)
at
org.apache.pivot.wtk.Component.scrollAreaToVisible(Component.java:1920)
at
org.apache.pivot.wtk.Component.scrollAreaToVisible(Component.java:1844)
at
org.apache.pivot.wtk.skin.terra.TerraTableViewSkin.layout(TerraTableViewSkin.java:301)
at org.apache.pivot.wtk.Component.layout(Component.java:1982)
at org.apache.pivot.wtk.Component.validate(Component.java:1973)
at org.apache.pivot.wtk.Container.layout(Container.java:348)
at org.apache.pivot.wtk.Component.validate(Component.java:1973)
at org.apache.pivot.wtk.Container.layout(Container.java:348)
at org.apache.pivot.wtk.Component.validate(Component.java:1973)
at org.apache.pivot.wtk.Container.layout(Container.java:348)
at org.apache.pivot.wtk.Component.validate(Component.java:1973)
at org.apache.pivot.wtk.Container.layout(Container.java:348)
at org.apache.pivot.wtk.Component.validate(Component.java:1973)
at org.apache.pivot.wtk.Container.layout(Container.java:348)
at org.apache.pivot.wtk.Component.validate(Component.java:1973)
at org.apache.pivot.wtk.Container.layout(Container.java:348)
at org.apache.pivot.wtk.Component.validate(Component.java:1973)
at org.apache.pivot.wtk.Container.layout(Container.java:348)
at org.apache.pivot.wtk.Component.validate(Component.java:1973)
at org.apache.pivot.wtk.Container.layout(Container.java:348)
at org.apache.pivot.wtk.Component.validate(Component.java:1973)
at org.apache.pivot.wtk.Container.layout(Container.java:348)
at org.apache.pivot.wtk.Component.validate(Component.java:1973)
at org.apache.pivot.wtk.Component.setVisible(Component.java:1592)
at org.apache.pivot.wtk.Container.setVisible(Container.java:339)
at
org.apache.pivot.wtk.skin.terra.TerraTabPaneSkin.selectedIndexChanged(TerraTabPaneSkin.java:1656)
at
org.apache.pivot.wtk.TabPane$TabPaneSelectionListenerList.selectedIndexChanged(TabPane.java:244)
at org.apache.pivot.wtk.TabPane.setSelectedIndex(TabPane.java:329)
at
org.apache.pivot.wtk.skin.terra.TerraTabPaneSkin$2.selectionChanged(TerraTabPaneSkin.java:576)
at
org.apache.pivot.wtk.ButtonGroup$ButtonGroupListenerList.selectionChanged(ButtonGroup.java:46)
at org.apache.pivot.wtk.ButtonGroup.setSelection(ButtonGroup.java:128)
at org.apache.pivot.wtk.Button.setState(Button.java:469)
at org.apache.pivot.wtk.Button.setSelected(Button.java:432)
at
org.apache.pivot.wtk.skin.terra.TerraTabPaneSkin$TabButton.press(TerraTabPaneSkin.java:128)
at
org.apache.pivot.wtk.skin.terra.TerraTabPaneSkin$TabButtonSkin.mouseClick(TerraTabPaneSkin.java:387)
at
org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseClick(Component.java:503)
at org.apache.pivot.wtk.Component.mouseClick(Component.java:2809)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:778)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at org.apache.pivot.wtk.Container.mouseUp(Container.java:763)
at
org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:957)
at java.awt.Component.processEvent(Unknown Source)
at
org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:752)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
-------- Original-Nachricht --------
> Datum: Mon, 14 May 2012 08:54:04 -0700
> Von: Roger Whitcomb <[email protected]>
> An: "[email protected]" <[email protected]>
> CC: "[email protected]" <[email protected]>
> Betreff: Re: Temporary Bugfix
> Hi Daniel,
> Welcome to Pivot from me too. I was wondering what your fail case
> was -- that is, what the sequence of events or Pivot API calls were
> made that led up to this exception? Also, perhaps if you could come
> up with a minimal test case that we could use to debug it?
> Also, were you by any chance updating any part of the GUI from a
> secondary thread? This kind of strikes me as something that could go
> wrong in such a scenario.
> Again, thanks for your interest and enthusiasm.
>
> ~Roger Whitcomb
>
> Sent from my iPhone
>
> On May 14, 2012, at 5:54 AM, "daniel stieger" <[email protected]>
> wrote:
>
> > Hello,
> >
> > i m using apache pivot as an erp frontend. Today, i got a
> > NullPointerException at TerraTableViewHeaderSkin (line 288 at
> > version 2.0.1).
> >
> > Obviously the class field "headerWidths" was null. I fixed that by
> > calling layout() if the field is null. It works, however it is only
> > a workaround solution.
> >
> > Maybe there is another way to fix that? Maybe for the next version
> > of apache pivot?
> >
> > Btw - great framework!
> >
> > Best,
> > Daniel
> >
> > --
> > NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
> > Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
> >
--
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a