Stardist plugin startup_Abstract Method error

Hi
I have been getting an error when I try to open Stardist plugin. It was working a few days ago and am not sure if its because of an update.
Regardless of the type of image open, when I click StarDist 2D, I get the following error:

[Tue Mar 17 12:11:40 AEDT 2020] [ERROR] [] Module threw error
java.lang.AbstractMethodError: Method net/imglib2/img/VirtualStackAdapter$ImagePlusLoader$$Lambda$96.extract(Ljava/lang/Object;)Ljava/lang/Object; is abstract
	at net.imglib2.img.VirtualStackAdapter$ImagePlusLoader$$Lambda$96/2095461678.extract(Unknown Source)
	at net.imglib2.cache.ref.SoftRefLoaderRemoverCache$Entry.setValue(SoftRefLoaderRemoverCache.java:78)
	at net.imglib2.cache.ref.SoftRefLoaderRemoverCache.get(SoftRefLoaderRemoverCache.java:130)
	at net.imglib2.cache.util.LoaderRemoverCacheAsRemoverCacheAdapter.get(LoaderRemoverCacheAsRemoverCacheAdapter.java:45)
	at net.imglib2.cache.util.RemoverCacheAsCacheAdapter.get(RemoverCacheAsCacheAdapter.java:43)
	at net.imglib2.img.VirtualStackAdapter$ImagePlusLoader.get(VirtualStackAdapter.java:178)
	at net.imglib2.img.VirtualStackAdapter$ImagePlusLoader.get(VirtualStackAdapter.java:158)
	at net.imglib2.img.planar.PlanarImg.update(PlanarImg.java:118)
	at net.imglib2.img.planar.PlanarImg.update(PlanarImg.java:66)
	at net.imglib2.type.numeric.integer.GenericShortType.updateContainer(GenericShortType.java:100)
	at net.imglib2.img.planar.PlanarCursor.reset(PlanarCursor.java:162)
	at net.imglib2.img.planar.PlanarCursor.<init>(PlanarCursor.java:90)
	at net.imglib2.img.planar.PlanarCursor2D.<init>(PlanarCursor2D.java:50)
	at net.imglib2.img.planar.PlanarImg.cursor(PlanarImg.java:217)
	at net.imglib2.img.planar.PlanarImg.cursor(PlanarImg.java:66)
	at net.imglib2.img.AbstractImg.firstElement(AbstractImg.java:81)
	at net.imagej.ImgPlus.firstElement(ImgPlus.java:276)
	at net.imagej.DefaultDataset.getType(DefaultDataset.java:220)
	at net.imagej.DefaultDataset.isSigned(DefaultDataset.java:225)
	at net.imagej.DefaultDataset.mergedColorCompatible(DefaultDataset.java:704)
	at net.imagej.DefaultDataset.<init>(DefaultDataset.java:101)
	at net.imagej.DefaultDatasetService.create(DefaultDatasetService.java:200)
	at net.imagej.legacy.translate.DisplayCreator.makeDataset(DisplayCreator.java:139)
	at net.imagej.legacy.translate.DisplayCreator.getDataset(DisplayCreator.java:101)
	at net.imagej.legacy.translate.DisplayCreator.makeDisplay(DisplayCreator.java:179)
	at net.imagej.legacy.translate.DisplayCreator.createDisplay(DisplayCreator.java:93)
	at net.imagej.legacy.translate.ImageTranslator.createDisplay(ImageTranslator.java:64)
	at net.imagej.legacy.LegacyImageMap.registerLegacyImage(LegacyImageMap.java:288)
	at net.imagej.legacy.display.LegacyImageDisplayService.getActiveImageDisplay(LegacyImageDisplayService.java:117)
	at net.imagej.legacy.display.LegacyImageDisplayService.getActiveDataset(LegacyImageDisplayService.java:128)
	at net.imagej.display.process.ActiveDatasetPreprocessor.getValue(ActiveDatasetPreprocessor.java:72)
	at net.imagej.display.process.ActiveDatasetPreprocessor.getValue(ActiveDatasetPreprocessor.java:56)
	at net.imagej.display.process.SingleInputPreprocessor.process(SingleInputPreprocessor.java:85)
	at org.scijava.module.ModuleRunner.preProcess(ModuleRunner.java:105)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:157)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
	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)

