Steps to reproduce:
- Create a new Unity project using a 3D Universal Template
- Go to Project Settings > Graphics > Shader Build Settings
- Add 2-3 Keywords with any names
- Click Apply
- Remove some or all Keywords
- Click Apply
- Perform 3-6th steps a few times
- Observe the Console
Actual results: "The AssetImportWorker has crashed" logs
Expected results: No crash logs
Reproducible with versions: 6000.3.1f1, 6000.4.0b1, 6000.5.0a3
Can’t test with versions: 6000.0.64f1, 6000.2.15f1 (No Shader Build Settings)
Tested on (OS): Windows 11, macOS 26.1 (M1 Pro)
Notes:
- Could not find the exact reproduction steps, as sometimes the reproduction occurs faster or slower. But it mostly appears to occur if Keywords are deleted while other background processes are running in the Editor
First few lines of stacktrace:
0x00007FFE41886417 (Unity) core::base_hash_set<core::pair<core::basic_string<char,core::StringStorageDefault<char> > const ,keywords::GlobalKeyword,1>,core::hash_pair<core::hash<core::basic_string_ref<char> >,core::basic_string<char,core::StringStorageDefault<char> > >,core::equal_pair<std::equal_to<core::basic_string_ref<char> >,core::basic_string<char,core::StringStorageDefault<char> > > >::lookup<core::basic_string_ref<char>,core::equal_pair<std::equal_to<core::basic_string_ref<char> >,core::basic_string<char,core::StringStorageDefault<char> > > >
0x00007FFE4188893E (Unity) keywords::KeywordRemap::Init
0x00007FFE4184F212 (Unity) ShaderLab::IntShader::CreateKeywordRemap
0x00007FFE41851DEC (Unity) ShaderLab::IntShader::ResolveFallback
0x00007FFE418E6C5A (Unity) ShaderFromSerializedShaderMainThread