-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Workaround crash due to null shader when running XR project with --xr-mode
off
#82679
Conversation
Need to have a deeper dive into this when I can, this just fixes the symptom, we need to look into why it can't create the shader, or why it is attempting to create the shader if it shouldn't. |
001c8d0
to
1d34033
Compare
May it be that the placeholder is non-null but dangling? In that case, the function could either explicitly check for validity (pre) or, well, fail on null (post) as this PR does. |
Interesting point @RandomShaper , indeed the usage of I don't know a lot about the intended implementation of placeholder shaders, but if it is intended that this could be NULL, instead of erroring out we should probably skip over the code that uses the shader. |
I've delved a bit more and I think it should indeed be an error on the side of the caller. This function can be called either to create a shader from scratch or to fill a soul-less (placeholder) shader previously instantiated. In the former case, I don't think
|
@RandomShaper agreed, I think it's valid to record the error when the shader is null as it can but shouldn't happen. Then we can chase down the real cause and fix that as well in a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving this as per insight/discussion with @RandomShaper (see above).
This change makes sense to make, shader can but shouldn't be null, thus the ERR_FAIL_NULL_V
makes sense.
--xr-mode
off
Thanks! |
Steps to reproduce:
--xr-mode off
This is not a complete fix, since it still prints error due to null shader RID, but at least it won't crash. I was able to play the game with --xr-mode off.
Other people also hit this issue in 4.2 dev