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

Non-existing shader crashes Game Studio #2241

Open
WithBlueHorns opened this issue May 6, 2024 · 1 comment
Open

Non-existing shader crashes Game Studio #2241

WithBlueHorns opened this issue May 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@WithBlueHorns
Copy link

WithBlueHorns commented May 6, 2024

Release Type: Official Release

Version: 4.2.0.2122

Describe the bug
In a material, if you try to set shader that doesn't exist, wait for it to build the effect, then do try to do it again with another shader that doesn't exist Game Studio crashes, not always crash windows pops up.
I'm not sure what and why it happens, sometimes you could use the same bad name, sometimes you just do 2 then it works
To Reproduce
Steps to reproduce the behavior:

  1. Create a new project
  2. Look for "Sphere Material"/"Ground Material"/Create a new material, then in any property of material (ex. diffuse) set the map to "Shader"
  3. Type any name of a shader that doesn't exist, followed by pressing enter (could be a few times)
  4. Change the name in the field (ex. "test" -> "test2"), wait for the effects from before to build, then click enter, as soon as you do it the Game Studio crashes

Expected behavior
To just give that red blinking effect or really anything other than crashing

Screenshots

crash0001-1076.mp4

Video instead

Log and callstacks
log2.txt
log1.txt

Additional context
Why do I always find such obscure bugs

@WithBlueHorns WithBlueHorns added the bug Something isn't working label May 6, 2024
@Doprez
Copy link
Contributor

Doprez commented May 14, 2024

So I took a bit of time to look into this issue and the problem seems to come from misuse of multithreading than the shader being not found.

image

Its a bit hard to recreate in source but I think it would explain why it only seems to happen after changing the shader and hitting enter multiple times. This could also bhe related to the save error that people have run into #1917.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants