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

Java - turnRight and turnLeft never stop turning if last function #23

Closed
beamer159 opened this issue May 5, 2022 · 8 comments
Closed
Assignees

Comments

@beamer159
Copy link

beamer159 commented May 5, 2022

Version: Java

If the last function called in run is turnLeft or turnRight, the robot turns and never stops turning. If another function (e.g. forward) follows one of these two functions, the robot stops turning and performs the next action, as expected.

Some thoughts. This is similar to #17, which was recently fixed for forward and back. Now, these two functions are experiencing another issue in #22. When this problem with turnLeft and turnRight is looked at, hopefully the solution does not lead to similar #22 issues.

@flemming-n-larsen
Copy link
Contributor

You are right @beamer159,

This sure sound similar to to the forward/back issue even when they funtion a bit different.

I guess I will need to setup some test with various "bots" moving differently, so we can catch these kinds of bugs in the future when doing adjustments.

Thank you for reporting this, and keep up the good work. We need to get rid of the "child sickness" in the new version of the game while it is still in "alpha" version. 🙂

@flemming-n-larsen
Copy link
Contributor

I can add, that this bug is also present for turning the gun and radar the same way.

@flemming-n-larsen
Copy link
Contributor

This bug has now been found and solved for both the JVM and .Net version of the Bot API.
The fix will be available with the next release.

@flemming-n-larsen
Copy link
Contributor

flemming-n-larsen commented May 18, 2022

Fix is available with release 0.13.1

@beamer159
Copy link
Author

beamer159 commented May 18, 2022

Hmm, I am still getting the same behavior.

public void run() {
    turnRight(360);
}

This program turns indefinitely for me.

Additionally, after the bot completes 8 revolutions, it spams this message (I assume) every tick:

Maximum event queue size has been reached: 256

Also, same behavior is now experienced for forward and back

@flemming-n-larsen
Copy link
Contributor

flemming-n-larsen commented May 18, 2022

@beamer159

Confirmed. This bug was fixed, but was reintroduced when improving/fixing the event queue.
Because the blocking call does not return as it continues for infitity, events are queued up on the event queue as those are not processed.

I will look into fixing this ASAP.

flemming-n-larsen added a commit that referenced this issue May 19, 2022
@flemming-n-larsen
Copy link
Contributor

Release 0.13.2 should finally fix this issue. I tested it thoroughly for bot the Java and .Net API. 🤞

@beamer159
Copy link
Author

Looks good, thanks

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