-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"GC overhead limit exceeded" from v7.6.2 #245
Comments
Thanks Kota for your kind words. Can you try to remove all the |
Hi @tinevez Great suggestion! so I tried:
So what was the change between v7.6.1 and v7.6.2? I cannot see the tag Cheers, |
here is the stdout
|
Ok then it's definitely an issue with the memory not clearing between iterations. In you Java code I see that we always use the same Img<UnsignedByteType> img = ImageJFunctions.wrap(pmimp); outside of the loop? |
OK, so I tried compacting the loop content more and using the import org.scijava.command.Command;
import org.scijava.log.Logger;
import org.scijava.plugin.Parameter;
import org.scijava.plugin.Plugin;
import fiji.plugin.trackmate.detection.DogDetector;
import ij.ImagePlus;
import net.imagej.ImageJ;
import net.imglib2.img.Img;
import net.imglib2.img.display.imagej.ImageJFunctions;
import net.imglib2.type.numeric.integer.UnsignedByteType;
@Plugin(type = Command.class, menuPath = "Tutorials>TrackMate test")
public class TrackMateTest20230228v3 implements Command {
@Parameter
private Logger logger;
@Override
public void run() {
logger.info("test");
String pp = "/Users/miura/samples/test5dots.tif";
final ImagePlus ccimpG = new ImagePlus(pp);
final int radius = 3;
final int threshold = 5;
final boolean doSubpixel = false;
final boolean doMedian = true;
final Img<UnsignedByteType> img = ImageJFunctions.wrap(ccimpG);
final Img<UnsignedByteType> interval = img;
final double[] calibration = { 1, 1, 1 };
for (int i = 0; i < 1000; i++) {
logger.info("=== count:" + Integer.toString(i));
final DogDetector<UnsignedByteType> detector = new DogDetector<UnsignedByteType>(
img, interval, calibration, radius, threshold,
doSubpixel, doMedian);
// detector.setNumThreads(1);
detector.process();
}
}
public static void main(String[] args) throws Exception {
System.out.println(System.getProperty("java.vm.name"));
System.out.println(System.getProperty("java.vm.version"));
System.out.println(System.getProperty("java.vm.info"));
final ImageJ ij = new ImageJ();
// ij.launch(args);
// ij.ui().showUI();
ij.command().run(TrackMateTest20230228v3.class, true);
}
} |
Hi JY @tinevez
I encountered the following error starting from the v7.6.2-snapshot, while the v7.6.1-snapshot or earlier versions do not show this memory handling problem.
The above error is just an example and can be different as memory exhaustion causes this:
To reproduce this error, please try the following code with two different versions. I start to see the slowing down around 500th iteration, and often stops by 750th iteration. This is not affected by the VM setting such as
-xmx
.I will add a download link to the sample image (hardcoded in the
main
) below the code.The sample image:
https://www.dropbox.com/s/deu2vc6ftkp9wle/test5dots.tif?dl=0
Just as additional information: when similar processing is done using Jython, there is no problem. Interesting...
I hope this can be somehow fixed, as this is causing crashes when many spots are analyzed. Until this is fixed, I will use v7.6.1 to avoid the problem.
... and last but not least, big thanks to your masterpiece plugin!
Cheers,
Kota
ps: following versions were tested.
7.1.1 OK
7.5.1 OK
7.6.1 OK
7.6.2 failed
7.7.1 failed
7.10.2 failed
7.10.3 failed
The text was updated successfully, but these errors were encountered: