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:
Blocking:

Description

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>(ColorProcessor.java:31)
at ij.ImagePlus.setupProcessor(ImagePlus.java:636)
at ij.ImagePlus.isInvertedLut(ImagePlus.java:1029)
at ij.measure.Calibration.<init>(Calibration.java:83)
at ij.ImagePlus.getLocalCalibration(ImagePlus.java:1752)
at ij.ImagePlus.setType(ImagePlus.java:986)
at ij.ImagePlus.setImage(ImagePlus.java:465)
at ij.ImagePlus.<init>(ImagePlus.java:106)
at ij.io.Opener.openJpegOrGifUsingURL(Opener.java:494)
at ij.io.Opener.openURL(Opener.java:351)
at ij.ImagePlus.<init>(ImagePlus.java:123)
at ij.plugin.URLOpener.run(URLOpener.java:29)
at ij.IJ.runPlugIn(IJ.java:156)
at ij.IJ.runPlugIn(IJ.java:139)
at imagej.legacy.plugin.LegacyPlugin.run(LegacyPlugin.java:67)
at imagej.plugin.api.PluginRunner.run(PluginRunner.java:70)
at imagej.plugin.api.PluginUtils.runPlugin(PluginUtils.java:77)
at imagej.plugin.gui.swing.SwingMenuCreator$1.actionPerformed(SwingMenuCreator.java:154)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:137)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6374)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6139)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4736)
at java.awt.Container.dispatchEventImpl(Container.java:2143)

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.