Skip to content

Errors when using STATS functions #375

@dkang2

Description

@dkang2

Describe the bug
I have two relatively small files, there are 48 time steps in one file, and 96 in another. The files have only surface data. While I tried to calculate the STATS such as "mean" or "sum". It successfully generated the display for the first dataset, but when do the same thing for the second dataset (no matter which dataset goes first), it generates the flowing command error messages and stop display the stat.

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at anl.verdi.plot.gui.FastTilePlot.computeStatistics(FastTilePlot.java:1809)
at anl.verdi.plot.gui.FastTilePlot.computeDataRange(FastTilePlot.java:2140)
at anl.verdi.plot.gui.FastTilePlot.actionPerformed(FastTilePlot.java:1092)
at java.desktop/javax.swing.JComboBox.fireActionEvent(JComboBox.java:1294)
at java.desktop/javax.swing.JComboBox.setSelectedItem(JComboBox.java:619)
at java.desktop/javax.swing.JComboBox.setSelectedIndex(JComboBox.java:654)
at java.desktop/javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:946)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6621)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
at java.desktop/javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:551)
at java.desktop/java.awt.Component.processEvent(Component.java:6386)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.executePrivileged(AccessController.java:778)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.base/java.security.AccessController.executePrivileged(AccessController.java:778)

To Reproduce
Steps to reproduce the behavior:

  1. verdi.sh -f /work/MOD3DEV/dkj/Verdi/example_files/WWLLN_12US1_15min_20230801.nc -f /work/MOD3DEV/dkj/Verdi/example_files/WWLLN_12US1_30min_20230801.nc
  2. Make Tile Plots for LNT from both datasets
  3. Choose either mean or sum from the STATS dropdown manual for each plot
  4. See error

Expected behavior
These are relatively small datasets, and I wouldn't think its memory requirement is so large.

Screenshots
Additional error message:
2026.02.19 10:28:01.518 [Thread-2] ERROR anl.verdi.plot.gui.FastTilePlot - Error occurred during computing statistics
java.lang.NullPointerException: Cannot load from object array because "statistics" is null
at gov.epa.emvl.GridCellStatistics.computeStatistics(GridCellStatistics.java:162) ~[?:?]
at anl.verdi.plot.gui.FastTilePlot.computeStatistics(FastTilePlot.java:1851) ~[?:?]
at anl.verdi.plot.gui.FastTilePlot.copySubsetLayerData(FastTilePlot.java:2060) ~[?:?]
at anl.verdi.plot.gui.FastTilePlot.access$14(FastTilePlot.java:2013) ~[?:?]
at anl.verdi.plot.gui.FastTilePlot$5.run(FastTilePlot.java:596) ~[?:?]
at java.lang.Thread.run(Thread.java:1583) [?:?]

Image

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions