saalfeldlab / n5-utils

simple standalone BigDataViewer for multiple N5 (or HDF5) datasets
Other
8 stars 16 forks source link

Copy from hdf5 throws with ArrayIndexOutOfBounds #9

Closed hanslovsky closed 5 years ago

hanslovsky commented 5 years ago

The job keeps running but I see this exception (I do not see any exceptions with paintera-conversion-helper):

$ n5-copy -b 64,64,64 -c gzip -i /groups/saalfeld/home/hanslovskyp/data/from-arlo/interpolated-combined/sample_0.h5 -o /groups/saalfeld/home/hanslovskyp/data/from-arlo/interpolated-combined/sample_0.n5

  attributes:
    n5 : class java.lang.String
/volumes
  attributes:
/volumes/labels
  attributes:
/volumes/labels/glia
Exception in thread "main" picocli.CommandLine$ExecutionException: Error while calling command (org.saalfeldlab.Copy@4b168fa9): java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 139264
        at picocli.CommandLine.execute(CommandLine.java:1068)
        at picocli.CommandLine.access$900(CommandLine.java:142)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:1255)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:1223)
        at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1131)
        at picocli.CommandLine.parseWithHandlers(CommandLine.java:1414)
        at picocli.CommandLine.call(CommandLine.java:1690)
        at picocli.CommandLine.call(CommandLine.java:1614)
        at org.saalfeldlab.Copy.main(Copy.java:196)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 139264
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at org.janelia.saalfeldlab.n5.imglib2.N5Utils.save(N5Utils.java:1247)
        at org.saalfeldlab.Copy.copyDataset(Copy.java:258)
        at org.saalfeldlab.Copy.copyGroup(Copy.java:307)
        at org.saalfeldlab.Copy.copyGroup(Copy.java:309)
        at org.saalfeldlab.Copy.copyGroup(Copy.java:309)
        at org.saalfeldlab.Copy.call(Copy.java:346)
        at org.saalfeldlab.Copy.call(Copy.java:156)
        at picocli.CommandLine.execute(CommandLine.java:1061)
        ... 8 more
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 139264
        at net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:32)
        at net.imglib2.img.cell.LazyCellImg$LazyCells.get(LazyCellImg.java:104)
        at net.imglib2.img.list.AbstractLongListImg$LongListRandomAccess.get(AbstractLongListImg.java:274)
        at net.imglib2.img.cell.CellRandomAccess.getCell(CellRandomAccess.java:136)
        at net.imglib2.img.cell.CellRandomAccess.updatePosition(CellRandomAccess.java:474)
        at net.imglib2.img.cell.CellRandomAccess.setPosition(CellRandomAccess.java:437)
        at net.imglib2.view.TranslationRandomAccess.setPosition(TranslationRandomAccess.java:203)
        at net.imglib2.AbstractInterval.min(AbstractInterval.java:199)
        at net.imglib2.util.Util.getTypeFromInterval(Util.java:773)
        at net.imglib2.view.Views.flatIterable(Views.java:797)
        at org.janelia.saalfeldlab.n5.imglib2.N5CellLoader.burnIn(N5CellLoader.java:152)
        at org.janelia.saalfeldlab.n5.imglib2.N5Utils.createDataBlock(N5Utils.java:203)
        at org.janelia.saalfeldlab.n5.imglib2.N5Utils.lambda$save$11(N5Utils.java:1224)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 139264
        at net.imglib2.cache.ref.SoftRefLoaderCache.get(SoftRefLoaderCache.java:111)
        at net.imglib2.cache.util.LoaderCacheAsCacheAdapter.get(LoaderCacheAsCacheAdapter.java:30)
        at net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:28)
        ... 17 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 139264
        at net.imglib2.img.basictypeaccess.array.AbstractLongArray.getValue(AbstractLongArray.java:61)
        at net.imglib2.type.numeric.integer.GenericLongType.getLong(GenericLongType.java:125)
        at net.imglib2.type.numeric.integer.GenericLongType.set(GenericLongType.java:175)
        at net.imglib2.type.numeric.integer.GenericLongType.set(GenericLongType.java:49)
        at org.janelia.saalfeldlab.n5.imglib2.N5CellLoader.copyIntersection(N5CellLoader.java:328)
        at org.janelia.saalfeldlab.n5.imglib2.N5CellLoader.lambda$createCopy$4(N5CellLoader.java:229)
        at org.janelia.saalfeldlab.n5.imglib2.N5CellLoader.load(N5CellLoader.java:144)
        at net.imglib2.cache.img.LoadedCellCacheLoader.get(LoadedCellCacheLoader.java:91)
        at net.imglib2.cache.img.LoadedCellCacheLoader.get(LoadedCellCacheLoader.java:51)
        at net.imglib2.cache.ref.SoftRefLoaderCache.get(SoftRefLoaderCache.java:101)
        ... 19 more

I installed from current master at commit 7230532

I can n5-copy with f58aa7c, so I assume the issue is with 61ba7f8

axtimwalde commented 5 years ago

Should be fixed. Was a previously undetected bug in n5-hdf5 https://github.com/saalfeldlab/n5-hdf5/commit/346fd12ddbdf49cb626dd9432106eb525d93832e.