Imglib2 error: no such method (recent issue in Trackmate and more plugins)


I’m encountering the following issue in Trackmate:

When trying to capture spot images:

it throws an error about a non-existing OutOfBoundsConstantValueFactory:

I think it is related to the newer imglib2 which ships with BigStitcher. Disabling the BigStitcher update site removes the error.
A related issue is here: How to deal with incompatible update sites (which was solved, and today I stumbled over what I’m posting here)

The issue is not specific to Trackmate, I see it for other tools (like plugins from the SCF_MPI_CBG update site) as well once I enable the Bigstitcher update site.

I’m wondering if there is a solution for removing this error? I fear my knowledge of imglib2 is rather basic so I can’t really give more details.

Thanks already for your help!

@tpietzsch @gayaJ


First to explain the problem:
This is about a “invisible” API change that unfortunately slipped through in Basically, the generics on OutOfBoundsConstantValueFactory changed from

public class OutOfBoundsConstantValueFactory< T extends Type< T >, F extends Interval & RandomAccessible< T > >


public class OutOfBoundsConstantValueFactory< T, F extends Interval & RandomAccessible< T > >
		implements OutOfBoundsFactory< T, F >

So T extends Type<T> became just T. Everything that worked before will work, because the type of T just became more general. However… As you observed, already compiled code breaks now, because the constructor

public OutOfBoundsConstantValueFactory( final T value ) {...}

signature is erased to OutOfBoundsConstantValueFactory(Type) before, and now OutOfBoundsConstantValueFactory(Object).

Just re-building the(unchanged) trackmate code with the new imglib2 dependency would solve the problem. However, there is probably a lot of places where this breaks stuff, so let’s try to put the old signature back in temporarily (

@noreenw Could you try whether replacing the imglib2 jar coming through the BigStitcher update site with this one (imglib2-5.9.1-20200428.154514-2.jar) fixes the issue?

1 Like

Thanks for your quick reply and the explanation @tpietzsch !

I replaced the imglib2 jar with your new snapshot build and now it works like a charm, the errors are gone.

One question: would you independent of that recommend to rebuild code that depended on that signature (well, I cannot speak for anyone else here of course , just for myself)?

@noreenw yes, I would recommend that. I would do the following:
1.) Make a new release imglib2 5.9.1 which has the additional signature. This we can deploy to Fiji and for the time being that will solve the issue without recompiling.
2.) Make another release imglib2 5.9.2 which does not have the additional signature. Then you can depend on that version in your code, and the next time you compile/release it will automatically do the right thing (and because the additional signature is removed, it will not fall back on the deprecated signature)…

1 Like