NetLogo / LevelSpace

This is the LevelSpace extension repository. LevelSpace allows you to run NetLogo models |: from inside NetLogo models :|
Other
19 stars 8 forks source link

Bytecode generator is not getting turned back on after a child model loads #143

Closed qiemem closed 1 year ago

qiemem commented 2 years ago

To reproduce, create a new model with

extensions [ ls profiler ]

Then in the command center run:

profiler:start profiler:stop profiler:reset

No error occurs.

Then run:

ls:create-models 1 user-file

and pick any model in the dialog that opens.

Then run

profiler:start

You get an error that states:

Extension exception: The profiler extension requires the NetLogo bytecode generator, which is currently turned off. See the org.nlogo.noGenerator property.
error while observer running PROFILER:START
  called by Command Center

See this comment: https://github.com/NetLogo/LevelSpace/blob/50bd9da2a6f6c68f9be6b6f35118976da0a9de00/src/main/ChildModel.scala#L96

qiemem commented 2 years ago

Wait I'm so confused how was this ever working: https://github.com/NetLogo/LevelSpace/blob/50bd9da2a6f6c68f9be6b6f35118976da0a9de00/src/main/ChildModel.scala#L92-L93

LaCuneta commented 1 year ago

I reviewed the PR to add the bytecode switcher, so not sure how I missed this issue. I have this fixed in this commit. I released LS 2.3.4 to the extensions manager for anyone encountering it.