saalfeldlab / n5-utils

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

"Ragged" end blocks cause errors #4

Closed clbarnes closed 5 years ago

clbarnes commented 6 years ago

If a dataset's shape is not an integer number of blocks, reading into the region of non-full blocks shows only empty data and prints errors:

java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException
    at net.imglib2.cache.ref.SoftRefLoaderCache.get(SoftRefLoaderCache.java:111)
    at net.imglib2.cache.util.LoaderCacheAsCacheAdapter.get(LoaderCacheAsCacheAdapter.java:30)
    at net.imglib2.cache.ref.WeakRefVolatileCache.getBlocking(WeakRefVolatileCache.java:356)
    at net.imglib2.cache.ref.WeakRefVolatileCache.access$000(WeakRefVolatileCache.java:19)
    at net.imglib2.cache.ref.WeakRefVolatileCache$FetchEntry.call(WeakRefVolatileCache.java:403)
    at net.imglib2.cache.ref.WeakRefVolatileCache$FetchEntry.call(WeakRefVolatileCache.java:380)
    at net.imglib2.cache.queue.FetcherThreads$Fetcher.run(FetcherThreads.java:168)
Caused by: java.lang.ArrayIndexOutOfBoundsException
axtimwalde commented 5 years ago

Reading outside of the shape of the dataset?

axtimwalde commented 5 years ago

@clbarnes is this issue still there?

clbarnes commented 5 years ago

I think this was due to a bad export producing malformed edge blocks. I can't reproduce it on a better export, sorry for the report!