Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent.getCoords is not a function -- mysterious error message #363

Closed
ToonTalk opened this issue Mar 25, 2017 · 3 comments
Closed

agent.getCoords is not a function -- mysterious error message #363

ToonTalk opened this issue Mar 25, 2017 · 3 comments
Labels

Comments

@ToonTalk
Copy link

Reproducible by going to

https://www.netlogoweb.org/web?https://m4a-gae.appspot.com/p/SJKz6u-2ciF8Za5hYlWI4f.nlogo

And entering in the command center:

random-seed 1

Click setup
Click go
At tick 275 I get

agent.getCoords is not a function

Note that the executable has a more reasonable error (though it provides no help localising the bad code):

DISTANCE expected input to be an agent but got the number 0 instead.

org.nlogo.nvm.ArgumentTypeException: DISTANCE expected input to be an agent but got the number 0 instead.
at org.nlogo.nvm.AnonymousCommand.perform(AnonymousProcedure.scala:150)
at org.nlogo.nvm.AnonymousCommand.perform(AnonymousProcedure.scala:133)
at org.nlogo.prim.etc._foreach.perform(_foreach.scala:35)
at org.nlogo.nvm.Context.runExclusive(Context.java:135)
at org.nlogo.nvm.ExclusiveJob.run(ExclusiveJob.scala:39)
at org.nlogo.nvm.Context.runExclusiveJob(Context.java:181)
at org.nlogo.prim._asm_proceduregountil_ask_27.perform(:1)
at org.nlogo.nvm.Context.callReporterProcedure(Context.java:258)
at org.nlogo.prim._asm_procedurego_if_0.perform(:2)
at org.nlogo.nvm.Context.stepConcurrent(Context.java:107)
at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.scala:65)
at org.nlogo.job.JobThread.runPrimaryJobs(JobThread.scala:133)
at org.nlogo.job.JobThread.$anonfun$run$1(JobThread.scala:68)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at scala.util.control.Exception$Catch.apply(Exception.scala:224)
at org.nlogo.api.Exceptions$.handling(Exceptions.scala:41)
at org.nlogo.job.JobThread.run(JobThread.scala:66)

NetLogo 6.0.1
main: org.nlogo.app.AppFrame
thread: JobThread
Java HotSpot(TM) 64-Bit Server VM 1.8.0_121 (Oracle Corporation; 1.8.0_121-b13)
operating system: Windows 7 6.1 (amd64 processor)
Scala version 2.12.1
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: i-U6uukZbnD3ItqZhgY34a

03:54:25.052 RuntimeErrorEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
03:54:24.878 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
03:54:24.878 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
03:54:24.878 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
03:54:24.878 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
03:54:24.674 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
03:54:24.674 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
03:54:24.674 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
03:54:24.674 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
03:54:24.470 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0

@TheBizzle
Copy link
Member

Yeah, this is a known problem with NetLogo Web's runtime typechecking (in that it often doesn't exist). I thought we had an issue open on this, but we didn't, for some reason. Consequently, I've opened NetLogo/Tortoise#184 for this. Closing this as "moved".

@ToonTalk
Copy link
Author

I find it very unclear when issues should go to Tortoise and when to Galapagos. They are described on the NetLogo GitHub page as

Galapagos
web-based NetLogo (aka Tortoise + Beak)

and

Tortoise
JavaScript-based runtime for NetLogo

@TheBizzle
Copy link
Member

Well it doesn't really bother me when someone opens an issue in one repo and I find it more appropriate to put it to the other repo. Where the error is coming from is not something that I expect third parties to be aware of, and often involves some investigation even on my part to find out what the relevant code is.

But, to somewhat clarify the difference between the two, Tortoise houses the NetLogo Web compiler and simulation engine. Using that stuff, it is entirely possible to run NetLogo Web models without a GUI. Galapagos adds the GUI and all the actual web machinery.

I feel like actual bugs in Galapagos are somewhat rare, since Galapagos is largely just the UI that stands between Tortoise and the user. Mostly, if it's a bug from Galapagos, then it's some sort of user interface/display issue. We tend to see far more errors in the actual computations of model states (a la Tortoise), and that's why a lot of tickets get moved over there.

But, anyway, it really is no big deal to me to be moving issues, and I don't expect other people to accurately predict ahead of time where one should go.

Thank you for your reports, regardless of which repos they end up in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants