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

Error when using quinn_runtime_bevy with Bevy 0.9.1 #3

Closed
Lemonzyy opened this issue Dec 23, 2022 · 3 comments
Closed

Error when using quinn_runtime_bevy with Bevy 0.9.1 #3

Lemonzyy opened this issue Dec 23, 2022 · 3 comments

Comments

@Lemonzyy
Copy link

Hello, I'm currently trying to use quinn_runtime_bevy with Bevy 0.9.1 but when I run my program it tells me thread 'IO Task Pool (0)' panicked at 'A IoTaskPool has not been initialized yet. Please call IoTaskPool::init beforehand.', [...] whereas when I don't use Bevy directly but bevy_tasks with version 0.8.1 it works fine.

I think the solution is to update bevy_tasks to the latest version for quinn_runtime_bevy.

@zicklag
Copy link
Member

zicklag commented Dec 23, 2022

Hey there! Thanks for opening.

I think you're right that the version needs to be updated. I think it's because you end up with two versions of the IoTaskPool, and the one from Bevy 0.9 gets initialized by Bevy, but the one from Bevy 0.8 doesn't get initialized.

One of my next steps is to update bones and jumpy to Bevy 0.9, but I might not have that ready within a couple days.

For now, you should be able to workaround by adding bevy_tasks 0.8.1 to your dependencies:

[dependencies]
old_bevy_tasks = { package = "bevy_tasks", version = "0.8.1" }

And then running this at the top of your main():

old_bevy_tasks::IoTaskPool::init(|| TaskPool::new());

This will start a new task pool, instead of using the one already running from Bevy 0.9 but it should work fine for a temporary solution, and I'll be trying to get an update very soon.

@Lemonzyy
Copy link
Author

Thank you very much, it seems to work for now.
Would you like me to close this issue?

@zicklag
Copy link
Member

zicklag commented Dec 23, 2022

Perfect.

I'll leave this open until we update. 👍

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

Successfully merging a pull request may close this issue.

2 participants