Opening the project from bug-report Case 1300104
in Unity 2021.2.0a17 causes the editor to output 270 “Incompatible keyword states” errors without further information.
Reproduce
- Open project from Case 1300104
Actual
Many “Incompatible keyword states” errors.
Expected
A better error message text that tells how to fix the issue and/or ideally no “Incompatible keyword states” errors at all.
Hi!
Thanks for the bug report!
I’ll take a look. There’s nothing that can be done about this on your end, unfortunately. The error comes from the keyword system, which got updated in a17 
1 Like
The shader keyword system 
QA was able to reproduce the issue and it even should be fixed in a18 already. Thumbs up to everyone involved.
1 Like
I’m afraid it’s been broken again. Unity 2022.1

3 Likes
We have that too in latest 2021 LTS when building Addressable scenes. Not sure yet if that is actually causing deeper issues for us
1 Like
A new bug report was issued for this because people were still experiencing it in a17 and a18, but it was closed because the devs said it wasn’t reproducable. So it sounds like they haven’t figured it out what’s causing it either.
I’ve been having a problem with Shader Graph though I’m not yet confident that these two things are related either. Ultimately the editor crashed when I finally closed it down yesterday, which has actually been a pretty rare occurrence for me so far in v2022.
Please report a bug - it’s something different from what it was a year ago.
I can’t reproduce it. But even if I could, I wouldn’t be able to tell you with any certainty what conditions lead to its emergence. Those errors provide no stack trace and aren’t very descriptive to the user.
full trace
State comes from an incompatible keyword space
0x00007ff7ac64b5cd (Unity) StackWalker::GetCurrentCallstack
0x00007ff7ac652329 (Unity) StackWalker::ShowCallstack
0x00007ff7ad5b9713 (Unity) GetStacktrace
0x00007ff7adc4314d (Unity) DebugStringToFile
0x00007ff7adc42e72 (Unity) AssertImplementation
0x00007ff7ac35592c (Unity) keywords::LocalKeywordState::ResizeAndValidateSpace
0x00007ff7adca912d (Unity) AdjustParsedFormToKeywordSpace
0x00007ff7adcaa3ee (Unity) Shader::CreateFromParsedForm
0x00007ff7adca948b (Unity) Shader::AwakeFromLoad
0x00007ff7ac625a2f (Unity) AwakeFromLoadQueue::InvokePersistentManagerAwake
0x00007ff7ac62649c (Unity) AwakeFromLoadQueue::PersistentManagerAwakeFromLoad
0x00007ff7ac626603 (Unity) AwakeFromLoadQueue::PersistentManagerAwakeFromLoad
0x00007ff7ac5f8dc2 (Unity) PersistentManager::IntegrateAllThreadedObjects
0x00007ff7ac5f9850 (Unity) PersistentManager::LoadAndIntegrateAllPreallocatedObjects
0x00007ff7ac5fd7a2 (Unity) PersistentManager::ReadObject
0x00007ff7ad074deb (Unity) GetAllShaderInfo
0x00007ff7abe2285e (Unity) ShaderUtil_CUSTOM_GetAllShaderInfo
0x0000025a180965c7 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.ShaderUtil:GetAllShaderInfo ()
0x0000025a180959cb (Mono JIT Code) UnityEditor.MaterialEditor/ShaderSelectionDropdown:BuildRoot ()
0x0000025a180956fd (Mono JIT Code) UnityEditor.IMGUI.Controls.CallbackDataSource:FetchData ()
0x0000025a180956b5 (Mono JIT Code) UnityEditor.IMGUI.Controls.AdvancedDropdownDataSource:ReloadData ()
0x0000025a18095523 (Mono JIT Code) UnityEditor.IMGUI.Controls.AdvancedDropdownWindow:OnDirtyList ()
0x0000025a1809504b (Mono JIT Code) UnityEditor.IMGUI.Controls.AdvancedDropdownWindow:Init (UnityEngine.Rect)
0x0000025a18094adb (Mono JIT Code) UnityEditor.IMGUI.Controls.AdvancedDropdown:Show (UnityEngine.Rect)
0x0000025a1c7671c3 (Mono JIT Code) UnityEditor.MaterialEditor:ShaderPopup (UnityEngine.GUIStyle)
0x0000025a1c766cd3 (Mono JIT Code) UnityEditor.MaterialEditor:OnHeaderControlsGUI ()
0x0000025a1c765cda (Mono JIT Code) UnityEditor.Editor:smile:rawHeaderGUI (UnityEditor.Editor,string,single)
0x0000025a1c765303 (Mono JIT Code) UnityEditor.MaterialEditor:OnHeaderGUI ()
0x0000025a35ce87f9 (Mono JIT Code) UnityEditor.Editor:smile:rawHeader ()
0x0000025a35ce858b (Mono JIT Code) UnityEditor.UIElements.EditorElement:smile:rawEditorLargeHeader (UnityEditor.Editor[ ],bool&)
0x0000025a35ce80b3 (Mono JIT Code) UnityEditor.UIElements.EditorElement:smile:rawEditorHeader (UnityEditor.Editor[ ],UnityEngine.Object,bool&)
0x0000025a35ce722b (Mono JIT Code) UnityEditor.UIElements.EditorElement:HeaderOnGUI ()
0x0000025a34958aff (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:smile:oOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
0x0000025a34957c1b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
0x0000025a35c503cb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool)
0x0000025a35c50233 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool)
0x0000025a35c4ff0b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool)
0x0000025a35c4fdf3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool)
0x0000025a34745b8b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleEvent (UnityEngine.UIElements.EventBase)
0x0000025a3472e6a9 (Mono JIT Code) UnityEngine.UIElements.EventDispatchUtilities:PropagateEvent (UnityEngine.UIElements.EventBase)
0x0000025a35c4f03b (Mono JIT Code) UnityEngine.UIElements.MouseEventDispatchingStrategy:SendEventToRegularTarget (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.BaseVisualElementPanel)
0x0000025a35c4ef4b (Mono JIT Code) UnityEngine.UIElements.MouseEventDispatchingStrategy:SendEventToTarget (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.BaseVisualElementPanel)
0x0000025a35c4d213 (Mono JIT Code) UnityEngine.UIElements.MouseEventDispatchingStrategy:smile:ispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x0000025a3472d4de (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool)
0x0000025a3472cfdb (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x0000025a347339bb (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEventQueue ()
0x0000025a34731e63 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:OpenGate ()
0x0000025a34731d9b (Mono JIT Code) UnityEngine.UIElements.EventDispatcherGate:smile:ispose ()
0x0000025a3472d263 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x0000025a3472c9e3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:smile:ispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
0x0000025a3472c85b (Mono JIT Code) UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
0x0000025a348f358b (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:smile:oDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
0x0000025a348f3033 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
0x0000025a348f2e4f (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
0x0000025a348f2d6b (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
0x0000025a348f2bcd (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
0x0000025a348f2c86 (Mono JIT Code) (wrapper runtime-invoke) :runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
0x00007ffb0345e0a4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007ffb0339e744 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
0x00007ffb0339e8dc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
@ngfilms please submit a bug report 
AFAIK this code didn’t change much recently, so we will need the shader that reproduces this crash to fix it.
Can confirm about the errors in latest 2021 LTS.
state comes from an incompatible keyword space
incompatibile keyword states
These 2 are occuring, but cant repro also
2021.3.5 error happens
without any stack
Still happening in 2021.3.7f1
I reported a bug, happen on 2021.3.8f1
@stevenchan_playstudios yours has a different stack trace.
I recently fixed this one; will post here when I know in which version the fix will appear.
Don’t know if this helps
In my case, I built addressable and it always give me “State comes from an incompatible keyword space” error
Then, I go to package to add some debug log and got the location of the bugs:
1st time: the bug is between “Run 3.4.3” and “Run 3.4.4”
2nd time: after I restart my computer, the error is the same but at different location, when I double click at the error, it pointed at the line 214
I use Unity 2021.3.6f1
I can’t show you my project cause it quite big and a private one. My bad
Does it affect the built addressables?
Yes - affects Asset Bundles and, inherently, Addressables.