Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spawning entities at runtime bug #434

Open
UltronDestroyer opened this issue Mar 25, 2020 · 2 comments
Open

Spawning entities at runtime bug #434

UltronDestroyer opened this issue Mar 25, 2020 · 2 comments

Comments

@UltronDestroyer
Copy link

UltronDestroyer commented Mar 25, 2020

Answer the following questions:

  • what are you trying to do?
    Spawn an agent at runtime

  • what is the problem and how can it be recreated?
    When is 0 in the XML file, it sets max_num_entities in SimControl.cpp to be 0. Therefore, it is impossible to spawn agents without causing a segfault.

  • what scrimmage commit are you on? You can see this with git rev-parse HEAD
    Head

  • describe any changes you made to scrimmage.
    I changed max_num_entities to 100 for example, and it continued on without segfaulting

Changes proposed:
Allow there to be a parameter in the XML file such as "max_num_entities" which is separate from count and outside of the entity tag such that spawning entities at runtime is possible

The max_num_entries variable resides in SimControl.cpp and gets set to 0 if the total count of 0 is 0 for all entities which means the RTree initializes with 0, eventually providing a segfault

@SyllogismRXS
Copy link
Contributor

I made some changes to how the scrimmage RTree is constructed in SimControl. I merged the changes into master after they passed Travis CI tests. See the changes in commit bdebe85

Let me know if this works for you.

@UltronDestroyer
Copy link
Author

Thank you!

I will get back to you tomorrow on the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants