Skip to content

IOException when running Ilastik Headless #19

@imagejan

Description

@imagejan

I got the following exception when running the Ilastik Headless (Pixel classification) node inside a parallel chunk loop with a few thousand 2D multi-channel images (x=1020, y=1024, c=3):

java.lang.IllegalStateException: java.io.IOException: Cannot run program "C:\Program Files\ilastik-1.2.0\ilastik.exe": CreateProcess error=206, The filename or extension is too long
	at org.knime.knip.ilastik.nodes.headless.IlastikHeadlessNodeModel.execute(IlastikHeadlessNodeModel.java:339)
	at org.knime.core.node.NodeModel.execute(NodeModel.java:732)
	at org.knime.core.node.NodeModel.executeModel(NodeModel.java:566)
	at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1128)
	at org.knime.core.node.Node.execute(Node.java:915)
	at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:561)
	at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
	at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
	at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
	at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328)
	at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
	at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
Caused by: java.io.IOException: Cannot run program "C:\Program Files\ilastik-1.2.0\ilastik.exe": CreateProcess error=206, The filename or extension is too long
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at org.knime.knip.ilastik.nodes.headless.IlastikHeadlessNodeModel.runIlastik(IlastikHeadlessNodeModel.java:480)
	at org.knime.knip.ilastik.nodes.headless.IlastikHeadlessNodeModel.execute(IlastikHeadlessNodeModel.java:307)
	... 14 more
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
	at java.lang.ProcessImpl.start(ProcessImpl.java:137)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 16 more

It was running fine before with a smaller dataset, but failed when trying to scale it up.

Looking at this code, I think this might be solved by chunking List<String> inFiles if it gets too big, and running several processes.

I try to work around this now by chunking in smaller pieces within KNIME.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions