Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

NPE in TooltipPainter (caused by concurrent event-handling / rendering)

16 views
Skip to first unread message

Mike Hogye

unread,
Dec 11, 2013, 6:30:25 PM12/11/13
to metsci-...@googlegroups.com
At a couple of places in TimePlotInfoImpl, we do setIcon(null). One or more of these can end up running on the event thread (which, with NEWT, is probably not the same as the rendering thread). If one of these setIcon() calls happens while the render thread is in the middle of TooltipPainter.paintTo(), you end up with:

Exception in thread "main-AWTAnimator" java.lang.NullPointerException
at com.metsci.glimpse.painter.info.TooltipPainter.paintTo(TooltipPainter.java:459)
at com.metsci.glimpse.painter.base.GlimpsePainterImpl.paintTo(GlimpsePainterImpl.java:104)
at com.metsci.glimpse.layout.GlimpseLayoutDelegate.paintTo(GlimpseLayoutDelegate.java:170)
at com.metsci.glimpse.layout.GlimpseLayout.paintTo(GlimpseLayout.java:449)
at com.metsci.glimpse.layout.GlimpseLayoutDelegate.paintTo(GlimpseLayoutDelegate.java:170)
at com.metsci.glimpse.layout.GlimpseLayout.paintTo(GlimpseLayout.java:449)
at com.metsci.glimpse.canvas.NewtSwingGlimpseCanvas$1.display(NewtSwingGlimpseCanvas.java:155)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:649)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:633)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:399)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1103)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:978)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:605)
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:75)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:416)
at com.jogamp.opengl.util.Animator$MainLoop.run(Animator.java:188)
at java.lang.Thread.run(Thread.java:724)

Geoffrey Ulman

unread,
Dec 16, 2013, 11:48:03 AM12/16/13
to metsci-...@googlegroups.com
This has been fixed in glimpse-prerelease in the jogl2.1.2 branch (really simple approach which just synchronizes all the painter's getter/setter methods and the paintTo method).
Reply all
Reply to author
Forward
0 new messages