Skip to content

glsl_restart: Stop segfaulting#1926

Merged
illwieckz merged 2 commits intofor-0.56.0/syncfrom
illwieckz/fix-segfault
Mar 9, 2026
Merged

glsl_restart: Stop segfaulting#1926
illwieckz merged 2 commits intofor-0.56.0/syncfrom
illwieckz/fix-segfault

Conversation

@illwieckz
Copy link
Member

Cherry-picked from:

While the rest of that PR can wait for after the release, this commit fixes an actual bug we better not want to ship.

@DolceTriade told me:

Fixes a segfault in current master (and probably 0.56.0 too)

Can test it by setting r_lazyShaders 2 and running /glsl_restart

I verified the bug affects 0.56.0 too and that this commit fixes it.

Original commit comment below.


Using git bisect, e497a08 introduces a window where globalUBOProxy can be null after glsl_restart. Therefore, also return early, if glboalUBOProxy is null. It will be instantiated later.

Further, only initialize world shaders AFTER all shader storage has been initialized.

DolceTriade and others added 2 commits February 22, 2026 03:57
Using git bisect, e497a08 introduces a
window where globalUBOProxy can be null after glsl_restart. Therefore,
also return early, if glboalUBOProxy is null. It will be instantiated
later.

Further, only initialize world shaders *AFTER* all shader storage has
been initialized.
@illwieckz illwieckz force-pushed the illwieckz/fix-segfault branch from c1dc4c0 to b77e924 Compare March 9, 2026 11:29
@illwieckz
Copy link
Member Author

The original commit was introducing some whitespace change in other parts, I split that in another commit.

Copy link
Member Author

@illwieckz illwieckz 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 reviewing someone else's work here, so LGTM.

@illwieckz illwieckz merged commit 11ec5c1 into for-0.56.0/sync Mar 9, 2026
9 checks passed
@illwieckz illwieckz deleted the illwieckz/fix-segfault branch March 9, 2026 12:23
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 this pull request may close these issues.

2 participants