{"action":"created","issue":{"url":"https://api.github.com/repos/colinsheppard/time/issues/43","labels_url":"https://api.github.com/repos/colinsheppard/time/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/colinsheppard/time/issues/43/comments","events_url":"https://api.github.com/repos/colinsheppard/time/issues/43/events","html_url":"https://github.com/colinsheppard/time/issues/43","id":111189516,"number":43,"title":"time:go creates NullPointerException error","user":{"login":"MHX792","id":12123471,"avatar_url":"https://avatars.githubusercontent.com/u/12123471?v=3","gravatar_id":"","url":"https://api.github.com/users/MHX792","html_url":"https://github.com/MHX792","followers_url":"https://api.github.com/users/MHX792/followers","following_url":"https://api.github.com/users/MHX792/following{/other_user}","gists_url":"https://api.github.com/users/MHX792/gists{/gist_id}","starred_url":"https://api.github.com/users/MHX792/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MHX792/subscriptions","organizations_url":"https://api.github.com/users/MHX792/orgs","repos_url":"https://api.github.com/users/MHX792/repos","events_url":"https://api.github.com/users/MHX792/events{/privacy}","received_events_url":"https://api.github.com/users/MHX792/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-13T14:17:00Z","updated_at":"2016-01-02T18:13:22Z","closed_at":"2016-01-02T17:07:25Z","body":"My code:\r\n```NetLogo\r\nextensions [\r\n  time\r\n]\r\n\r\nto setup\r\n  ca\r\n  create-turtles 5\r\n  time:schedule-event turtles (task fd) 10\r\n  time:schedule-event (turtle 1) (task fd) 5\r\nend\r\n```\r\n\r\nThe error that appears both in NetLogo 5.0.4 and 5.2:\r\n```NetLogo\r\nerror (NullPointerException)\r\n while observer running TIME:GO\r\n  called by procedure GO\r\n  called by Button 'go'\r\n\r\nNetLogo is unable to supply you with more details about this error.  Please report the problem\r\nat https://github.com/NetLogo/NetLogo/issues, or to bugs@ccl.northwestern.edu, and paste the\r\ncontents of this window into your report.\r\n\r\njava.lang.NullPointerException\r\n at TimeExtension$LogoSchedule.performScheduledTasks(TimeExtension.java:593)\r\n at TimeExtension$LogoSchedule.performScheduledTasks(TimeExtension.java:578)\r\n at TimeExtension$Go.perform(TimeExtension.java:1655)\r\n at org.nlogo.prim._extern.perform(_extern.java:54)\r\n at org.nlogo.nvm.Context.stepConcurrent(Context.java:91)\r\n at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.java:82)\r\n at org.nlogo.job.JobThread.org$nlogo$job$JobThread$$runPrimaryJobs(JobThread.scala:143)\r\n at org.nlogo.job.JobThread$$anonfun$run$1.apply$mcV$sp(JobThread.scala:78)\r\n at org.nlogo.job.JobThread$$anonfun$run$1.apply(JobThread.scala:76)\r\n at org.nlogo.job.JobThread$$anonfun$run$1.apply(JobThread.scala:76)\r\n at scala.util.control.Exception$Catch.apply(Exception.scala:88)\r\n at org.nlogo.util.Exceptions$.handling(Exceptions.scala:41)\r\n at org.nlogo.job.JobThread.run(JobThread.scala:75)\r\n\r\nNetLogo 5.0.4\r\nmain: org.nlogo.app.AppFrame\r\nthread: JobThread\r\nJava HotSpot(TM) 64-Bit Server VM 1.6.0_65 (Apple Inc.; 1.6.0_65-b14-466.1-11M4716)\r\noperating system: Mac OS X 10.10.5 (x86_64 processor)\r\nScala version 2.9.2\r\nJOGL: (3D View not initialized)\r\nOpenGL Graphics: (3D View not initialized)\r\nmodel: DES test 5.0.4\r\n\r\n04:14:41.545 SwitchedTabsEvent (org.nlogo.app.Tabs) AWT-EventQueue-0\r\n04:14:41.542 RuntimeErrorEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0\r\n04:14:41.542 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0\r\n04:14:41.542 AddJobEvent (org.nlogo.window.ButtonWidget) AWT-EventQueue-0\r\n04:14:41.399 InputBoxLoseFocusEvent (org.nlogo.window.ButtonWidget) AWT-EventQueue-0\r\n04:14:41.374 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0\r\n04:14:41.174 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0\r\n04:14:40.973 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0\r\n04:14:40.745 JobRemovedEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) JobThread\r\n04:14:40.701 PeriodicUpdateEvent (org.nlogo.app.App$$anon$1 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0\r\n```"},"comment":{"url":"https://api.github.com/repos/colinsheppard/time/issues/comments/168413399","html_url":"https://github.com/colinsheppard/time/issues/43#issuecomment-168413399","issue_url":"https://api.github.com/repos/colinsheppard/time/issues/43","id":168413399,"user":{"login":"SethTisue","id":161079,"avatar_url":"https://avatars.githubusercontent.com/u/161079?v=3","gravatar_id":"","url":"https://api.github.com/users/SethTisue","html_url":"https://github.com/SethTisue","followers_url":"https://api.github.com/users/SethTisue/followers","following_url":"https://api.github.com/users/SethTisue/following{/other_user}","gists_url":"https://api.github.com/users/SethTisue/gists{/gist_id}","starred_url":"https://api.github.com/users/SethTisue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SethTisue/subscriptions","organizations_url":"https://api.github.com/users/SethTisue/orgs","repos_url":"https://api.github.com/users/SethTisue/repos","events_url":"https://api.github.com/users/SethTisue/events{/privacy}","received_events_url":"https://api.github.com/users/SethTisue/received_events","type":"User","site_admin":false},"created_at":"2016-01-02T18:13:22Z","updated_at":"2016-01-02T18:13:22Z","body":"unfortunately https://github.com/NetLogo/NetLogo/blob/5.x/src/main/org/nlogo/api/Task.scala doesn't have offer a method for that — I imagine a patch adding one would be accepted.\r\n\r\nbut you can work around it by casting to `org.nlogo.nvm.Task` ([source](https://github.com/NetLogo/NetLogo/blob/5.x/src/main/org/nlogo/nvm/Task.scala)) then calling `.formals.size` (Scala) or `.formals().size()` (Java)"}}