Error after CLIJx-assistant crashing

hello!

i was trying out the new clijx-assistant (which is a game changer btw) and after crashing once while trying to do a background subtraction, i can’t open it and always get this error on console:

Exception in thread "Run$_AWT-EventQueue-0" net.haesleinhuepf.clij.clearcl.exceptions.OpenCLException: OpenCL error: -4 -> CL_MEM_OBJECT_ALLOCATION_FAILURE
	at net.haesleinhuepf.clij.clearcl.backend.BackendUtils.checkOpenCLErrorCode(BackendUtils.java:352)
	at net.haesleinhuepf.clij.clearcl.backend.jocl.ClearCLBackendJOCL.lambda$getBufferPeerPointer$14(ClearCLBackendJOCL.java:354)
	at net.haesleinhuepf.clij.clearcl.backend.BackendUtils.checkExceptions(BackendUtils.java:156)
	at net.haesleinhuepf.clij.clearcl.backend.jocl.ClearCLBackendJOCL.getBufferPeerPointer(ClearCLBackendJOCL.java:331)
	at net.haesleinhuepf.clij.clearcl.ClearCLContext.createBuffer(ClearCLContext.java:295)
	at net.haesleinhuepf.clij.CLIJ.createCLBuffer(CLIJ.java:347)
	at net.haesleinhuepf.clij.converters.implementations.ImagePlusToClearCLBufferConverter.convert(ImagePlusToClearCLBufferConverter.java:132)
	at net.haesleinhuepf.clij.converters.implementations.ImagePlusToClearCLBufferConverter.convert(ImagePlusToClearCLBufferConverter.java:24)
	at net.haesleinhuepf.clij.CLIJ.convert(CLIJ.java:475)
	at net.haesleinhuepf.clij.CLIJ.push(CLIJ.java:406)
	at net.haesleinhuepf.clij.CLIJ.pushCurrentZStack(CLIJ.java:504)
	at net.haesleinhuepf.clij2.CLIJ2.pushCurrentZStack(CLIJ2.java:101)
	at net.haesleinhuepf.spimcat.io.CLIJxVirtualStack.imagePlusToBuffer(CLIJxVirtualStack.java:137)
	at net.haesleinhuepf.clijx.assistant.AssistantGUIStartingPoint.refresh(AssistantGUIStartingPoint.java:84)
	at net.haesleinhuepf.clijx.assistant.AssistantGUIStartingPoint.run(AssistantGUIStartingPoint.java:57)
	at net.haesleinhuepf.clijx.assistant.utilities.AssistantStartingPointTool$1.eventOccurred(AssistantStartingPointTool.java:24)
	at ij.IJ.notifyEventListeners(IJ.java:2444)
	at ij.gui.Toolbar.setTool2(Toolbar.java:840)
	at ij.gui.Toolbar.mousePressed(Toolbar.java:1070)
	at java.awt.Component.processMouseEvent(Component.java:6536)
	at java.awt.Component.processEvent(Component.java:6304)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:733)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

anyone knows what the issue is?

thanks in advance,

rita

1 Like

Hi @Rita ,

I’m glad you enjoy playing with your new assistant :slight_smile:

The error message CL_MEM_OBJECT_ALLOCATION_FAILURE suggests that the so called OpenCl-context died which controls operations on your GPU. If you can share details of the last step you did before and which GPU hardware you are using, I could help you further with preventing the issue.

After the crash, the only thing you can do is restarting: Either whole Fiji (that’s easier sometimes) or clij. To restart clij, use the menu Plugins > ImageJ on GPU (CLIJx) > Change default CL device (experimental).
image

Furthermore, the whole issue might be memory-limit-related. Keep an eye on how much memory the assistant is using with the menu Plugins > ImageJ on GPU (CLIJx) > GPU memory display (experimental)
image

Let me know if this helps!

Cheers,
Robert