Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLBuffer released after resize #10

Open
dietzc opened this issue May 27, 2015 · 4 comments
Open

CLBuffer released after resize #10

dietzc opened this issue May 27, 2015 · 4 comments
Assignees

Comments

@dietzc
Copy link
Contributor

dietzc commented May 27, 2015

When resize and maximize the frame which contains ClearVolume I experience the following error in the KNIME integration:

DefaultEDT.run(): Caught exception occured on thread AWT-EventQueue-0-Display-.x11_:0.0-1-EDT-1: RunnableTask[executed true, tTotal 7 ms, tExec 6 ms, tQueue 1 ms, attachment null, throwable javax.media.opengl.GLException: Caught RuntimeException: This CLBuffer has been manually released and can't be used anymore ! on thread AWT-EventQueue-0-Display-.x11_:0.0-1-EDT-1]
javax.media.opengl.GLException: Caught RuntimeException: This CLBuffer has been manually released and can't be used anymore ! on thread AWT-EventQueue-0-Display-.x11_:0.0-1-EDT-1
    at javax.media.opengl.GLException.newGLException(GLException.java:75)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1311)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1131)
    at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:675)
    at jogamp.opengl.GLAutoDrawableBase.defaultWindowResizedOp(GLAutoDrawableBase.java:258)
    at com.jogamp.newt.opengl.GLWindow.access$200(GLWindow.java:119)
    at com.jogamp.newt.opengl.GLWindow$2.windowResized(GLWindow.java:141)
    at jogamp.newt.WindowImpl.consumeWindowEvent(WindowImpl.java:3674)
    at jogamp.newt.WindowImpl.sendWindowEvent(WindowImpl.java:3608)
    at jogamp.newt.WindowImpl.setVisibleActionImpl(WindowImpl.java:1001)
    at jogamp.newt.WindowImpl$VisibleAction.run(WindowImpl.java:1013)
    at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:434)
    at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:2125)
    at jogamp.newt.WindowImpl.setVisible(WindowImpl.java:1022)
    at jogamp.newt.WindowImpl.setVisible(WindowImpl.java:1027)
    at com.jogamp.newt.opengl.GLWindow.setVisible(GLWindow.java:494)
    at jogamp.newt.awt.event.AWTParentWindowAdapter$2.run(AWTParentWindowAdapter.java:179)
    at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:133)
    at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:371)
Caused by: java.lang.RuntimeException: This CLBuffer has been manually released and can't be used anymore !
    at com.nativelibs4java.opencl.CLAbstractEntity.checkNullity(CLAbstractEntity.java:130)
    at com.nativelibs4java.opencl.CLAbstractEntity.getEntity(CLAbstractEntity.java:134)
    at com.nativelibs4java.opencl.CLKernel.setArg(CLKernel.java:406)
    at com.nativelibs4java.opencl.CLKernel.setObjectArg(CLKernel.java:201)
    at com.nativelibs4java.opencl.CLKernel.setArgs(CLKernel.java:191)
    at clearvolume.renderer.opencl.OpenCLDevice.setArgs(OpenCLDevice.java:344)
    at clearvolume.renderer.opencl.OpenCLVolumeRenderer.runKernel(OpenCLVolumeRenderer.java:413)
    at clearvolume.renderer.opencl.OpenCLVolumeRenderer.updateBufferAndRunKernel(OpenCLVolumeRenderer.java:361)
    at clearvolume.renderer.opencl.OpenCLVolumeRenderer.renderVolume(OpenCLVolumeRenderer.java:256)
    at clearvolume.renderer.cleargl.ClearGLVolumeRenderer.displayInternal(ClearGLVolumeRenderer.java:731)
    at clearvolume.renderer.cleargl.ClearGLVolumeRenderer.display(ClearGLVolumeRenderer.java:667)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:690)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:672)
    at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:441)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1277)
    ... 17 more

@royerloic
Copy link
Member

I think I know why this is happening, I guess it happens rarely right?
I need to add some locking to prevent stale buffers from being used before
the new ones are allocated. I am on it.

@fjug
Copy link
Member

fjug commented May 27, 2015

Christian, could you say a few words more on when the error occurs and how persistent this happens?

@dietzc
Copy link
Contributor Author

dietzc commented May 27, 2015

as I said, whenever I make the frame containing ClearVolume full-screen and afterwards "non-fullscreen" again, the error occurs.

@royerloic
Copy link
Member

Ok, got it :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants