HeadlessChildModel instances not being disposed of and headless model viewer displaying wrong child model
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia esaminando i riferimenti a HeadlessChildModel attorno al gestore del modello sottostante, al visualizzatore del modello e ai flussi ls:show e ls:reset descritti nell’issue. Usa l’heap dump allegato e la sequenza indicata come input per l’indagine; il lavoro è concluso quando le istanze duplicate sono comprese e il visualizzatore e il modello in esecuzione fanno riferimento in modo coerente al modello figlio previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Scala
- Stelle
- 20
- Fork
- 8
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NetLogo/LevelSpace
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
NetLogo/LevelSpace#151 · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
NetLogo/LevelSpace#141 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
NetLogo/LevelSpace#134 · 2 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
NetLogo/LevelSpace#133 · 4 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
NetLogo/LevelSpace#132 · 3 commenti ·
Tutte le issue di NetLogo/LevelSpace
Issue simili
-
RS_PixelAsPoint raises out of grid where RS_PixelAsCentroid and RS_PixelAsPolygon extrapolate Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Area: Excel support
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
orbeon/orbeon-forms#7893 ·
-
x:action/fix x:module/practice-exercise x:size/small
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
lichess-org/lila#21788 · 2 commenti ·
-
area:Iceberg area:writer documentation requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/datafusion-comet#6147 ·