I am loading a media onto a media viewer and I am applying an InnerShadow with a radius of 60. Now I am playing the media and start scaling/shearing the media by 4x. I get a NullPointerException on the console and the media stops playing.
I reproduced it on WinXP, Vista with 6u10-b33 and JavaFX SDK b510 (Integration).
If the media is bigger, even 2x scaling is throwing the same exception.
Here is the stacktrace:
java.lang.NullPointerException
at com.sun.scenario.effect.Effect.ensureTransform(Effect.java:308)
at com.sun.scenario.effect.FilterEffect.filter(FilterEffect.java:94)
at com.sun.scenario.effect.Offset.filter(Offset.java:160)
at com.sun.scenario.effect.FilterEffect.filter(FilterEffect.java:87)
at com.sun.scenario.effect.DelegateEffect.filter(DelegateEffect.java:67)
at com.sun.scenario.effect.Effect.render(Effect.java:212)
at com.sun.scenario.scenegraph.SGEffect.render(SGEffect.java:137)
at com.sun.scenario.scenegraph.SGTransform.render(SGTransform.java:284)
at com.sun.scenario.scenegraph.SGWrapper.render(SGWrapper.java:122)
at com.sun.scenario.scenegraph.SGGroup.render(SGGroup.java:221)
at com.sun.scenario.scenegraph.SGGroup.render(SGGroup.java:221)
at com.sun.scenario.scenegraph.JSGPanel.paintComponent(JSGPanel.java:566)
at com.sun.javafx.scene.JSGPanelImpl.paintComponent(JSGPanelImpl.java:53)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at com.sun.scenario.scenegraph.JSGPanel.repaintDirtyRegions(JSGPanel.java:618)
at com.sun.scenario.scenegraph.JSGPanelRepainter.repaintAll(JSGPanelRepainter.java:106)
at com.sun.scenario.scenegraph.JSGPanelRepainter$FrameDisplay.run(JSGPanelRepainter.java:112)
at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:365)
at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:247)
at com.sun.embeddedswing.EmbeddedEventQueue.doPulse(EmbeddedEventQueue.java:469)
at com.sun.embeddedswing.EmbeddedEventQueue.access$000(EmbeddedEventQueue.java:72)
at com.sun.embeddedswing.EmbeddedEventQueue$2.run(EmbeddedEventQueue.java:376)
at java.awt.event.InvocationEvent.dispatch(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)
To reproduce the bug, do the following -
1. Save the attached test
2. create a folder 'media' in the same dir and save the media there
3. Run the test. Choose the media from the combo
4. Select InnerShadow radio button and adjust radius and offsets.
5. Now click Play.
6. Start scaling/shearing the media and you will get the exception
Sample media:
http://sqindia.india.sun.com/disk11/swing/vinay/javafx_media_ws_1.0/inputconfig/media/21.wmv
I reproduced it on WinXP, Vista with 6u10-b33 and JavaFX SDK b510 (Integration).
If the media is bigger, even 2x scaling is throwing the same exception.
Here is the stacktrace:
java.lang.NullPointerException
at com.sun.scenario.effect.Effect.ensureTransform(Effect.java:308)
at com.sun.scenario.effect.FilterEffect.filter(FilterEffect.java:94)
at com.sun.scenario.effect.Offset.filter(Offset.java:160)
at com.sun.scenario.effect.FilterEffect.filter(FilterEffect.java:87)
at com.sun.scenario.effect.DelegateEffect.filter(DelegateEffect.java:67)
at com.sun.scenario.effect.Effect.render(Effect.java:212)
at com.sun.scenario.scenegraph.SGEffect.render(SGEffect.java:137)
at com.sun.scenario.scenegraph.SGTransform.render(SGTransform.java:284)
at com.sun.scenario.scenegraph.SGWrapper.render(SGWrapper.java:122)
at com.sun.scenario.scenegraph.SGGroup.render(SGGroup.java:221)
at com.sun.scenario.scenegraph.SGGroup.render(SGGroup.java:221)
at com.sun.scenario.scenegraph.JSGPanel.paintComponent(JSGPanel.java:566)
at com.sun.javafx.scene.JSGPanelImpl.paintComponent(JSGPanelImpl.java:53)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at com.sun.scenario.scenegraph.JSGPanel.repaintDirtyRegions(JSGPanel.java:618)
at com.sun.scenario.scenegraph.JSGPanelRepainter.repaintAll(JSGPanelRepainter.java:106)
at com.sun.scenario.scenegraph.JSGPanelRepainter$FrameDisplay.run(JSGPanelRepainter.java:112)
at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:365)
at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:247)
at com.sun.embeddedswing.EmbeddedEventQueue.doPulse(EmbeddedEventQueue.java:469)
at com.sun.embeddedswing.EmbeddedEventQueue.access$000(EmbeddedEventQueue.java:72)
at com.sun.embeddedswing.EmbeddedEventQueue$2.run(EmbeddedEventQueue.java:376)
at java.awt.event.InvocationEvent.dispatch(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)
To reproduce the bug, do the following -
1. Save the attached test
2. create a folder 'media' in the same dir and save the media there
3. Run the test. Choose the media from the combo
4. Select InnerShadow radio button and adjust radius and offsets.
5. Now click Play.
6. Start scaling/shearing the media and you will get the exception
Sample media:
http://sqindia.india.sun.com/disk11/swing/vinay/javafx_media_ws_1.0/inputconfig/media/21.wmv
- duplicates
-
JDK-8106719 NullPointerException when filter effect needs an image that is too large
- Closed
- relates to
-
JDK-8105428 NPE when applying a large Shear on a rectangle of bigger size
- Closed