question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scatter Plot View negative or zero log axis out of memory error

See original GitHub issue

Prerequisites

Description

Running the view on an empty graph, or sphere graph, while selecting parameters and clicking buttons “selected” and “log scale X” caused it to lock up and throw an out of memory error.

java.lang.OutOfMemoryError: Java heap space
	at java.base/java.lang.Double.valueOf(Double.java:524)
	at au.gov.asd.tac.constellation.views.scatterplot.axis.LogarithmicAxis.calculateTickValues(LogarithmicAxis.java:153)
	at javafx.controls/javafx.scene.chart.Axis.computePrefHeight(Axis.java:582)
	at javafx.graphics/javafx.scene.Parent.prefHeight(Parent.java:1037)
	at javafx.graphics/javafx.scene.layout.Region.prefHeight(Region.java:1559)
	at javafx.controls/javafx.scene.chart.XYChart.layoutChartChildren(XYChart.java:697)
	at javafx.controls/javafx.scene.chart.Chart$1.layoutChildren(Chart.java:95)
	at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1204)
	at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.graphics/javafx.scene.Scene.doLayoutPass(Scene.java:576)
	at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2482)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
	at javafx.graphics/com.sun.javafx.tk.Toolkit$$Lambda$518/0x000000080093f040.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
	at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:519)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:499)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:492)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:320)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit$$Lambda$372/0x000000080073d040.run(Unknown Source)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication$$Lambda$368/0x000000080073e040.run(Unknown Source)
	at java.base/java.lang.Thread.run(Thread.java:834)

Steps to Reproduce

  1. Open new graph
  2. Open view
  3. Select transaction, visibility, identifier, and click selected, log scale x multiple times. (NOTE: I selected a few different items from within the dropdowns)

Expected behaviour: Not freeze up

Actual behaviour: freezes

Reproduces how often: 100%

Additional Information

Found during testing of V2.0 rc2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Nova-2119commented, Aug 19, 2020

@formalhaut69 there’s always a bigger bug.

@arcturus2 I’ll start looking into this.

1reaction
antares1470commented, Jul 28, 2020

@formalhaut69 I think you’re analysis is correct in that we probably don’t want to be in a situation where we are creating an endless amount of ticks on the graph. Disabling the buttons might partially fix the problem but I suspect this might look a little odd from a users perspective (usually we only disable things when they’re not applicable). (Also if you’ve got a log scale already selected for either axes and then change attributes resulting in a blank scatter plot, disabling probably won’t avoid the problem)

Another solution might be to limit the number of ticks created when major == -inf, perhaps stopping after a certain number of loop iterations. It presents something but doesn’t destroy the memory use and doesn’t require disabling anything

Read more comments on GitHub >

github_iconTop Results From Across the Web

Matplotlib runs out of memory when plotting in a loop
The code is running on Windows XP 32-bit with python 2.5 and matplotlib 0.99.1, numpy 1.3.0 and scipy 0.7.1. EDIT: The code has...
Read more >
FAQ-893 I see an "Out of Memory" error message when I copy ...
When you copy a graph with large data and paste to PowerPoint as an OLE object, you might get an error message: "There...
Read more >
Python Scatter Plot - How to visualize relationship between ...
Scatter plot is a graph of two sets of data along the two axes. It is used to visualize the relationship between the...
Read more >
Asymptote out-of-memory error when plotting many points - TeX
I am using Asymptote 2.37 on Windows 7. I'm trying to make some large scatter plots but get a memory error. When trying...
Read more >
Scatter plots with logarithmic axes...and how to handle zeros ...
This article shows several ways to create a scatter plot with ... NOTE: Log axis cannot support zero or negative values in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found