stride3d / stride3d/stride

Non-existing shader crashes Game Studio

Open
#2,241 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

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

https://github.com/stride3d/stride/assets/95977080/c6c300c2-294d-4da9-bc27-8a72c1400f7e

Video instead

Log and callstacks
log2.txt
log1.txt

Additional context
Why do I always find such obscure bugs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash using the listed material and invalid-shader steps, then inspect log1.txt and log2.txt alongside the shader-effect build triggered by changing the shader name. Done means repeated invalid shader entries show an error or other safe response without crashing Game Studio.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.