HeadlessChildModel instances not being disposed of and headless model viewer displaying wrong child model
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza examinando las referencias a HeadlessChildModel alrededor del gestor del modelo subyacente, el visor de modelos y los flujos ls:show y ls:reset descritos en el issue. Usa el volcado de heap adjunto y la secuencia indicada como entradas para la investigación; se considera terminado cuando se entienden las instancias duplicadas y el visor y el modelo en ejecución hacen referencia de forma coherente al modelo hijo previsto.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Mostly opening this to document a weird state I've arrived in. I don't have repro steps, but will update if I can figure them out. If I had to guess at repro steps, it would be something like:
- Run a model with a headless child model.
ls:show 0to view the world state.- With that open, edit the code of the child model (opened with the LevelSpace menu)
- Maybe something like do
ls:resetand rerun model with the viewer still open? Basically, having a bunch of ways of having the child model be referenced and then doing things that might change one reference but not the others.
I arrived at a state where an instance of a headless child model being used by the model and the one displayed with ls:show are different. The child model's command center seemed to talk to the same instance that the model used, as can be seen here:

Note that the world size seen in the view is the world size the child model has on initial load, but then it changes when run.
Looking at a heap dump, we see that there are, in fact, 6 instance of HeadlessChildModel:

HeadlessChildModel#5 appears to be the one used by the model and the command center, as indicated by the number of turtles in its world (the command center indicated 11 turtles, as did running [ count turtles ] ls:of 0 in the parent model):

HeadlessChildModel#6 appears to be used by the backing model manager:

but also seems to have agents in it:

I haven't been able to figure out which headless model is the one actually being displayed by the model viewer, but the heapdump is attached.
- Lenguaje dominante
- Scala
- Estrellas
- 20
- Forks
- 8
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NetLogo/LevelSpace
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
NetLogo/LevelSpace#151 · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
NetLogo/LevelSpace#141 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
NetLogo/LevelSpace#134 · 2 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
NetLogo/LevelSpace#133 · 4 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
NetLogo/LevelSpace#132 · 3 comentarios ·
Todos los issues de NetLogo/LevelSpace
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
com-lihaoyi/mill#7776 ·
Los mantenedores suelen responder en 1 día
-
Module: Form Builder
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
orbeon/orbeon-forms#7943 ·
Los mantenedores suelen responder en 2 días
-
module: core
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
bigbluebutton/bigbluebutton#26028 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
lambdaworks/zio-elasticsearch#869 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bazel-contrib/rules_scala#2018 ·
Los mantenedores suelen responder en 2 días