Git Product home page Git Product logo

view2.5d's Issues

Error after running slime for a while

java.util.ConcurrentModificationException
 at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
 at java.util.AbstractList$Itr.next(AbstractList.java:343)
 at view25d.view.gl.PatchGL.display(PatchGL.java:250)
 at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
 at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:435)
 at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
 at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:412)
 at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
 at javax.media.opengl.GLCanvas.paint(GLCanvas.java:277)
 at javax.media.opengl.GLCanvas.update(GLCanvas.java:354)
 at sun.awt.RepaintArea.updateComponent(RepaintArea.java:267)
 at sun.awt.RepaintArea.paint(RepaintArea.java:233)
 at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)
 at java.awt.Component.dispatchEventImpl(Component.java:4852)
 at java.awt.Component.dispatchEvent(Component.java:4604)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
 at java.awt.EventQueue.access$400(EventQueue.java:82)
 at java.awt.EventQueue$2.run(EventQueue.java:676)
 at java.awt.EventQueue$2.run(EventQueue.java:674)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
 at java.awt.EventQueue$3.run(EventQueue.java:690)
 at java.awt.EventQueue$3.run(EventQueue.java:688)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

I suspect this is a timing bug that will be hard to reproduce. I had messed around with the view (just mouse manipulation, not code), but wasn't when the error occurred.

Drawing links

Thanks for the handy extension. Have you ever looked into drawing links between turtles? It would be very handy for my work. I can code Java and would be very grateful for a few hints to get me going. -- Thanks greatly Rob

The view2.5D extension does not handle shape changes

In view2.5D extension if a shape is created, edited, deleted or imported no corresponding action happens in the 3D view.
Shapes can be turtle or link shapes.

Except in the case of editing a shape, an uncaught exception occurs.

To reproduce the bug.

Create a model that includes the following code

extensions [ view2.5d ]

to setup
  view2.5d:remove-all-turtle-views
  view2.5d:remove-all-turtle-views

  view2.5d:turtle-view "Test" turtles [ the-turtle -> [3 +  abs xcor] of the-turtle ]
  wait 1
  view2.5d:set-observer-distance "Test" 40

  view2.5d:set-z-scale "Test" 2
  view2.5d:set-observer-angles "Test" 25 30
  ;; increase the stem thickness
  view2.5d:set-turtle-stem-thickness "Test" .2
  view2.5d:update-turtle-view "Test" turtles
end

to create-ambulance
  create-turtles 1 [ set color orange set size 4 set shape "ambulance" setxy -2 3]
  view2.5d:update-turtle-view "Test" turtles
end

  1. Open the model
  2. Run the setup procedure
  3. Import the ambulance shape
  1. Open the Turtle Shapes Editor from the Tools menu
  2. Click on Import from Library ...
  3. Click on the ambulance entry
  4. Click Import
  1. Run the create-ambulance procedure

Result is

NetLogo is unable to supply you with more details about this error. Please report the problem
at https://github.com/NetLogo/NetLogo/issues, or to [email protected], and paste the
contents of this window into your report.

com.jogamp.opengl.GLException: Caught NullPointerException: null 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)

...

view2.5d:turtle-view raises NullPointerExceptation error

I want to show the property of turtles using 2.5d-view, but it always gives NullPointerExceptation error.
e.g. the following simple codes.

extensions [view2.5d]

turtles-own[
energy
]

to setup
ca
create-turtles 50[
set color red
setxy random-xcor random-ycor
set energy random 1000
]
create-turtles 50[
set energy random 1000
setxy random-xcor random-ycor
]
view2.5d:turtle-view "test" turtles [the-turtle -> [energy] of the-turtle]
reset-ticks
end

NullPointerException when deleting a shape and closing/opening a turtle view

Using the sample model from issue #11, update it to extract the view2.5d turtle view setup like below, to be able to call it stand-alone:

to setup-turtle-view
  ; Set up a Turtle view
  view2.5d:turtle-view "Turtle View 1" turtles [ the-turtle -> [.2 * abs xcor] of the-turtle ]
  wait 1
  view2.5d:set-observer-distance "Turtle View 1" 40

  view2.5d:set-z-scale "Turtle View 1" 2
  view2.5d:set-observer-angles "Turtle View 1" 25 30
  ;; increase the stem thickness
  view2.5d:set-turtle-stem-thickness "Turtle View 1" .2
  view2.5d:update-turtle-view "Turtle View 1" turtles
end

I then could produce an exception reliably with these steps:

  • I ran setup then create-arrow and confirmed things looked good in both views.
  • I went into the shapes editor and deleted the arrow shape and things updated in both views.
  • I closed the turtle view.
  • I ran setup-turtle-view in the command center, and got the below exception.
NetLogo is unable to supply you with more details about this error.  Please report the problem
 at https://github.com/NetLogo/NetLogo/issues, or to [email protected], and paste the
contents of this window into your report.


com.jogamp.opengl.GLException: Caught NullPointerException: null 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 sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
 at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:64)
 at sun.awt.RepaintArea.paint(RepaintArea.java:240)
 at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:584)
 at java.awt.Component.dispatchEventImpl(Component.java:4965)
 at java.awt.Component.dispatchEvent(Component.java:4711)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
 at java.awt.EventQueue.access$500(EventQueue.java:97)
 at java.awt.EventQueue$3.run(EventQueue.java:709)
 at java.awt.EventQueue$3.run(EventQueue.java:703)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
 at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
 at java.awt.EventQueue$4.run(EventQueue.java:733)
 at java.awt.EventQueue$4.run(EventQueue.java:731)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NullPointerException
 at view25d.view.gl.TurtleGL.display(TurtleGL.java:154)
 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)
 ... 29 more

NetLogo 6.2.0
main: org.nlogo.app.AppFrame
thread: AWT-EventQueue-0
OpenJDK 64-Bit Server VM 1.8.0_292 (BellSoft; 1.8.0_292-b10)
operating system: Linux 5.8.0-50-generic (amd64 processor)
Scala version 2.12.12
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: test-25dshape-change

08:13:56.408 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
08:13:56.401 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
08:13:56.399 AddJobEvent (org.nlogo.app.common.CommandLine) AWT-EventQueue-0
08:13:56.399 OutputEvent (org.nlogo.app.common.CommandLine) AWT-EventQueue-0
08:13:56.399 CompiledEvent (org.nlogo.window.CompilerManager) AWT-EventQueue-0
08:13:56.394 CompileMoreSourceEvent (org.nlogo.app.common.CommandLine) AWT-EventQueue-0
08:13:56.237 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
08:13:56.037 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
08:13:55.836 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
08:13:55.636 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0

Interestingly, the shape delete is necessary to reproduce the error. Just closing the turtle view isn't enough to trigger it, if you re-run the setup-turtle-view without deleting the shape it'll complete just fine. This error was found with the PR for issue #11 merged, as well as with the bundled version in NetLogo 6.2.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.