Netlogo freezes when I inspect a turtle - netlogo

I'm trying to build a very simple mode that has only 10 turtles. All of them are connected to one parameter with directed links. When I try to inspect this turtle, Netlogo freezes which forces me to restart the model. Inspection is working fine with other turtle. Is there a solution for this please?

Related

Pyscipopt (in Google Collab) does not show/print any output for the large-size network optimization problem in Google Collab

I am working on a non-linear network-optimization problem. When I run a large problem instance on the lab high-performance computers (imposing the time limit of 1 or 2 hours), those computers give me the output when the time is exhausted.
I wanted to use Google Collab to run the same code and to share it with my supervisors (they don't have Pyscipopt installed on their computers). However, when the problem size is small – all is good, but when the problem size is large, it says that the execution is completed (on the bottom of the screen) along with the time it took and a small red exclamation mark BUT it does not show any output for the large-size network optimization problems (neither it prints the solution nor it explains what is the reason/error of this behaviour).
Again, the same code works perfectly fine on high-performance computers, so I do not think there are any problems with syntax.
Please let me know if there are any solutions to the problem described.
Kind regards,
Lidiia
I tried to change "None" in the hardware accelerator to GPU and CPU. I tried to proofread the code in order to find any mistakes. I tried to not leave the Google Collab to run the code at night (I read somewhere that kernel stops working if there is inactivity) so I tried to click on something there to prevent the execution from stopping. Nothing worked.

NetLogo 6.2.2 BehaviorSpace not letting us select file to save results or run

A student in my class is unable to get BehaviorSpace to work on his machine. We are able to design and save experiment. When we click on run the dialog box for Run options opens and we select Table output. Then the problem arises. After clicking Ok it goes right back to the BehaviorSpace dialog, rather than asking us where to save the results and running the experiment. If we click on Run again, we go back to Run options and so on. I have never seen this before. If you have any ideas, please let us know.
He is using a 2020 MacBook Air running macOS Monterey 12.0.1.
Sincerely, Dale S. Rothman

Generally what would cause Unity Editor freezes and not responding?

I have encountered a critical issue that Unity Editor freezes. I've spent many hours debugging step by step of my codes but still can't find where the problem is. So I think maybe I should try thinking from another angle, generally speaking what reasons would cause Unity Editor freezes and not responding?
I can't find a general case discussion about this topic.
From my experience, infinite loop is one reason for sure. Deadlock is critical issue, but not sure if it causes Unity Editor freezes. Unity Editor bug that I encountered only makes the whole editor crashes, instead of freezing. Any other experiences are welcomed. Thank you!
In such case, what kind of tools or methods could I use to debug it? Right now since the editor freezes I can't use "print" to find out what happens after it freezes. So I use Visual studio to debug the Editor thread, in this way I can see all the prints that I wrote. It appears the game is still running, only the editor not responding. And I can use VS click "attach to Unity and play" and put some debugging points, then debug step by step.
The first thing that I would check out is for an infinite loop. At the hang/freeze moment, you can attatch the debugger of your choice and pause the execution. In the case that it is an infinite loop that it is executing, at the exec time pause you might find the execution in a forever running while (true) {...}
Other thing that I would check is the plugins in use. Several Unity plugins like Parse, FMOD, UMP (Universal Media Player), ZFBrowser, or Embedded Browser are using native threads. It’s an issue when a plugin ends up attaching a native thread to the runtime, which then does blocking calls to the OS. This means Unity can't interrupt that thread for the debugger (or domain reload) and hang. Source
To check that you can check the active threads in the visual studio command window af the freeze is reproduced:
View->OtherWindows->CommandWindow and type in this command:
Debug.ListCallStack /AllThreads /ShowExternalCode
In the stack you can check if some thread is there with no need, or if its related with the plugins mentioned above.
Also an interesting point is to check in the windows task manager (in the case that you are using windows) if the CPU usage is to 0%. It can lead you to the type of hang that is taking place.
Good luck.
Edit: I forgot to mention, you need to check also the unity logfiles
I notice this all the time, and its super frustrating.
Unfortunately, this could be any number of issues. I notice this issue most often when working in projects that are made for the Universal Windows Platform.
Try using the Task manager to monitor specific processes / threads running.
Some follow up questions:
What platform is your project currently targeting?
What version of Unity are you running? Have you tried other versions?
What are your computers specs? Is the OS up to date? Graphics Drivers?
Does it happen (or happen more often) when an external code editor is open? Perhaps try going to Preferences>External Editor > Regenerate Project files.
Are you using Unity Collab by chance? I've had issues where collab is stuck trying to communicate with Unity Servers / looking for changes. Try logging out of your Unity account through the editor, and log back in.
Have you tried looking for a Unity editor crash dump, or error log files? I think they can be found here C:\Users\username\AppData\LocalLow\Unity by default. Those files may give you more specific data concerning your problem.
Unity's new versions are getting more slower and slower. From my experience 2019 versions are the best and more stable.
I solved my issue. It's fundamentally an infinite loop.
It's not a simple case such as "while(true)". I'll try to explain.
My game was a PvP game, and I'm making a local AI. Usually my design pattern works fine, however I just turned off the simulation of "AI thinking time", and since the AI codes and server codes all run in local mode, the transmitting of data between server and client are replaced by local method call(meaning instantly executed before everything else).
There is a loophole in my server code. I use "Update" and a flag on server to change a specific game state, however in this particular case, it got into an infinite loop because the local method call is executed before the "Update". And because my AI now doesn't need real time to "think", it "acts" and transmits the event data to server right away. And since the transmitting doesn't need time any more, it calls the server method instantly, hence forming the infinite loop.

NetLogo BehaviorSpace Crashing NetLogo

This is less of a coding question than a question about the program not working as a whole, apologies if it is mis-placed.
[Edit: I'm running NetLogo on MacOS Big Sur v11.1)
After a hiatus of about 5 months of not using NetLogo, I recently updated to 6.2.0 after my earlier version (6.0.3) had problems running BehaviorSpace.
When I opened BehaviorSpace in the old version, NetLogo ceased to be functional: all buttons were frozen, except for occasionally "Run" for an experiment. Running an experiment, along with the excel output, would occur, but I couldn't click any of the buttons (like Update View). Before running an experiment, I could not expand the BehaviorSpace window or edit any of the parameters that I had set up months ago. I'm also unable to create a new experiment.
This continues to happen with the new version of NetLogo (6.2.0)- everything freezes, including the NetLogo Menu, but I can run an experiment if I don't mind not altering anything.
[EDIT: I've opened a model from the included Model Library, and BehaviorSpace similarly freezes the entire program, so it's not just my file... which is a relief]
Has anyone seen this, too? Any suggestions for how to fix this?
Thanks in advance.

Importing a floor plan in netlogo

beginner netlogo user here. I did some basic stuff like creating turtles and making them move in a loop and such. Then I found out in the NetLogo dictionary that by using the command import-pcolors-rgb so that the turtles can interact with them. So I took out a simple floor plan and see what happens. The import was successful. But the layout in NetLogo was incomplete. Like some of the walls are missing. I tried searching for tutorials but I couldn't find one. I also tried my turtle to move forward and forward until it reached a wall. I was expecting it to stop or give me an error but it just passed through. How can I make this happen?
Edit: I've researched some sample simulation models on how they made it like setep by step, or even in youtube. But couldn't find anything.
Tutorials and help would be much appreciated. Thanks in advance!