gama-platform/gama.old

NullPointerException when inspecting an agent

lesquoyb opened this issue · 1 comments

Describe the bug
I have a simulation in which when I inspect an agent and let it run enough time it will give me NPE on code lines that use the list of agent of its species to do some operations.
I tried to isolate the problem but it seems that the model has to be a bit complex for it to show up so I guess it's related to thread scheduling.
So here is the model

an example of error I can get when I inspect an inhabitant:

2 occurrences in 2 agents at cycle 5155: Java error: nil value detected
in Simulation 0
in int nb_inhabitants <- 0 update: length(inhabitant at_distance float(1)) ;
NullPointerException: null
when applying the at_distance operator on inhabitant and 1.0
in agents road678, Simulation 0

To Reproduce
Steps to reproduce the behavior:

  1. run the model
  2. open the inspector for an inhabitant
  3. let it run a bit
  4. See error

Expected behavior
No NPE

fixed with the recent commits I think, can't reproduce anymore on git version but still on the old release