NASAWorldWind / WorldWindJava

The NASA WorldWind Java SDK (WWJ) is for building cross-platform 3D geospatial desktop applications in Java.
718 stars 327 forks source link

Graticule freezes around north/south poles #62

Open sivung opened 7 years ago

sivung commented 7 years ago

When viewing graticule around the north or south pole, the application started to slow down and eventually freeze. It applied to LatLonGraticuleLayer and GARSGraticuleLayer. The MGRSGraticuleLayer performed the best, but we still noticed the slowness. Maybe too many lines were drawn around the pole?

basisbit commented 7 years ago

this could be the same issue as #34 (duplicate?). Could you please check if you also get OpenGL error "javax.media.opengl.GLException: GL-Error 0x505 while creating mutable storage for target" in your error log?

sivung commented 7 years ago

I didn't see OpenGL error. The loading of the graticule around the poles is too slow for my application to be useful. It would be good if the performance can be improved.

When running Graticule class (using LatLonGraticuleLayer), the program became unresponsive when the scale bar was 2000m. No Exception was observed.

When running GARSGraticule (using GARSGraticuleLayer), the program threw IllegalArgumentException when the scale bar was 20km. Below is the trace statement.

Dec 11, 2016 10:45:03 PM gov.nasa.worldwind.render.GeographicTextRenderer$OrderedText render SEVERE: generic.ExceptionWhileRenderingText java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.ComparableTimSort.mergeLo(Unknown Source) at java.util.ComparableTimSort.mergeAt(Unknown Source) at java.util.ComparableTimSort.mergeCollapse(Unknown Source) at java.util.ComparableTimSort.sort(Unknown Source) at java.util.Arrays.sort(Unknown Source) at java.util.Collections.sort(Unknown Source) at gov.nasa.worldwind.render.GeographicTextRenderer$OrderedText.render(GeographicTextRenderer.java:400) at gov.nasa.worldwind.AbstractSceneController.draw(AbstractSceneController.java:927) at gov.nasa.worldwind.StereoOptionSceneController.draw(StereoOptionSceneController.java:141) at gov.nasa.worldwind.BasicSceneController.doNormalRepaint(BasicSceneController.java:47) at gov.nasa.worldwind.BasicSceneController.doRepaint(BasicSceneController.java:30) at gov.nasa.worldwind.AbstractSceneController.repaint(AbstractSceneController.java:400) at gov.nasa.worldwind.WorldWindowGLAutoDrawable.doDisplay(WorldWindowGLAutoDrawable.java:457) at gov.nasa.worldwind.WorldWindowGLAutoDrawable.display(WorldWindowGLAutoDrawable.java:330) at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665) at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649) at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994) at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300) at javax.media.opengl.Threading.invoke(Threading.java:193) at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541) at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:595) at javax.media.opengl.awt.GLCanvas.update(GLCanvas.java:795) at sun.awt.RepaintArea.updateComponent(Unknown Source) at sun.awt.RepaintArea.paint(Unknown Source) at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$400(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)