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

Buttons should use "ownsPrimaryJobs" JobOwners #145

Closed
qiemem opened this issue Feb 12, 2015 · 3 comments
Closed

Buttons should use "ownsPrimaryJobs" JobOwners #145

qiemem opened this issue Feb 12, 2015 · 3 comments

Comments

@qiemem
Copy link
Contributor

qiemem commented Feb 12, 2015

Currently, xw buttons can have their jobs run concurrently with NetLogo buttons. This can give rise to some very unexpected and bizarre behavior. I believe their JobOwners should be initialized with:

  val owner = new SimpleJobOwner(key, ws.world.mainRNG, classOf[Observer]) {
    override def isButton = true
    override def ownsPrimaryJobs = true
  }
@nicolaspayette
Copy link
Member

Thanks for the report, @qiemem! (And for the other ones as well!)

Do you have any examples of "unexpected and bizarre behavior" that I could try to reproduce to test the fix?

@qiemem
Copy link
Contributor Author

qiemem commented Feb 13, 2015

The case in which it arose is fairly complex, though it was consistent, and it no longer occurred after the above change.

Naturally, when I try to create a small example for testing, I can't get the problem to occur (I did indeed revert to an unmodified xw)...

I'll keep trying to come up with a case. Sorry :( I know how frustrating it is to have bug report without a simple reproducible case.

@nicolaspayette
Copy link
Member

You've found a subtle bug in fairly untested code and proposed a fix that makes sense and seems to have solved the problem in the context you found it. I can't really ask for more! If you can come up with a test case, that will be awesome, but if not, don't sweat it; I'll just merge as is. Thanks again!

nicolaspayette added a commit that referenced this issue Mar 30, 2015
mark xw button's JobOwner as primary (fix #145)
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