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

Change Server initialization order #61436

Merged

Conversation

reduz
Copy link
Member

@reduz reduz commented May 26, 2022

  • Registration of server classes happened after Display initialization.
  • This made no sense in practice and avoided the registration of custom server drivers (like custom XR server, custom Rendering server, custom XR server).
  • Initialization moved to before Display.

@reduz reduz requested a review from a team as a code owner May 26, 2022 12:53
@Chaosus Chaosus added this to the 4.0 milestone May 26, 2022
Copy link
Contributor

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting a weird crash later on in the process when testing OpenXR but I don't think this is due to this PR. This PR seems to do exactly what it should and allows me to get through the OpenXR initialisation

@akien-mga
Copy link
Member

There seems to be issues with running --dump-extension-api and --generate-mono-glue.

@reduz
Copy link
Member Author

reduz commented May 26, 2022

@akien-mga I tried to replicate it locally and I can't. I am not entirely sure what may be causing them.

@BastiaanOlij
Copy link
Contributor

BastiaanOlij commented May 28, 2022

Fix is here: #61585

Turns out it is because when we initialise RenderingServer, it calls back into itself which is not allowed in a constructor.

* Registration of server classes happened after Display initialization.
* This made no sense in practice and avoided the registration of custom server drivers (like custom XR server, custom Rendering server, custom XR server).
* Initialization moved to _before_ Display.
@akien-mga akien-mga force-pushed the change-server-initialization-order branch from c8925c7 to 54542ef Compare June 1, 2022 14:48
@akien-mga akien-mga merged commit 79aa13a into godotengine:master Jun 1, 2022
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants