question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PythonHivemind.initialize_hive(packet) called with invalid GameTickPacket (after updating from RLBot 1.48 to 1.54)

See original GitHub issue

We are running into a nasty issue after updating our (pipenv) virtual environment from Rlbot 1.48 to the newest release (1.54).

Context

For testing purposes, we use

from rlbot import runner
runner.main() 

as well as some custom functionality build around it.

  • Our bot is a PythonHivemind (launched as a helper process).
  • This issue does not occur when launching our code via the GUI.
  • We do not have support_early_start enabled.

The Issue

Since the update, the packet that is passed to self.initialize_hive(packet) during bot startup is no longer valid. For instance, it has values:

num_boost:0
num_cars:0
num_teams:0
num_tiles:0

…instead of the expected values as read from the MatchConfig.
This call results in incorrect initialization of our bot and finally in fatal errors during calls to get_output()

We have attempted to debug the SetupManager/PythonHivemind/GameInterface, but it’s hard.

The only workaround that we have found so far is:

  • check in initialize_hiveif packet.num_cars == 0: then skip initialize_hive's functionality”.
  • During calls to get_outputs, return {index: PlayerInput() for index in self.drone_indices} until the input packet in the get_outputs call is finally a valid one (packet.num_cars != 0)
  • Then we retry a call to self.initialize_hive(packet).

Notes

This seems to be a bug somewhere in the game interface. We have also noticed, since the RLBot update, this change in the implementation of PythonHivemind. This bit of code is new:

# Line 67:
# Wait for legitimate field info
        while True:
            self.game_interface.update_field_info_packet(self._field_info)
            if self._field_info.num_goals > 0:
                break
            time.sleep(0.2)

Deleting this part doesn’t solve our issue (as expected), but maybe this was an attempt to prevent it?

Conclusion

It definitely doesn’t seem like intended behaviour. Why would you have to tell the game interface what your bot wants to do before the game’s match is even properly populated?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tarehartcommented, Feb 22, 2021

Seems like there are a few lingering questions, but I’ll go ahead and close. Trezorro, feel free to reopen and/or open a new issue if you’re getting blocked by errors!

1reaction
ViliamVadoczcommented, Feb 11, 2021

Not sending message to Rocket League because that would bring the bytes sent since last receive to 82144, and the limit is 65535 bytes.

This error probably has to do with rendering. You should split up your rendering into groups to avoid this. https://github.com/RLBot/RLBot/wiki/Rendering#rendering-a-large-amount

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ - RLBot
How do I play against the bots? Follow this installation guide. It will also show you how to download the bot pack containing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found