Closed LennyNihilius closed 2 years ago
Hi Lenny, We are sorry you have encountered this error. Thanks for sending us the debug information.
I will first make some suggestions for non-debugging steps to approach the problem. I will then explain “position 55”
First I would try to simplify the problem. Presumably you are exploring a range of values for some parameters. Test a new experiment that does what the successful run does. If you have your experiment saved with the model: Select BehaviorSearch from Tools menu Select the experiment Select Duplicate Change Experiment name Change variables to have a single value, not a range Set repetitions 1
If that works, you can explore which circumstances cause the error. If not, you have simplified the debugging.
If you want to look for possible culprits in your NetLogo code, The first part of the error message means: This isn't something you can use "set" on. This is a runtime error, so whatever you were using set on was acceptible to the compiler..Is there anywhere you are using set to change the type of some object?
At that point if you still have a problem and are willing to share your model we may be able to help you further.
Position in brief: The position usually refers to a location in a file, but in this case the filename is empty, so it may be internal to the code. Anyway there is no simple way to make use of it. However if you want to put debugging statements in code, the following sections tells you where to start.
OK, if you want some nitty gritty here it is. This may be TMI (too much information)
Firstly, you seem to be using a Chinese locale. I don’t know Chinese, so I found the equivalent English error message. compiler.SetVisitor.notSettable = This isn't something you can use "set" on. compiler.SetVisitor.notSettable = 不能对其使用set
This error is thrown in the file ./netlogo-core/src/main/compile/middle/SetVisitor.scala and the stack trace tells us where:
This is the relevant code:
private lazy val INVALID_SET = core.I18N.errors.get("compiler.SetVisitor.notSettable") override def visitStatement(stmt: Statement) { super.visitStatement(stmt) if(stmt.command.isInstanceOf[_set]) { val rApp = stmt.args.head.asInstanceOf[ReporterApp] val cmdTransformer = (SetVisitor.classes ++ programClasses) .get(rApp.reporter.getClass) .getOrElse(exception(INVALID_SET, stmt)) // ** This is line 28 val newCommand = cmdTransformer(rApp.reporter) newCommand.copyMetadataFrom(stmt.command) stmt.command = newCommand stmt.removeArgument(0) } }
So if you wanted to print out some debugging info you could print stmt, rApp, (SetVisitor.classes ++ programClasses), (SetVisitor.classes ++ programClasses).get(rApp.reporter.getClass) etc
If you want to know how position gets into the error message:
The final element of the stack trace is at org.nlogo.core.Fail$.exception(Fail.scala:27)
./parser-core/src/main/core/Fail.scala defines the following exception: def exception(message: String, start: Int, end: Int, filename: String): Nothing = throw new CompilerException(message, start, end, filename)
CompilerException is found in ./parser-core/src/main/core/CompilerException.scala
extends RuntimeException(message) { def this(token: Token) = this(token.ensuring(_.tpe == TokenType.Bad).value.asInstanceOf[String], token.start, token.end, token.filename)
override def toString = getMessage + " at position " + start + " in " + filename }
That is where the " at position 55 in" part of the message comes from. Evidently the filename is empty, so this must be a place internal to NetLogo code.
Aaron Brandes, Software Developer Center for Connected Learning and Computer-Based Modeling
From: Lenny Nihilius @.> Reply-To: NetLogo/NetLogo @.> Date: Thursday, April 21, 2022 at 5:19 AM To: NetLogo/NetLogo @.> Cc: Subscribed @.> Subject: [NetLogo/NetLogo] NetLogo behavior space internal error (Issue #2026)
I'm using netlogo to build a model for my dissertation, and it runs successfully while using set-up and go. But when I turn to behavior space, I got such error and I can't find much more details from google. My question is, what does "position 55" means? If it means the code line 55, this error still shows up after annotating that line.
NetLogo is unable to supply you with more details about this error. Please report the problem at https://github.com/NetLogo/NetLogo/issueshttps://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues__;!!Dq0X2DkFhyF93HkjWTBQKhk!GKJu0QLuBAUtQu1uhbkKpFRQR2xfF-e_OuucX6VD6yBWYGt0c1a-W9H2rplf7yivDxQVJfKNcg$, or to @.**@.>, and paste the contents of this window into your report.
不能对其使用set. at position 55 in at org.nlogo.core.Fail$.exception(Fail.scala:27) at org.nlogo.core.Fail$.exception(Fail.scala:25) at org.nlogo.core.Fail$.exception(Fail.scala:23) at org.nlogo.compile.middle.SetVisitor.$anonfun$visitStatement$1(SetVisitor.scala:28) at scala.Option.getOrElse(Option.scala:189) at org.nlogo.compile.middle.SetVisitor.visitStatement(SetVisitor.scala:28) at org.nlogo.compile.api.Statement.accept(AstNode.scala:94) at org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1(AstVisitor.scala:32) at org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1$adapted(AstVisitor.scala:32) at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62) at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49) at org.nlogo.compile.api.DefaultAstVisitor.visitStatements(AstVisitor.scala:32) at org.nlogo.compile.api.Statements.accept(AstNode.scala:70) at org.nlogo.compile.api.DefaultAstVisitor.visitProcedureDefinition(AstVisitor.scala:27) at org.nlogo.compile.api.ProcedureDefinition.accept(AstNode.scala:50) at org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3(MiddleEnd.scala:47) at org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3$adapted(MiddleEnd.scala:40) at scala.collection.immutable.List.foreach(List.scala:431) at org.nlogo.compile.middle.MiddleEnd$.middleEnd(MiddleEnd.scala:40) at org.nlogo.compile.CompilerMain$.compile(CompilerMain.scala:61) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:85) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:100) at org.nlogo.workspace.Evaluator.invokeCompiler(Evaluator.scala:159) at org.nlogo.workspace.Evaluator.evaluateCommands(Evaluator.scala:20) at org.nlogo.workspace.Evaluating.command(Evaluating.scala:80) at org.nlogo.workspace.Evaluating.command$(Evaluating.scala:79) at org.nlogo.workspace.AbstractWorkspaceScala.command(AbstractWorkspaceScala.scala:26) at org.nlogo.headless.HeadlessModelOpener.finish(HeadlessModelOpener.scala:112) at org.nlogo.headless.HeadlessModelOpener.openFromModel(HeadlessModelOpener.scala:74) at org.nlogo.headless.HeadlessWorkspace.openModel(HeadlessWorkspace.scala:550) at org.nlogo.api.Workspace.openModel(Workspace.scala:66) at org.nlogo.app.App$$anon$1.openCurrentModelIn(App.scala:133) at org.nlogo.lab.gui.Supervisor.$anonfun$start$1(Supervisor.scala:119) at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:158) at org.nlogo.lab.gui.Supervisor.start(Supervisor.scala:117) at org.nlogo.lab.gui.ManagerDialog.run(ManagerDialog.scala:103) at org.nlogo.lab.gui.ManagerDialog.$anonfun$runAction$1(ManagerDialog.scala:30) at org.nlogo.lab.gui.ManagerDialog$$anon$1.actionPerformed(ManagerDialog.scala:24) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
NetLogo 6.2.1 main: org.nlogo.app.AppFrame thread: AWT-EventQueue-0 OpenJDK 64-Bit Server VM 1.8.0_275 (BellSoft; 1.8.0_275-b01) operating system: Windows 10 10.0 (amd64 processor) Scala version 2.12.12 JOGL: (3D View not initialized) OpenGL Graphics: (3D View not initialized) model: 1代模型
05:06:07.293 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026__;!!Dq0X2DkFhyF93HkjWTBQKhk!GKJu0QLuBAUtQu1uhbkKpFRQR2xfF-e_OuucX6VD6yBWYGt0c1a-W9H2rplf7yivDxQ54eViYw$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2S7TCCNQJJCS3N5RILVGEMQPANCNFSM5T6S3IMA__;!!Dq0X2DkFhyF93HkjWTBQKhk!GKJu0QLuBAUtQu1uhbkKpFRQR2xfF-e_OuucX6VD6yBWYGt0c1a-W9H2rplf7yivDxTZpfjEGg$. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi Mr.Brandes, Thank you for your detailed reply, which do helped me understand further about this error and "position 55".
Firstly, I followed your suggestions and created a duplicate with default setting, which do simplified the problem. Running that duplicate returned the same error, which means there must be some internal problem in the code itself.
Secondly, I checked all the assignment instructions using "set", but it seems nothing wrong obviously. I also checked "self" and "myself" which would also cause the same error information from Google search, but it didn't help. Would that error caused by some hidden limitation like too much decimal digits of some parameters? Some parameters have 3-4 digits after the decimal point. And I also used some matrices.
Model file has been attached to this email. I'd be so grateful if you would like to help dealing with the probelm.
Lenny Nihilius, undergraduate student Information Management and Information System, School of econimics and management, Beijing Jiaotong University
Aaron Brandes @.***> 于2022年4月21日周四 23:42写道:
Hi Lenny, We are sorry you have encountered this error. Thanks for sending us the debug information.
I will first make some suggestions for non-debugging steps to approach the problem. I will then explain “position 55”
First I would try to simplify the problem. Presumably you are exploring a range of values for some parameters. Test a new experiment that does what the successful run does. If you have your experiment saved with the model: Select BehaviorSearch from Tools menu Select the experiment Select Duplicate Change Experiment name Change variables to have a single value, not a range Set repetitions 1
If that works, you can explore which circumstances cause the error. If not, you have simplified the debugging.
If you want to look for possible culprits in your NetLogo code, The first part of the error message means: This isn't something you can use "set" on. This is a runtime error, so whatever you were using set on was acceptible to the compiler..Is there anywhere you are using set to change the type of some object?
At that point if you still have a problem and are willing to share your model we may be able to help you further.
Position in brief: The position usually refers to a location in a file, but in this case the filename is empty, so it may be internal to the code. Anyway there is no simple way to make use of it. However if you want to put debugging statements in code, the following sections tells you where to start.
OK, if you want some nitty gritty here it is. This may be TMI (too much information)
Firstly, you seem to be using a Chinese locale. I don’t know Chinese, so I found the equivalent English error message. compiler.SetVisitor.notSettable = This isn't something you can use "set" on. compiler.SetVisitor.notSettable = 不能对其使用set
This error is thrown in the file ./netlogo-core/src/main/compile/middle/SetVisitor.scala and the stack trace tells us where:
This is the relevant code:
private lazy val INVALID_SET = core.I18N.errors.get("compiler.SetVisitor.notSettable") override def visitStatement(stmt: Statement) { super.visitStatement(stmt) if(stmt.command.isInstanceOf[_set]) { val rApp = stmt.args.head.asInstanceOf[ReporterApp] val cmdTransformer = (SetVisitor.classes ++ programClasses) .get(rApp.reporter.getClass) .getOrElse(exception(INVALID_SET, stmt)) // ** This is line 28 val newCommand = cmdTransformer(rApp.reporter) newCommand.copyMetadataFrom(stmt.command) stmt.command = newCommand stmt.removeArgument(0) } }
So if you wanted to print out some debugging info you could print stmt, rApp, (SetVisitor.classes ++ programClasses), (SetVisitor.classes ++ programClasses).get(rApp.reporter.getClass) etc
If you want to know how position gets into the error message:
The final element of the stack trace is at org.nlogo.core.Fail$.exception(Fail.scala:27)
./parser-core/src/main/core/Fail.scala defines the following exception: def exception(message: String, start: Int, end: Int, filename: String): Nothing = throw new CompilerException(message, start, end, filename)
CompilerException is found in ./parser-core/src/main/core/CompilerException.scala
extends RuntimeException(message) { def this(token: Token) = this(token.ensuring(_.tpe == TokenType.Bad).value.asInstanceOf[String], token.start, token.end, token.filename)
override def toString = getMessage + " at position " + start + " in " + filename }
That is where the " at position 55 in" part of the message comes from. Evidently the filename is empty, so this must be a place internal to NetLogo code.
- Aaron
Aaron Brandes, Software Developer Center for Connected Learning and Computer-Based Modeling
From: Lenny Nihilius @.> Reply-To: NetLogo/NetLogo @.> Date: Thursday, April 21, 2022 at 5:19 AM To: NetLogo/NetLogo @.> Cc: Subscribed @.> Subject: [NetLogo/NetLogo] NetLogo behavior space internal error (Issue
2026)
I'm using netlogo to build a model for my dissertation, and it runs successfully while using set-up and go. But when I turn to behavior space, I got such error and I can't find much more details from google. My question is, what does "position 55" means? If it means the code line 55, this error still shows up after annotating that line.
NetLogo is unable to supply you with more details about this error. Please report the problem at https://github.com/NetLogo/NetLogo/issues< https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues__;!!Dq0X2DkFhyF93HkjWTBQKhk!GKJu0QLuBAUtQu1uhbkKpFRQR2xfF-e_OuucX6VD6yBWYGt0c1a-W9H2rplf7yivDxQVJfKNcg$>, or to @.**@.>, and paste the contents of this window into your report.
不能对其使用set. at position 55 in at org.nlogo.core.Fail$.exception(Fail.scala:27) at org.nlogo.core.Fail$.exception(Fail.scala:25) at org.nlogo.core.Fail$.exception(Fail.scala:23) at org.nlogo.compile.middle.SetVisitor.$anonfun$visitStatement$1(SetVisitor.scala:28)
at scala.Option.getOrElse(Option.scala:189) at org.nlogo.compile.middle.SetVisitor.visitStatement(SetVisitor.scala:28) at org.nlogo.compile.api.Statement.accept(AstNode.scala:94) at org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1(AstVisitor.scala:32)
at org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1$adapted(AstVisitor.scala:32)
at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62) at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49) at org.nlogo.compile.api.DefaultAstVisitor.visitStatements(AstVisitor.scala:32)
at org.nlogo.compile.api.Statements.accept(AstNode.scala:70) at org.nlogo.compile.api.DefaultAstVisitor.visitProcedureDefinition(AstVisitor.scala:27)
at org.nlogo.compile.api.ProcedureDefinition.accept(AstNode.scala:50) at org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3(MiddleEnd.scala:47)
at org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3$adapted(MiddleEnd.scala:40)
at scala.collection.immutable.List.foreach(List.scala:431) at org.nlogo.compile.middle.MiddleEnd$.middleEnd(MiddleEnd.scala:40) at org.nlogo.compile.CompilerMain$.compile(CompilerMain.scala:61) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:85) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:100) at org.nlogo.workspace.Evaluator.invokeCompiler(Evaluator.scala:159) at org.nlogo.workspace.Evaluator.evaluateCommands(Evaluator.scala:20) at org.nlogo.workspace.Evaluating.command(Evaluating.scala:80) at org.nlogo.workspace.Evaluating.command$(Evaluating.scala:79) at org.nlogo.workspace.AbstractWorkspaceScala.command(AbstractWorkspaceScala.scala:26)
at org.nlogo.headless.HeadlessModelOpener.finish(HeadlessModelOpener.scala:112)
at org.nlogo.headless.HeadlessModelOpener.openFromModel(HeadlessModelOpener.scala:74)
at org.nlogo.headless.HeadlessWorkspace.openModel(HeadlessWorkspace.scala:550) at org.nlogo.api.Workspace.openModel(Workspace.scala:66) at org.nlogo.app.App$$anon$1.openCurrentModelIn(App.scala:133) at org.nlogo.lab.gui.Supervisor.$anonfun$start$1(Supervisor.scala:119) at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:158) at org.nlogo.lab.gui.Supervisor.start(Supervisor.scala:117) at org.nlogo.lab.gui.ManagerDialog.run(ManagerDialog.scala:103) at org.nlogo.lab.gui.ManagerDialog.$anonfun$runAction$1(ManagerDialog.scala:30)
at org.nlogo.lab.gui.ManagerDialog$$anon$1.actionPerformed(ManagerDialog.scala:24)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
NetLogo 6.2.1 main: org.nlogo.app.AppFrame thread: AWT-EventQueue-0 OpenJDK 64-Bit Server VM 1.8.0_275 (BellSoft; 1.8.0_275-b01) operating system: Windows 10 10.0 (amd64 processor) Scala version 2.12.12 JOGL: (3D View not initialized) OpenGL Graphics: (3D View not initialized) model: 1代模型
05:06:07.293 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
— Reply to this email directly, view it on GitHub< https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026__;!!Dq0X2DkFhyF93HkjWTBQKhk!GKJu0QLuBAUtQu1uhbkKpFRQR2xfF-e_OuucX6VD6yBWYGt0c1a-W9H2rplf7yivDxQ54eViYw$>, or unsubscribe< https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2S7TCCNQJJCS3N5RILVGEMQPANCNFSM5T6S3IMA__;!!Dq0X2DkFhyF93HkjWTBQKhk!GKJu0QLuBAUtQu1uhbkKpFRQR2xfF-e_OuucX6VD6yBWYGt0c1a-W9H2rplf7yivDxTZpfjEGg$>.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/NetLogo/NetLogo/issues/2026#issuecomment-1105396653, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSBIKQY4KTEILOWOIFLZX3VGFZMLANCNFSM5T6S3IMA . You are receiving this because you authored the thread.Message ID: @.***>
Hi Lenny, Thanks for your response, and for carefully checking for possible sources of the error. Unfortunately model you attached did not come through, because in my email I forgot to mention that share a .nlogo model file you need to include it in a zip file or change the extension. This is because your reply is handled by a github program that accepts only the following attachment formats: PNG (.png) GIF (.gif) JPEG (.jpg) Log files (.log) Microsoft Word (.docx), Powerpoint (.pptx), and Excel (.xlsx) documents. Text files (.txt) PDFs (.pdf) ZIP (.zip, .gz)
So please change the extension or include it in a zip file and I will take a look. The number of decimal places you are using should not cause any issues. For matrices I hope you were using the ‘matrix’ extension because it is the best way to handle matrices in NetLogo.
Aaron Brandes, Software Developer Center for Connected Learning and Computer-Based Modeling
From: Lenny Nihilius @.> Reply-To: NetLogo/NetLogo @.> Date: Saturday, April 23, 2022 at 12:03 AM To: NetLogo/NetLogo @.> Cc: Aaron Andre Brandes @.>, Comment @.***> Subject: Re: [NetLogo/NetLogo] NetLogo behavior space internal error (Issue #2026)
Hi Mr.Brandes, Thank you for your detailed reply, which do helped me understand further about this error and "position 55".
Firstly, I followed your suggestions and created a duplicate with default setting, which do simplified the problem. Running that duplicate returned the same error, which means there must be some internal problem in the code itself.
Secondly, I checked all the assignment instructions using "set", but it seems nothing wrong obviously. I also checked "self" and "myself" which would also cause the same error information from Google search, but it didn't help. Would that error caused by some hidden limitation like too much decimal digits of some parameters? Some parameters have 3-4 digits after the decimal point. And I also used some matrices.
Model file has been attached to this email. I'd be so grateful if you would like to help dealing with the probelm.
Lenny Nihilius, undergraduate student Information Management and Information System, School of econimics and management, Beijing Jiaotong University
Aaron Brandes @.***> 于2022年4月21日周四 23:42写道:
Hi Lenny, We are sorry you have encountered this error. Thanks for sending us the debug information.
I will first make some suggestions for non-debugging steps to approach the problem. I will then explain “position 55”
First I would try to simplify the problem. Presumably you are exploring a range of values for some parameters. Test a new experiment that does what the successful run does. If you have your experiment saved with the model: Select BehaviorSearch from Tools menu Select the experiment Select Duplicate Change Experiment name Change variables to have a single value, not a range Set repetitions 1
If that works, you can explore which circumstances cause the error. If not, you have simplified the debugging.
If you want to look for possible culprits in your NetLogo code, The first part of the error message means: This isn't something you can use "set" on. This is a runtime error, so whatever you were using set on was acceptible to the compiler..Is there anywhere you are using set to change the type of some object?
At that point if you still have a problem and are willing to share your model we may be able to help you further.
Position in brief: The position usually refers to a location in a file, but in this case the filename is empty, so it may be internal to the code. Anyway there is no simple way to make use of it. However if you want to put debugging statements in code, the following sections tells you where to start.
OK, if you want some nitty gritty here it is. This may be TMI (too much information)
Firstly, you seem to be using a Chinese locale. I don’t know Chinese, so I found the equivalent English error message. compiler.SetVisitor.notSettable = This isn't something you can use "set" on. compiler.SetVisitor.notSettable = 不能对其使用set
This error is thrown in the file ./netlogo-core/src/main/compile/middle/SetVisitor.scala and the stack trace tells us where:
This is the relevant code:
private lazy val INVALID_SET = core.I18N.errors.get("compiler.SetVisitor.notSettable") override def visitStatement(stmt: Statement) { super.visitStatement(stmt) if(stmt.command.isInstanceOf[_set]) { val rApp = stmt.args.head.asInstanceOf[ReporterApp] val cmdTransformer = (SetVisitor.classes ++ programClasses) .get(rApp.reporter.getClass) .getOrElse(exception(INVALID_SET, stmt)) // ** This is line 28 val newCommand = cmdTransformer(rApp.reporter) newCommand.copyMetadataFrom(stmt.command) stmt.command = newCommand stmt.removeArgument(0) } }
So if you wanted to print out some debugging info you could print stmt, rApp, (SetVisitor.classes ++ programClasses), (SetVisitor.classes ++ programClasses).get(rApp.reporter.getClass) etc
If you want to know how position gets into the error message:
The final element of the stack trace is at org.nlogo.core.Fail$.exception(Fail.scala:27)
./parser-core/src/main/core/Fail.scala defines the following exception: def exception(message: String, start: Int, end: Int, filename: String): Nothing = throw new CompilerException(message, start, end, filename)
CompilerException is found in ./parser-core/src/main/core/CompilerException.scala
extends RuntimeException(message) { def this(token: Token) = this(token.ensuring(_.tpe == TokenType.Bad).value.asInstanceOf[String], token.start, token.end, token.filename)
override def toString = getMessage + " at position " + start + " in " + filename }
That is where the " at position 55 in" part of the message comes from. Evidently the filename is empty, so this must be a place internal to NetLogo code.
- Aaron
Aaron Brandes, Software Developer Center for Connected Learning and Computer-Based Modeling
From: Lenny Nihilius @.> Reply-To: NetLogo/NetLogo @.> Date: Thursday, April 21, 2022 at 5:19 AM To: NetLogo/NetLogo @.> Cc: Subscribed @.> Subject: [NetLogo/NetLogo] NetLogo behavior space internal error (Issue
2026)
I'm using netlogo to build a model for my dissertation, and it runs successfully while using set-up and go. But when I turn to behavior space, I got such error and I can't find much more details from google. My question is, what does "position 55" means? If it means the code line 55, this error still shows up after annotating that line.
NetLogo is unable to supply you with more details about this error. Please report the problem at https://github.com/NetLogo/NetLogo/issues<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues*3C__;JQ!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgLMIwwKWg$ https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues__;!!Dq0X2DkFhyF93HkjWTBQKhk!GKJu0QLuBAUtQu1uhbkKpFRQR2xfF-e_OuucX6VD6yBWYGt0c1a-W9H2rplf7yivDxQVJfKNcg$%3E, or to @.**@.>, and paste the contents of this window into your report.
不能对其使用set. at position 55 in at org.nlogo.core.Fail$.exception(Fail.scala:27) at org.nlogo.core.Fail$.exception(Fail.scala:25) at org.nlogo.core.Fail$.exception(Fail.scala:23) at org.nlogo.compile.middle.SetVisitor.$anonfun$visitStatement$1(SetVisitor.scala:28)
at scala.Option.getOrElse(Option.scala:189) at org.nlogo.compile.middle.SetVisitor.visitStatement(SetVisitor.scala:28) at org.nlogo.compile.api.Statement.accept(AstNode.scala:94) at org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1(AstVisitor.scala:32)
at org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1$adapted(AstVisitor.scala:32)
at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62) at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49) at org.nlogo.compile.api.DefaultAstVisitor.visitStatements(AstVisitor.scala:32)
at org.nlogo.compile.api.Statements.accept(AstNode.scala:70) at org.nlogo.compile.api.DefaultAstVisitor.visitProcedureDefinition(AstVisitor.scala:27)
at org.nlogo.compile.api.ProcedureDefinition.accept(AstNode.scala:50) at org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3(MiddleEnd.scala:47)
at org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3$adapted(MiddleEnd.scala:40)
at scala.collection.immutable.List.foreach(List.scala:431) at org.nlogo.compile.middle.MiddleEnd$.middleEnd(MiddleEnd.scala:40) at org.nlogo.compile.CompilerMain$.compile(CompilerMain.scala:61) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:85) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:100) at org.nlogo.workspace.Evaluator.invokeCompiler(Evaluator.scala:159) at org.nlogo.workspace.Evaluator.evaluateCommands(Evaluator.scala:20) at org.nlogo.workspace.Evaluating.command(Evaluating.scala:80) at org.nlogo.workspace.Evaluating.command$(Evaluating.scala:79) at org.nlogo.workspace.AbstractWorkspaceScala.command(AbstractWorkspaceScala.scala:26)
at org.nlogo.headless.HeadlessModelOpener.finish(HeadlessModelOpener.scala:112)
at org.nlogo.headless.HeadlessModelOpener.openFromModel(HeadlessModelOpener.scala:74)
at org.nlogo.headless.HeadlessWorkspace.openModel(HeadlessWorkspace.scala:550) at org.nlogo.api.Workspace.openModel(Workspace.scala:66) at org.nlogo.app.App$$anon$1.openCurrentModelIn(App.scala:133) at org.nlogo.lab.gui.Supervisor.$anonfun$start$1(Supervisor.scala:119) at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:158) at org.nlogo.lab.gui.Supervisor.start(Supervisor.scala:117) at org.nlogo.lab.gui.ManagerDialog.run(ManagerDialog.scala:103) at org.nlogo.lab.gui.ManagerDialog.$anonfun$runAction$1(ManagerDialog.scala:30)
at org.nlogo.lab.gui.ManagerDialog$$anon$1.actionPerformed(ManagerDialog.scala:24)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
NetLogo 6.2.1 main: org.nlogo.app.AppFrame thread: AWT-EventQueue-0 OpenJDK 64-Bit Server VM 1.8.0_275 (BellSoft; 1.8.0_275-b01) operating system: Windows 10 10.0 (amd64 processor) Scala version 2.12.12 JOGL: (3D View not initialized) OpenGL Graphics: (3D View not initialized) model: 1代模型
05:06:07.293 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
— Reply to this email directly, view it on GitHub< https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026__;!!Dq0X2DkFhyF93HkjWTBQKhk!GKJu0QLuBAUtQu1uhbkKpFRQR2xfF-e_OuucX6VD6yBWYGt0c1a-W9H2rplf7yivDxQ54eViYw$%3E, or unsubscribe< https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2S7TCCNQJJCS3N5RILVGEMQPANCNFSM5T6S3IMA__;!!Dq0X2DkFhyF93HkjWTBQKhk!GKJu0QLuBAUtQu1uhbkKpFRQR2xfF-e_OuucX6VD6yBWYGt0c1a-W9H2rplf7yivDxTZpfjEGg$%3E.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/NetLogo/NetLogo/issues/2026#issuecomment-1105396653https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026*issuecomment-1105396653*3E__;IyU!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgI0saRbDg$, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSBIKQY4KTEILOWOIFLZX3VGFZMLANCNFSM5T6S3IMAhttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AYSBIKQY4KTEILOWOIFLZX3VGFZMLANCNFSM5T6S3IMA*3E__;JQ!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgKUNDgVdA$ . You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026*issuecomment-1107355090__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgInKMWdAA$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2SKPGIXRGDSJGUUE3LVGNZA7ANCNFSM5T6S3IMA__;!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgKJd9PSoQ$. You are receiving this because you commented.Message ID: @.***>
Hi Mr.Brandes, Thank you for your kind reply, and I do use the 'matrix' extension to build those matrices.
Here is the zip file containing the model. To make sure you can receive it successfully, I also send a copy to the email address on your Github page.
Thank you so much for your help.
Lenny
Aaron Brandes @.***> 于2022年4月26日周二 00:31写道:
Hi Lenny, Thanks for your response, and for carefully checking for possible sources of the error. Unfortunately model you attached did not come through, because in my email I forgot to mention that share a .nlogo model file you need to include it in a zip file or change the extension. This is because your reply is handled by a github program that accepts only the following attachment formats: PNG (.png) GIF (.gif) JPEG (.jpg) Log files (.log) Microsoft Word (.docx), Powerpoint (.pptx), and Excel (.xlsx) documents. Text files (.txt) PDFs (.pdf) ZIP (.zip, .gz)
So please change the extension or include it in a zip file and I will take a look. The number of decimal places you are using should not cause any issues. For matrices I hope you were using the ‘matrix’ extension because it is the best way to handle matrices in NetLogo.
Thanks, Aaron
Aaron Brandes, Software Developer Center for Connected Learning and Computer-Based Modeling
From: Lenny Nihilius @.> Reply-To: NetLogo/NetLogo @.> Date: Saturday, April 23, 2022 at 12:03 AM To: NetLogo/NetLogo @.> Cc: Aaron Andre Brandes @.>, Comment @.***> Subject: Re: [NetLogo/NetLogo] NetLogo behavior space internal error (Issue #2026)
Hi Mr.Brandes, Thank you for your detailed reply, which do helped me understand further about this error and "position 55".
Firstly, I followed your suggestions and created a duplicate with default setting, which do simplified the problem. Running that duplicate returned the same error, which means there must be some internal problem in the code itself.
Secondly, I checked all the assignment instructions using "set", but it seems nothing wrong obviously. I also checked "self" and "myself" which would also cause the same error information from Google search, but it didn't help. Would that error caused by some hidden limitation like too much decimal digits of some parameters? Some parameters have 3-4 digits after the decimal point. And I also used some matrices.
Model file has been attached to this email. I'd be so grateful if you would like to help dealing with the probelm.
- Lenny
Lenny Nihilius, undergraduate student Information Management and Information System, School of econimics and management, Beijing Jiaotong University
Aaron Brandes @.***> 于2022年4月21日周四 23:42写道:
Hi Lenny, We are sorry you have encountered this error. Thanks for sending us the debug information.
I will first make some suggestions for non-debugging steps to approach the problem. I will then explain “position 55”
First I would try to simplify the problem. Presumably you are exploring a range of values for some parameters. Test a new experiment that does what the successful run does. If you have your experiment saved with the model: Select BehaviorSearch from Tools menu Select the experiment Select Duplicate Change Experiment name Change variables to have a single value, not a range Set repetitions 1
If that works, you can explore which circumstances cause the error. If not, you have simplified the debugging.
If you want to look for possible culprits in your NetLogo code, The first part of the error message means: This isn't something you can use "set" on. This is a runtime error, so whatever you were using set on was acceptible to the compiler..Is there anywhere you are using set to change the type of some object?
At that point if you still have a problem and are willing to share your model we may be able to help you further.
Position in brief: The position usually refers to a location in a file, but in this case the filename is empty, so it may be internal to the code. Anyway there is no simple way to make use of it. However if you want to put debugging statements in code, the following sections tells you where to start.
OK, if you want some nitty gritty here it is. This may be TMI (too much information)
Firstly, you seem to be using a Chinese locale. I don’t know Chinese, so I found the equivalent English error message. compiler.SetVisitor.notSettable = This isn't something you can use "set" on. compiler.SetVisitor.notSettable = 不能对其使用set
This error is thrown in the file ./netlogo-core/src/main/compile/middle/SetVisitor.scala and the stack trace tells us where:
This is the relevant code:
private lazy val INVALID_SET = core.I18N.errors.get("compiler.SetVisitor.notSettable") override def visitStatement(stmt: Statement) { super.visitStatement(stmt) if(stmt.command.isInstanceOf[_set]) { val rApp = stmt.args.head.asInstanceOf[ReporterApp] val cmdTransformer = (SetVisitor.classes ++ programClasses) .get(rApp.reporter.getClass) .getOrElse(exception(INVALID_SET, stmt)) // ** This is line 28 val newCommand = cmdTransformer(rApp.reporter) newCommand.copyMetadataFrom(stmt.command) stmt.command = newCommand stmt.removeArgument(0) } }
So if you wanted to print out some debugging info you could print stmt, rApp, (SetVisitor.classes ++ programClasses), (SetVisitor.classes ++ programClasses).get(rApp.reporter.getClass) etc
If you want to know how position gets into the error message:
The final element of the stack trace is at org.nlogo.core.Fail$.exception(Fail.scala:27)
./parser-core/src/main/core/Fail.scala defines the following exception: def exception(message: String, start: Int, end: Int, filename: String): Nothing = throw new CompilerException(message, start, end, filename)
CompilerException is found in ./parser-core/src/main/core/CompilerException.scala
extends RuntimeException(message) { def this(token: Token) = this(token.ensuring(_.tpe == TokenType.Bad).value.asInstanceOf[String], token.start, token.end, token.filename)
override def toString = getMessage + " at position " + start + " in " + filename }
That is where the " at position 55 in" part of the message comes from. Evidently the filename is empty, so this must be a place internal to NetLogo code.
- Aaron
Aaron Brandes, Software Developer Center for Connected Learning and Computer-Based Modeling
From: Lenny Nihilius @.> Reply-To: NetLogo/NetLogo @.> Date: Thursday, April 21, 2022 at 5:19 AM To: NetLogo/NetLogo @.> Cc: Subscribed @.> Subject: [NetLogo/NetLogo] NetLogo behavior space internal error (Issue
2026)
I'm using netlogo to build a model for my dissertation, and it runs successfully while using set-up and go. But when I turn to behavior space, I got such error and I can't find much more details from google. My question is, what does "position 55" means? If it means the code line 55, this error still shows up after annotating that line.
NetLogo is unable to supply you with more details about this error. Please report the problem at https://github.com/NetLogo/NetLogo/issues<< https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues*3C__;JQ!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgLMIwwKWg$>
or to @.**@.>, and paste the contents of this window into your report.
不能对其使用set. at position 55 in at org.nlogo.core.Fail$.exception(Fail.scala:27) at org.nlogo.core.Fail$.exception(Fail.scala:25) at org.nlogo.core.Fail$.exception(Fail.scala:23) at
org.nlogo.compile.middle.SetVisitor.$anonfun$visitStatement$1(SetVisitor.scala:28)
at scala.Option.getOrElse(Option.scala:189) at org.nlogo.compile.middle.SetVisitor.visitStatement(SetVisitor.scala:28) at org.nlogo.compile.api.Statement.accept(AstNode.scala:94) at
org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1(AstVisitor.scala:32)
at
org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1$adapted(AstVisitor.scala:32)
at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62) at
scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49) at
org.nlogo.compile.api.DefaultAstVisitor.visitStatements(AstVisitor.scala:32)
at org.nlogo.compile.api.Statements.accept(AstNode.scala:70) at
org.nlogo.compile.api.DefaultAstVisitor.visitProcedureDefinition(AstVisitor.scala:27)
at org.nlogo.compile.api.ProcedureDefinition.accept(AstNode.scala:50) at
org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3(MiddleEnd.scala:47)
at
org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3$adapted(MiddleEnd.scala:40)
at scala.collection.immutable.List.foreach(List.scala:431) at org.nlogo.compile.middle.MiddleEnd$.middleEnd(MiddleEnd.scala:40) at org.nlogo.compile.CompilerMain$.compile(CompilerMain.scala:61) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:85) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:100) at org.nlogo.workspace.Evaluator.invokeCompiler(Evaluator.scala:159) at org.nlogo.workspace.Evaluator.evaluateCommands(Evaluator.scala:20) at org.nlogo.workspace.Evaluating.command(Evaluating.scala:80) at org.nlogo.workspace.Evaluating.command$(Evaluating.scala:79) at
org.nlogo.workspace.AbstractWorkspaceScala.command(AbstractWorkspaceScala.scala:26)
at
org.nlogo.headless.HeadlessModelOpener.finish(HeadlessModelOpener.scala:112)
at
org.nlogo.headless.HeadlessModelOpener.openFromModel(HeadlessModelOpener.scala:74)
at
org.nlogo.headless.HeadlessWorkspace.openModel(HeadlessWorkspace.scala:550) at org.nlogo.api.Workspace.openModel(Workspace.scala:66) at org.nlogo.app.App$$anon$1.openCurrentModelIn(App.scala:133) at org.nlogo.lab.gui.Supervisor.$anonfun$start$1(Supervisor.scala:119) at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:158) at org.nlogo.lab.gui.Supervisor.start(Supervisor.scala:117) at org.nlogo.lab.gui.ManagerDialog.run(ManagerDialog.scala:103) at
org.nlogo.lab.gui.ManagerDialog.$anonfun$runAction$1(ManagerDialog.scala:30)
at
org.nlogo.lab.gui.ManagerDialog$$anon$1.actionPerformed(ManagerDialog.scala:24)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
NetLogo 6.2.1 main: org.nlogo.app.AppFrame thread: AWT-EventQueue-0 OpenJDK 64-Bit Server VM 1.8.0_275 (BellSoft; 1.8.0_275-b01) operating system: Windows 10 10.0 (amd64 processor) Scala version 2.12.12 JOGL: (3D View not initialized) OpenGL Graphics: (3D View not initialized) model: 1代模型
05:06:07.293 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
— Reply to this email directly, view it on GitHub<
or unsubscribe<
You are receiving this because you are subscribed to this thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/NetLogo/NetLogo/issues/2026#issuecomment-1105396653 < https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026*issuecomment-1105396653*3E__;IyU!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgI0saRbDg$,
or unsubscribe < https://github.com/notifications/unsubscribe-auth/AYSBIKQY4KTEILOWOIFLZX3VGFZMLANCNFSM5T6S3IMA < https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AYSBIKQY4KTEILOWOIFLZX3VGFZMLANCNFSM5T6S3IMA*3E__;JQ!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgKUNDgVdA$>
. You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub< https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026*issuecomment-1107355090__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgInKMWdAA$>, or unsubscribe< https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2SKPGIXRGDSJGUUE3LVGNZA7ANCNFSM5T6S3IMA__;!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgKJd9PSoQ$>.
You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/NetLogo/NetLogo/issues/2026#issuecomment-1108791541, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSBIKV5N4UQMAZVAAUPPN3VG3CG3ANCNFSM5T6S3IMA . You are receiving this because you authored the thread.Message ID: @.***>
This is not a Behaviorspace specific issue. The model contains a variable named E
created using a slider. Contrary to the user's expectations, this variable actually referred to the NetLogo mathematical constant e
which equals 2.718281828459045. Had the user created this as a global variable in the code a compiler error would have resulted. This does not cause an error when run in NetLogo, because the value is never reset. However, Behaviorspace does attempt to set the value which results in the (unfortunately obscure) error message. The message does reflect the reality that E
is not something you can use set on.
Reported previously in #1604
Hi Lenny, The root of your problem is that you defined a variable called E. Internally variable names are converted to lower case, which means that variable is the same as the numerical constant e = 2.718281828459045. If you rename your variable something else like bigE in the interface, the code and the behavior space experiment I think all will be well. Hint: in the code tab make sure the ignore case option is unchecked. Good luck with your project.
Aaron
Aaron Brandes, Software Developer Center for Connected Learning and Computer-Based Modeling
From: Lenny Nihilius @.> Reply-To: NetLogo/NetLogo @.> Date: Tuesday, April 26, 2022 at 2:38 AM To: NetLogo/NetLogo @.> Cc: Aaron Andre Brandes @.>, Comment @.***> Subject: Re: [NetLogo/NetLogo] NetLogo behavior space internal error (Issue #2026)
Hi Mr.Brandes, Thank you for your kind reply, and I do use the 'matrix' extension to build those matrices.
Here is the zip file containing the model. To make sure you can receive it successfully, I also send a copy to the email address on your Github page.
Thank you so much for your help.
Lenny
Aaron Brandes @.***> 于2022年4月26日周二 00:31写道:
Hi Lenny, Thanks for your response, and for carefully checking for possible sources of the error. Unfortunately model you attached did not come through, because in my email I forgot to mention that share a .nlogo model file you need to include it in a zip file or change the extension. This is because your reply is handled by a github program that accepts only the following attachment formats: PNG (.png) GIF (.gif) JPEG (.jpg) Log files (.log) Microsoft Word (.docx), Powerpoint (.pptx), and Excel (.xlsx) documents. Text files (.txt) PDFs (.pdf) ZIP (.zip, .gz)
So please change the extension or include it in a zip file and I will take a look. The number of decimal places you are using should not cause any issues. For matrices I hope you were using the ‘matrix’ extension because it is the best way to handle matrices in NetLogo.
Thanks, Aaron
Aaron Brandes, Software Developer Center for Connected Learning and Computer-Based Modeling
From: Lenny Nihilius @.> Reply-To: NetLogo/NetLogo @.> Date: Saturday, April 23, 2022 at 12:03 AM To: NetLogo/NetLogo @.> Cc: Aaron Andre Brandes @.>, Comment @.***> Subject: Re: [NetLogo/NetLogo] NetLogo behavior space internal error (Issue #2026)
Hi Mr.Brandes, Thank you for your detailed reply, which do helped me understand further about this error and "position 55".
Firstly, I followed your suggestions and created a duplicate with default setting, which do simplified the problem. Running that duplicate returned the same error, which means there must be some internal problem in the code itself.
Secondly, I checked all the assignment instructions using "set", but it seems nothing wrong obviously. I also checked "self" and "myself" which would also cause the same error information from Google search, but it didn't help. Would that error caused by some hidden limitation like too much decimal digits of some parameters? Some parameters have 3-4 digits after the decimal point. And I also used some matrices.
Model file has been attached to this email. I'd be so grateful if you would like to help dealing with the probelm.
- Lenny
Lenny Nihilius, undergraduate student Information Management and Information System, School of econimics and management, Beijing Jiaotong University
Aaron Brandes @.***> 于2022年4月21日周四 23:42写道:
Hi Lenny, We are sorry you have encountered this error. Thanks for sending us the debug information.
I will first make some suggestions for non-debugging steps to approach the problem. I will then explain “position 55”
First I would try to simplify the problem. Presumably you are exploring a range of values for some parameters. Test a new experiment that does what the successful run does. If you have your experiment saved with the model: Select BehaviorSearch from Tools menu Select the experiment Select Duplicate Change Experiment name Change variables to have a single value, not a range Set repetitions 1
If that works, you can explore which circumstances cause the error. If not, you have simplified the debugging.
If you want to look for possible culprits in your NetLogo code, The first part of the error message means: This isn't something you can use "set" on. This is a runtime error, so whatever you were using set on was acceptible to the compiler..Is there anywhere you are using set to change the type of some object?
At that point if you still have a problem and are willing to share your model we may be able to help you further.
Position in brief: The position usually refers to a location in a file, but in this case the filename is empty, so it may be internal to the code. Anyway there is no simple way to make use of it. However if you want to put debugging statements in code, the following sections tells you where to start.
OK, if you want some nitty gritty here it is. This may be TMI (too much information)
Firstly, you seem to be using a Chinese locale. I don’t know Chinese, so I found the equivalent English error message. compiler.SetVisitor.notSettable = This isn't something you can use "set" on. compiler.SetVisitor.notSettable = 不能对其使用set
This error is thrown in the file ./netlogo-core/src/main/compile/middle/SetVisitor.scala and the stack trace tells us where:
This is the relevant code:
private lazy val INVALID_SET = core.I18N.errors.get("compiler.SetVisitor.notSettable") override def visitStatement(stmt: Statement) { super.visitStatement(stmt) if(stmt.command.isInstanceOf[_set]) { val rApp = stmt.args.head.asInstanceOf[ReporterApp] val cmdTransformer = (SetVisitor.classes ++ programClasses) .get(rApp.reporter.getClass) .getOrElse(exception(INVALID_SET, stmt)) // ** This is line 28 val newCommand = cmdTransformer(rApp.reporter) newCommand.copyMetadataFrom(stmt.command) stmt.command = newCommand stmt.removeArgument(0) } }
So if you wanted to print out some debugging info you could print stmt, rApp, (SetVisitor.classes ++ programClasses), (SetVisitor.classes ++ programClasses).get(rApp.reporter.getClass) etc
If you want to know how position gets into the error message:
The final element of the stack trace is at org.nlogo.core.Fail$.exception(Fail.scala:27)
./parser-core/src/main/core/Fail.scala defines the following exception: def exception(message: String, start: Int, end: Int, filename: String): Nothing = throw new CompilerException(message, start, end, filename)
CompilerException is found in ./parser-core/src/main/core/CompilerException.scala
extends RuntimeException(message) { def this(token: Token) = this(token.ensuring(_.tpe == TokenType.Bad).value.asInstanceOf[String], token.start, token.end, token.filename)
override def toString = getMessage + " at position " + start + " in " + filename }
That is where the " at position 55 in" part of the message comes from. Evidently the filename is empty, so this must be a place internal to NetLogo code.
- Aaron
Aaron Brandes, Software Developer Center for Connected Learning and Computer-Based Modeling
From: Lenny Nihilius @.> Reply-To: NetLogo/NetLogo @.> Date: Thursday, April 21, 2022 at 5:19 AM To: NetLogo/NetLogo @.> Cc: Subscribed @.> Subject: [NetLogo/NetLogo] NetLogo behavior space internal error (Issue
2026)
I'm using netlogo to build a model for my dissertation, and it runs successfully while using set-up and go. But when I turn to behavior space, I got such error and I can't find much more details from google. My question is, what does "position 55" means? If it means the code line 55, this error still shows up after annotating that line.
NetLogo is unable to supply you with more details about this error. Please report the problem at https://github.com/NetLogo/NetLogo/issues<<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues*3C*3C__;JSU!!Dq0X2DkFhyF93HkjWTBQKhk!C4vPIM2yS35rD6hrnJnXbw466C2-mE4ITpIsT4hEPnAKryTxwvJinhb33jEvLtftdx7zmRFeeA$ https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues*3C__;JQ!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgLMIwwKWg$%3E
or to @.**@.>, and paste the contents of this window into your report.
不能对其使用set. at position 55 in at org.nlogo.core.Fail$.exception(Fail.scala:27) at org.nlogo.core.Fail$.exception(Fail.scala:25) at org.nlogo.core.Fail$.exception(Fail.scala:23) at
org.nlogo.compile.middle.SetVisitor.$anonfun$visitStatement$1(SetVisitor.scala:28)
at scala.Option.getOrElse(Option.scala:189) at org.nlogo.compile.middle.SetVisitor.visitStatement(SetVisitor.scala:28) at org.nlogo.compile.api.Statement.accept(AstNode.scala:94) at
org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1(AstVisitor.scala:32)
at
org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1$adapted(AstVisitor.scala:32)
at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62) at
scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49) at
org.nlogo.compile.api.DefaultAstVisitor.visitStatements(AstVisitor.scala:32)
at org.nlogo.compile.api.Statements.accept(AstNode.scala:70) at
org.nlogo.compile.api.DefaultAstVisitor.visitProcedureDefinition(AstVisitor.scala:27)
at org.nlogo.compile.api.ProcedureDefinition.accept(AstNode.scala:50) at
org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3(MiddleEnd.scala:47)
at
org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3$adapted(MiddleEnd.scala:40)
at scala.collection.immutable.List.foreach(List.scala:431) at org.nlogo.compile.middle.MiddleEnd$.middleEnd(MiddleEnd.scala:40) at org.nlogo.compile.CompilerMain$.compile(CompilerMain.scala:61) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:85) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:100) at org.nlogo.workspace.Evaluator.invokeCompiler(Evaluator.scala:159) at org.nlogo.workspace.Evaluator.evaluateCommands(Evaluator.scala:20) at org.nlogo.workspace.Evaluating.command(Evaluating.scala:80) at org.nlogo.workspace.Evaluating.command$(Evaluating.scala:79) at
org.nlogo.workspace.AbstractWorkspaceScala.command(AbstractWorkspaceScala.scala:26)
at
org.nlogo.headless.HeadlessModelOpener.finish(HeadlessModelOpener.scala:112)
at
org.nlogo.headless.HeadlessModelOpener.openFromModel(HeadlessModelOpener.scala:74)
at
org.nlogo.headless.HeadlessWorkspace.openModel(HeadlessWorkspace.scala:550) at org.nlogo.api.Workspace.openModel(Workspace.scala:66) at org.nlogo.app.App$$anon$1.openCurrentModelIn(App.scala:133) at org.nlogo.lab.gui.Supervisor.$anonfun$start$1(Supervisor.scala:119) at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:158) at org.nlogo.lab.gui.Supervisor.start(Supervisor.scala:117) at org.nlogo.lab.gui.ManagerDialog.run(ManagerDialog.scala:103) at
org.nlogo.lab.gui.ManagerDialog.$anonfun$runAction$1(ManagerDialog.scala:30)
at
org.nlogo.lab.gui.ManagerDialog$$anon$1.actionPerformed(ManagerDialog.scala:24)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
NetLogo 6.2.1 main: org.nlogo.app.AppFrame thread: AWT-EventQueue-0 OpenJDK 64-Bit Server VM 1.8.0_275 (BellSoft; 1.8.0_275-b01) operating system: Windows 10 10.0 (amd64 processor) Scala version 2.12.12 JOGL: (3D View not initialized) OpenGL Graphics: (3D View not initialized) model: 1代模型
05:06:07.293 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
— Reply to this email directly, view it on GitHub<
or unsubscribe<
You are receiving this because you are subscribed to this thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/NetLogo/NetLogo/issues/2026#issuecomment-1105396653<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026*issuecomment-1105396653__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!C4vPIM2yS35rD6hrnJnXbw466C2-mE4ITpIsT4hEPnAKryTxwvJinhb33jEvLtftdx6UM2YUeA$ < https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026*issuecomment-1105396653*3E__;IyU!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgI0saRbDg$%3E,
or unsubscribe < https://github.com/notifications/unsubscribe-auth/AYSBIKQY4KTEILOWOIFLZX3VGFZMLANCNFSM5T6S3IMAhttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AYSBIKQY4KTEILOWOIFLZX3VGFZMLANCNFSM5T6S3IMA__;!!Dq0X2DkFhyF93HkjWTBQKhk!C4vPIM2yS35rD6hrnJnXbw466C2-mE4ITpIsT4hEPnAKryTxwvJinhb33jEvLtftdx43JLYuhQ$ < https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AYSBIKQY4KTEILOWOIFLZX3VGFZMLANCNFSM5T6S3IMA*3E__;JQ!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgKUNDgVdA$%3E
. You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub< https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026*issuecomment-1107355090__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgInKMWdAA$%3E, or unsubscribe< https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2SKPGIXRGDSJGUUE3LVGNZA7ANCNFSM5T6S3IMA__;!!Dq0X2DkFhyF93HkjWTBQKhk!FHwjh34z8Ild-3mhMMoaXyekW_uKUjv0urvJcb6iZypifcOy1hJgBs5ZwanyfSc2PgKJd9PSoQ$%3E.
You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/NetLogo/NetLogo/issues/2026#issuecomment-1108791541https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026*issuecomment-1108791541*3E__;IyU!!Dq0X2DkFhyF93HkjWTBQKhk!C4vPIM2yS35rD6hrnJnXbw466C2-mE4ITpIsT4hEPnAKryTxwvJinhb33jEvLtftdx7YLr9cAg$, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYSBIKV5N4UQMAZVAAUPPN3VG3CG3ANCNFSM5T6S3IMAhttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AYSBIKV5N4UQMAZVAAUPPN3VG3CG3ANCNFSM5T6S3IMA*3E__;JQ!!Dq0X2DkFhyF93HkjWTBQKhk!C4vPIM2yS35rD6hrnJnXbw466C2-mE4ITpIsT4hEPnAKryTxwvJinhb33jEvLtftdx4wL57ymQ$ . You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/2026*issuecomment-1109405783__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!C4vPIM2yS35rD6hrnJnXbw466C2-mE4ITpIsT4hEPnAKryTxwvJinhb33jEvLtftdx585-Wd6Q$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2X3ONEVJ5QIBJ2SXWLVG6FPHANCNFSM5T6S3IMA__;!!Dq0X2DkFhyF93HkjWTBQKhk!C4vPIM2yS35rD6hrnJnXbw466C2-mE4ITpIsT4hEPnAKryTxwvJinhb33jEvLtftdx4fz6jPEA$. You are receiving this because you commented.Message ID: @.***>
I'm using netlogo to build a model for my dissertation, and it runs successfully while using set-up and go. But when I turn to behavior space, I got such error and I can't find much more details from google. My question is, what does "position 55" means? If it means the code line 55, this error still shows up after annotating that line.
NetLogo is unable to supply you with more details about this error. Please report the problem at https://github.com/NetLogo/NetLogo/issues, or to bugs@ccl.northwestern.edu, and paste the contents of this window into your report.
不能对其使用set. at position 55 in at org.nlogo.core.Fail$.exception(Fail.scala:27) at org.nlogo.core.Fail$.exception(Fail.scala:25) at org.nlogo.core.Fail$.exception(Fail.scala:23) at org.nlogo.compile.middle.SetVisitor.$anonfun$visitStatement$1(SetVisitor.scala:28) at scala.Option.getOrElse(Option.scala:189) at org.nlogo.compile.middle.SetVisitor.visitStatement(SetVisitor.scala:28) at org.nlogo.compile.api.Statement.accept(AstNode.scala:94) at org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1(AstVisitor.scala:32) at org.nlogo.compile.api.DefaultAstVisitor.$anonfun$visitStatements$1$adapted(AstVisitor.scala:32) at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62) at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49) at org.nlogo.compile.api.DefaultAstVisitor.visitStatements(AstVisitor.scala:32) at org.nlogo.compile.api.Statements.accept(AstNode.scala:70) at org.nlogo.compile.api.DefaultAstVisitor.visitProcedureDefinition(AstVisitor.scala:27) at org.nlogo.compile.api.ProcedureDefinition.accept(AstNode.scala:50) at org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3(MiddleEnd.scala:47) at org.nlogo.compile.middle.MiddleEnd$.$anonfun$middleEnd$3$adapted(MiddleEnd.scala:40) at scala.collection.immutable.List.foreach(List.scala:431) at org.nlogo.compile.middle.MiddleEnd$.middleEnd(MiddleEnd.scala:40) at org.nlogo.compile.CompilerMain$.compile(CompilerMain.scala:61) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:85) at org.nlogo.compile.Compiler.compileMoreCode(Compiler.scala:100) at org.nlogo.workspace.Evaluator.invokeCompiler(Evaluator.scala:159) at org.nlogo.workspace.Evaluator.evaluateCommands(Evaluator.scala:20) at org.nlogo.workspace.Evaluating.command(Evaluating.scala:80) at org.nlogo.workspace.Evaluating.command$(Evaluating.scala:79) at org.nlogo.workspace.AbstractWorkspaceScala.command(AbstractWorkspaceScala.scala:26) at org.nlogo.headless.HeadlessModelOpener.finish(HeadlessModelOpener.scala:112) at org.nlogo.headless.HeadlessModelOpener.openFromModel(HeadlessModelOpener.scala:74) at org.nlogo.headless.HeadlessWorkspace.openModel(HeadlessWorkspace.scala:550) at org.nlogo.api.Workspace.openModel(Workspace.scala:66) at org.nlogo.app.App$$anon$1.openCurrentModelIn(App.scala:133) at org.nlogo.lab.gui.Supervisor.$anonfun$start$1(Supervisor.scala:119) at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:158) at org.nlogo.lab.gui.Supervisor.start(Supervisor.scala:117) at org.nlogo.lab.gui.ManagerDialog.run(ManagerDialog.scala:103) at org.nlogo.lab.gui.ManagerDialog.$anonfun$runAction$1(ManagerDialog.scala:30) at org.nlogo.lab.gui.ManagerDialog$$anon$1.actionPerformed(ManagerDialog.scala:24) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
NetLogo 6.2.1 main: org.nlogo.app.AppFrame thread: AWT-EventQueue-0 OpenJDK 64-Bit Server VM 1.8.0_275 (BellSoft; 1.8.0_275-b01) operating system: Windows 10 10.0 (amd64 processor) Scala version 2.12.12 JOGL: (3D View not initialized) OpenGL Graphics: (3D View not initialized) model: 1代模型
05:06:07.293 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0 05:06:07.293 PeriodicUpdateEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0 05:06:06.839 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0