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.

Opening/Closing analytic view with graph opened causes RenderExceptions

See original GitHub issue

Prerequisites

Description

Trying to recreate #629 I managed to find a rendering exception. I used the hotkeys ctrl + shift + z to open analytic view, and closed it via the ‘x’ button on the tab. I repeated this decently fast and 1/10th of the time I would get this exception. I’ve recreated it twice within a few minutes.

au.gov.asd.tac.constellation.visual.opengl.utilities.RenderException: Incorrect amount of data for the specified target [size=3504, limit=5164, position=0]
	at au.gov.asd.tac.constellation.visual.opengl.renderer.batcher.Batch.bufferData(Batch.java:367)
	at au.gov.asd.tac.constellation.visual.opengl.renderer.batcher.Batch.buffer(Batch.java:296)
	at au.gov.asd.tac.constellation.visual.opengl.renderer.batcher.NodeLabelBatcher.lambda$createBatch$0(NodeLabelBatcher.java:162)
	at au.gov.asd.tac.constellation.visual.opengl.renderer.GraphRenderable.lambda$update$29(GraphRenderable.java:378)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at au.gov.asd.tac.constellation.visual.opengl.renderer.GraphRenderable.update(GraphRenderable.java:377)
	at au.gov.asd.tac.constellation.visual.opengl.renderer.GLRenderer.lambda$display$2(GLRenderer.java:166)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at au.gov.asd.tac.constellation.visual.opengl.renderer.GLRenderer.display(GLRenderer.java:165)
	at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
	at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
	at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1428)
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
Caused: com.jogamp.opengl.GLException: Caught RenderException: Incorrect amount of data for the specified target [size=3504, limit=5164, position=0] on thread AWT-EventQueue-0
	at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
	at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
	at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1442)
	at com.jogamp.opengl.Threading.invoke(Threading.java:223)
	at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:503)
	at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:557)
	at java.desktop/sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
	at java.desktop/sun.awt.RepaintArea.paint(RepaintArea.java:240)
	at java.desktop/sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:358)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5069)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
[catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Steps to Reproduce

  1. open graph and use complete graph builder
  2. open new graph and use sphere graph builder
  3. ctrl + shift + z to open analytic view
  4. close the view
  5. repeat 3 and 4 until exception occurs

Expected behaviour: no errors

Actual behaviour: render exception

Reproduces how often: 10%

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Nova-2119commented, Aug 17, 2020

Okay so I think I have fixed it. After some digging I found that in the NodeLabelBatcher.createBatch method sometimes the topLabelFloat/bottomLabelFloats objects were changing in size prior to the between line 159 and 161 being run which was causing the issue. This would lead to an incorrect buffer being created and then the issue with sizes not matching up. I was unable to pinpoint exactly what code was being run concurrently but figured that a concurrently running thread modifying the same member variable is likely to blame (based on this observation and how randomly the error occurs). Looking closer at the code I could see no reason for those variables to be member variables as they are recreated every time they are used (and private) so I reformatted them to no longer be member variables.

Since then I have been unable to replicate the problem. I would like other to test and try to replicate the problem if possible.

1reaction
Nova-2119commented, Jul 9, 2020

@aldebaran30701 Sorry it took so long to reply, only just saw this.

I don’t believe my fix could have cause this behaviour. The closest it gets is in the NodeLabelBatcher which has a two methods which could lead to the code changed in my fix. But neither of those methods is called in this stack trace (bufferBottomLabel and bufferTopLabel).

Good thinking though.

For what its worth I have also seen a couple of different errors when rendering graphs. Weirdly neither had any affect on Constellation behaviour as far as I could tell…I was able to close them and keep acting as normal. I think the original error in this ticket is one of the ones I have seen. I haven’t seen the second one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

29 Common Google Analytics Data Errors And How To Fix Them
Google Analytics data not showing all traffic or no view data? Here's why your data is wrong and how to fix the most...
Read more >
Debugging errors - dbt Developer Hub
Compile the dependencies into a graph. Check that it's acyclic. Dependency Error. SQL execution, Run the models, Database Error. Let's dive into ...
Read more >
Common Hibernate Exceptions - Baeldung
Many conditions can cause exceptions to be thrown while using Hibernate. These can be mapping errors, infrastructure problems, SQL errors, ...
Read more >
Open index API | Elasticsearch Guide [8.5] | Elastic
Closed indices consume a significant amount of disk-space which can cause problems in managed environments. Closing indices can be disabled via the cluster ......
Read more >
Make Sense of Application Issues With Datadog Error Tracking
Datadog Error Tracking automatically groups errors into issues to help you set priorities and bring context to your troubleshooting.
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