NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #397 (closed defect: invalid)

Opened 2011-03-24T11:10:40-05:00

Last modified 2011-03-28T09:21:47-05:00

Cannot open Nile Bend sample image (memory issue)

Reported by: bdezonia Owned by: curtis
Priority: major Milestone: imagej-2.0-alpha1
Component: UI Framework Version:
Severity: serious Keywords:
Cc: Blocked By:


Opening the Nile Bend sample image results in an OutOfMemoryException being thrown. A dialog is shown saying can't open file.

Stack trace:

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space

at ij.process.ColorProcessor.<init>(
at ij.ImagePlus.setupProcessor(
at ij.ImagePlus.isInvertedLut(
at ij.measure.Calibration.<init>(
at ij.ImagePlus.getLocalCalibration(
at ij.ImagePlus.setType(
at ij.ImagePlus.setImage(
at ij.ImagePlus.<init>(
at ij.ImagePlus.<init>(
at ij.IJ.runPlugIn(
at ij.IJ.runPlugIn(
at imagej.plugin.api.PluginUtils.runPlugin(
at imagej.plugin.gui.swing.SwingMenuCreator$1.actionPerformed(
at javax.swing.AbstractButton.fireActionPerformed(
at javax.swing.AbstractButton$Handler.actionPerformed(
at javax.swing.DefaultButtonModel.fireActionPerformed(
at javax.swing.DefaultButtonModel.setPressed(
at javax.swing.AbstractButton.doClick(
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(
at java.awt.Component.processMouseEvent(
at javax.swing.JComponent.processMouseEvent(
at java.awt.Component.processEvent(
at java.awt.Container.processEvent(
at java.awt.Component.dispatchEventImpl(
at java.awt.Container.dispatchEventImpl(

Change History

comment:1 Changed 2011-03-25T13:57:05-05:00 by bdezonia

I think its just that when running IJ1 the memory allocated to it is governed by its preferences. When run as a jar from IJ2 these preferences may not be in place.

Running IJ1 and doing About ... I see Max Memory at 400 mb on my machine. When running About... from within IJ2 I see Max Memory at 130 mb.

comment:2 Changed 2011-03-25T14:00:19-05:00 by bdezonia

Tried setting max memory to 130 mb in IJ1. It gets clamped to 256 mb. In IJ1 Nile will still open at this memory level.

comment:3 Changed 2011-03-25T17:02:17-05:00 by curtis

Why don't you try setting the IJ2 memory to 400MB?

comment:4 Changed 2011-03-28T09:21:47-05:00 by bdezonia

  • Status changed from new to closed
  • Resolution set to invalid

using the jvm argument -m to the imagej run configuration in eclipse I can verify that this issue goes away as memory is added. If set to 400 like IJ1 was things load and display just fine.