"Out of memory, all available memory (247MB) has been used"

memory
fiji
Tags: #<Tag:0x00007fb87ccb3248> #<Tag:0x00007fb87ccb3108>

#21

Note that the java version displayed in Fiji: 1.8.0_172 do not match the one shown in your first post (1.8.0_171). There might be something to understand here.


#22

@NicoKiaru that’s true ! I’ve went and checked what is up with the java versions, and here’s the situation :

  • java 1.8.0_171 is the version I had already installed on my computer prior to installing Fiji
  • java 1.8.0_172 is the version that comes with the Fiji bundle when you download it

I’ve searched in the Java Control Panel and deactivated the 171 version (the one that wasn’t installed with Fiji), and checked that the 172 version (the one installed with Fiji) was activated. It didn’t change anything when I restarted Fiji and retried to open my image file : still the same error message.

@Herbie I had just checked the “Keep multiple undo buffers” to try if it was changing anything with my problem, and it didn’t ! I’ll just uncheck it from now, thanks for the advice :slight_smile:


#23

Out of curiosity, have you tried the opposite ? Just remove temporarily the java folder inside Fiji.app.


#24

Have you tried the simple solution of opening your image as a virtual stack?


#25

@NicoKiaru I have tried the opposite, and pretty much any combination possible : when I remove the 172 version of the Fiji.app folder, ImageJ automatically detects that the 171 version is installed somewhere else on the computer and switches to it (it’s indicated in the status bar), but the problem is still the same.

@rondespain Yes I have, as mentioned before, and it does work, but the problem is the macro I use doesn’t use TIFF Virtual Stack to open the file so it’s not really a viable solution :confused:

Thanks, Erwan

PS: Sorry for the inactivity, I was on a break


#26

Ok, I’m out of ideas…

As a last attempt, can you execute this groovy script on Fiji and post the result here ? Maybe check the output before posting but I think that’s fine.

import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.OperatingSystemMXBean;

// System
print("------------ System ---------------\n");
for (key in System.getProperties().keys()) {
	print(key+':'+System.getProperty(key)+'\n');
}
print("Cores : "+Runtime.getRuntime().availableProcessors()+"\n");

// Memory
print("------------ Memory ---------------\n");
print("Heap : "+getHeap()+"\n");
print("Non Heap : "+getNonHeap()+"\n");
print("RT free mem : " + (Runtime.getRuntime().freeMemory()/ (1024.0 * 1024.0))+ " Mb\n");
print("RT total mem : " + (Runtime.getRuntime().totalMemory()/ (1024.0 * 1024.0))+ " Mb\n");
print("RT max mem : " + (Runtime.getRuntime().maxMemory()/ (1024.0 * 1024.0))+ " Mb\n");


String getHeap() {
		MemoryMXBean mem = ManagementFactory.getMemoryMXBean();
		double c = 1.0 / (1024.0 * 1024.0);
		double u = mem.getHeapMemoryUsage().getUsed() * c;
		double m = mem.getHeapMemoryUsage().getMax()  * c;
		double i = mem.getHeapMemoryUsage().getInit() * c;
		return String.format("u=%3.2f m=%3.2f i=%3.2f Mb", u, m, i);
}

String getNonHeap() {
		MemoryMXBean mem = ManagementFactory.getMemoryMXBean();
		double c = 1.0 / (1024.0 * 1024.0);
		double u = mem.getNonHeapMemoryUsage().getUsed() * c;
		double m = mem.getNonHeapMemoryUsage().getMax() * c;
		double i = mem.getNonHeapMemoryUsage().getMax() * c;
		return String.format("u=%3.2f m=%3.2f i=%3.2f Mb", u, m, i);
}