Not sure what is going on.
When I try starting the plugin again, I get the window, but in the Input image box, I get:


If I click Ok, I get an empty dialog box with just the OK button. After clicking it, nothing happens.

Thanks
Pradeep

1 Like

@pr4deepr

Perhaps @uschmidt83 or @mweigert can better assist you in this? I haven’t used this tool myself…

1 Like

I have the same problem. In case the error that @pr4deeprposted isn’t enough, here’s more output star-dist-exception.txt (4.6 KB)

I’m having the same problem. But not only with StarDist, also with the “Run Pixel Classification Prediction” plugin from ilastik plugin…

[ERROR] Module threw error
java.lang.AbstractMethodError: Method net/imglib2/img/VirtualStackAdapter$ImagePlusLoader$$Lambda$130.extract(Ljava/lang/Object;)Ljava/lang/Object; is abstract
	at net.imglib2.img.VirtualStackAdapter$ImagePlusLoader$$Lambda$130/115815072.extract(Unknown Source)
	at net.imglib2.cache.ref.SoftRefLoaderRemoverCache$Entry.setValue(SoftRefLoaderRemoverCache.java:78)
	at net.imglib2.cache.ref.SoftRefLoaderRemoverCache.get(SoftRefLoaderRemoverCache.java:130)
	at net.imglib2.cache.util.LoaderRemoverCacheAsRemoverCacheAdapter.get(LoaderRemoverCacheAsRemoverCacheAdapter.java:45)
	at net.imglib2.cache.util.RemoverCacheAsCacheAdapter.get(RemoverCacheAsCacheAdapter.java:43)
	at net.imglib2.img.VirtualStackAdapter$ImagePlusLoader.get(VirtualStackAdapter.java:178)
	at net.imglib2.img.VirtualStackAdapter$ImagePlusLoader.get(VirtualStackAdapter.java:158)
	at net.imglib2.img.planar.PlanarImg.update(PlanarImg.java:118)
	at net.imglib2.img.planar.PlanarImg.update(PlanarImg.java:66)
	at net.imglib2.type.numeric.integer.GenericShortType.updateContainer(GenericShortType.java:100)
	at net.imglib2.img.planar.PlanarCursor.reset(PlanarCursor.java:162)
	at net.imglib2.img.planar.PlanarCursor.<init>(PlanarCursor.java:90)
	at net.imglib2.img.planar.PlanarCursor2D.<init>(PlanarCursor2D.java:50)
	at net.imglib2.img.planar.PlanarImg.cursor(PlanarImg.java:217)
	at net.imglib2.img.planar.PlanarImg.cursor(PlanarImg.java:66)
	at net.imglib2.img.AbstractImg.firstElement(AbstractImg.java:81)
	at net.imagej.ImgPlus.firstElement(ImgPlus.java:276)
	at net.imagej.DefaultDataset.getType(DefaultDataset.java:220)
	at net.imagej.DefaultDataset.isSigned(DefaultDataset.java:225)
	at net.imagej.DefaultDataset.mergedColorCompatible(DefaultDataset.java:704)
	at net.imagej.DefaultDataset.<init>(DefaultDataset.java:101)
	at net.imagej.DefaultDatasetService.create(DefaultDatasetService.java:200)
	at net.imagej.legacy.translate.DisplayCreator.makeDataset(DisplayCreator.java:139)
	at net.imagej.legacy.translate.DisplayCreator.getDataset(DisplayCreator.java:101)
	at net.imagej.legacy.translate.DisplayCreator.makeDisplay(DisplayCreator.java:179)
	at net.imagej.legacy.translate.DisplayCreator.createDisplay(DisplayCreator.java:93)
	at net.imagej.legacy.translate.ImageTranslator.createDisplay(ImageTranslator.java:64)
	at net.imagej.legacy.LegacyImageMap.registerLegacyImage(LegacyImageMap.java:288)
	at net.imagej.legacy.display.LegacyImageDisplayService.getActiveImageDisplay(LegacyImageDisplayService.java:117)
	at net.imagej.legacy.display.LegacyImageDisplayService.getActiveDataset(LegacyImageDisplayService.java:128)
	at net.imagej.display.process.ActiveDatasetPreprocessor.getValue(ActiveDatasetPreprocessor.java:72)
	at net.imagej.display.process.ActiveDatasetPreprocessor.getValue(ActiveDatasetPreprocessor.java:56)
	at net.imagej.display.process.SingleInputPreprocessor.process(SingleInputPreprocessor.java:85)
	at org.scijava.module.ModuleRunner.preProcess(ModuleRunner.java:105)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:157)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Has there maybe been any recent changes in the in the VirtualStackAdapter of imglib2?

Hi,

I’m getting the same error when trying to export an image to h5 file using “Export HDF5” from Ilastik plugin. any hint for how to solve this?
It worked for me few weeks ago.

@ctrueden, @ilastik_team, @imagejan

Thanks,
Ofra

I could not reproduce locally. My Fiji on macOS has the StarDist and CSBDeep update sites enabled, fully updated.

@pr4deepr @Ofra_Golani Do you have any additional update sites enabled? Almost certainly this is a skew between library versions in your environment, as described in this Troubleshooting section. Since the involved libraries are imglib2-ij and imglib2-cache, you could check the versions of those you have now which are not working, and the versions of those you had before which do work, and compare the version numbers.

As for why it happens: perhaps you have another update site (besides StarDist, CSBDeep, Java-8, Fiji and ImageJ) enabled, which ships an incompatible old version of imglib2-cache? Just a guess.

For plugin developers: regarding how to keep this from happening in future: you can start including your component(s) in the pom-scijava bill of materials (BOM), and it will soon get “mega melted”—i.e. tested—with all other components in the BOM, which will catch this kind of problem before it hits users. To include your component(s) in pom-scijava, you can start a thread here mentioning @ctrueden, or you can file a PR to pom-scijava directly.

6 Likes

@ctrueden Thanks for pointing out the skew between library versions. In deed, disabling the BigStitcher update site resolved the AbstractMethodError (at least in my case). Now both, StarDist and ilastik plugins work again.
Thank you!

4 Likes

Thanks @ctrueden,

Starting from fresh installation and adding only few update sites works fine for Ilastik=>Export HDF5. This also solved the issue with running stardist.
The difference seems to be that the version that does NOT work has newer imlib2-cache version (imglib2-cache-1.0.0-beta-12.jar vs imglib2-cache-1.0.0-beta-11.jar).
I’ll try to find what was the plugin that lead to the conflict.

Ofra

2 Likes

@loicsauteur @Ofra_Golani Thanks for these details! We will look into it.

CC @tpietzsch @StephanPreibisch

Indeed BigStitcher plugin changed imglib2-cache version to the newer one, and disabling it (as a workaround), solved the issue.

@ctrueden @loicsauteur @Ofra_Golani Thanks for digging!!!

Yes… imglib2-ij needs to be updated along with imglib2-cache.
I will make a imglib2-ij release and ping you, @StephanPreibisch, when it is available. Then you could ship that as well in the BigStitcher update site and hopefully everything will work again…

@StephanPreibisch imglib2-ij 2.0.0-beta-46 is released.
Could you put that on the BigStitcher update site? Then let’s see whether that resolves it…

Apologies for the late entry.
Thanks @Ofra_Golani @loicsauteur @ctrueden . As Ofra and Loic said, disabling BigStitcher update site has helped. Interesting to see how the troubleshooting was done…
Thanks @tpietzch for realeasing the updated version…

Indeed, thanks @pr4deepr, @Ofra_Golani, @loicsauteur, @ctrueden for digging that deep and @tpietzsch for fixing! :slight_smile:

1 Like

2 posts were split to a new topic: How to deal with incompatible update sites