Skip to content

Loading and closing a model sometimes throws an NPE #50

@qiemem

Description

@qiemem

It's very sporadic... and could have something to do with GCs. It seemed to happen when I forced a GC... sometimes... Very strange. Also might happen more frequently when the child model is opening a child model.

Here's the stack:

org.nlogo.nvm.EngineException: Extension exception: java.lang.NullPointerException
 at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
 at java.util.concurrent.FutureTask.get(FutureTask.java:83)
 at ChildModel.waitFor(ChildModel.java:308)
 at ChildModel.runUISafely(ChildModel.java:274)
 at GUIChildModel.<init>(GUIChildModel.java:24)
 at LevelsSpace$LoadModel.perform(LevelsSpace.java:180)
 at org.nlogo.prim._extern.perform(_extern.java:54)
 at org.nlogo.nvm.Context.stepConcurrent(Context.java:91)
 at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.java:82)
 at org.nlogo.job.JobThread.org$nlogo$job$JobThread$$runPrimaryJobs(JobThread.scala:143)
 at org.nlogo.job.JobThread$$anonfun$run$1.apply$mcV$sp(JobThread.scala:78)
 at org.nlogo.job.JobThread$$anonfun$run$1.apply(JobThread.scala:76)
 at org.nlogo.job.JobThread$$anonfun$run$1.apply(JobThread.scala:76)
 at scala.util.control.Exception$Catch.apply(Exception.scala:88)
 at org.nlogo.util.Exceptions$.handling(Exceptions.scala:41)
 at org.nlogo.job.JobThread.run(JobThread.scala:75)

I don't see anything in innerGet that could cause it.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions