NetLogo/NetLogo — Issue #5: let + nested scopes + run/runresult of task = error
Author: SethTisue
Created: 2011-10-29 19:00:06+00:00
State: open

```
to bomb
ca crt 1
ask turtles [
let c 0
ask self [ set label task [c] ]
__ignore runresult label
]
end
```

It bombs running the task, trying to access `c`

the outer `ask` can equally well be a `foreach`

```
error (NullPointerException)
while observer running ASK
called by procedure BOMB
called by Button 'bomb'

java.lang.NullPointerException
at org.nlogo.nvm.Context.getLet(Context.java:278)
at org.nlogo.nvm.Context.getLet(Context.java:278)
at org.nlogo.prim._asm_procedurebomb_letvariable_6.report(:1)
at org.nlogo.nvm.ReporterTask.report(Task.scala:51)
at org.nlogo.prim.etc._runresult.report(_runresult.scala:51)
at org.nlogo.prim.etc._ignore.perform(_ignore.java:24)
at org.nlogo.nvm.Context.runExclusive(Context.java:118)
at org.nlogo.nvm.ExclusiveJob.run(ExclusiveJob.java:54)
at org.nlogo.nvm.Context.runExclusiveJob(Context.java:160)
at org.nlogo.prim._asm_procedurebomb_ask_1.perform(:1)
at org.nlogo.nvm.Context.stepConcurrent(Context.java:90)
at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.java:80)
at org.nlogo.job.JobThread.org$nlogo$job$JobThread$$runPrimaryJobs(JobThread.scala:125)
```