2019.3 regressions / bugs that occur often but not sure how to reproduce

During my usage of 2019.3 (which is pretty much around the clock these days), me and my colleagues encountered a couple of bugs that I consider showstoppers but that I wasn’t able to reliable reproduce. These bugs happened on different machines, different projects, but all with the current beta.

(1) Serialization issues with AssetDatabase v2 and git
In two projects, we have an occassional issue where the same assets on two different machines have separate meta files (without touching these assets, at least knowingly). This causes all kinds of weird stuff to happen; e.g. whenever someone saves a scene and pushes it, the other person now has broken references in their scene, without a clear way to resolve, since the Library seems to have the wrong meta info while the files on disk use the right one. Rightclick > Reimport on those assets sometimes immediately solves the issue (and makes the Library be in sync with the meta on disk again).

(2) Shader keyword issues
In all projects on all machines, changing material options and this affecting the set shader keywords is random at best and downright wrong in some cases. This is happening a lot, but whenever I try to isolate it for a bug report it stops happening. When it happens it’s very clear what’s going wrong:

  • create a new Material (e.g. Universal/Lit)
  • assign it to a scene object
  • add a normal map to it
  • note that the material does not update, neither in scene view nor material preview
  • click on the “Opaque/Transparent” dropdown and select either (even the same as was previously active)
  • material now updates and properly shows normal map
  • this happens for multiple different properties. Sometimes it only happens a single time per material, sometimes it happens on every change that internally should cause keywords to change (e.g. turning emissive on), and it can always be “worked around” by changing the material type and then changing it back.

Edit: I tried again and it seems in latest betas it is far easier to reproduce (happens all the time and even persists after Editor restarts and builds):
(Case 1197217) [Shader Keywords] Changing material options does not properly set shader keywords
Also note that I was able to even reproduce that in 2019.2 now.

(3) Prefab serialization issues after Unity upgrades
Upgrading throughout the Beta was painful. Every update broke a subset of our Prefabs, in a way that while a value was overriden in a scene it was not detected as an override, thus couldn’t be reverted, and such the value in scene and prefab where different with no way to resolve. Interestingly, this seems to be v2 Assetdatabase as well - deleting the scene file referencing the prefab from outside Unity, focussing into Unity, then going back to Explorer, undoing the delete and focussing Unity again forced Unity to actually read the file and everything was working again.
We had that on every beta update so far.

(4) Scene Selection issues
On multiple projects on the current Beta, at a random point while working (usually after entering and exiting playmode), selection in the scene stops working. One object is “stuck” being selected, and clicking on other objects does not change the selection.
This can only be fixed with an Editor restart.

(5) Scene Transform Gizmo issues
The usability of the Rotation Transform gizmo strongly regressed in the current beta, or at least it feels like that. 30% of the time, when you try to rotate on one of the axes, it will randomly select another one for rotation, even if the click is very visibly in the right place. A workaround is rotating the scene a lot and finding the right place, but that’s a workflow hell.
Video that shows the bug in action (watch carefully where the mouse cursor is and which rotation ring is highlighted):

I’ll update this as I remember more. This is just off the top of my head as it seems Unity is getting close to leaving beta state and then everyone will have those issues.

@LeonhardP would be awesome to get your input on this - is some of this known / being worked on?

2 Likes

Hey fherbst,

Thanks for posting this, some quick question. What version of the beta are you using and could you supply the package manifest

Thanks a lot!

All the versions! I use everything from 0b3 to 0b9 daily.
Regarding manifest: I attached some of projects where the problems happen. Note that some of those have custom SRP versions, others not. Also I stripped out our custom registry packages (which are in some but not all of those projects).

5153333–510569–SomeManifests.zip (1.9 KB)

I was able to reproduce (2) just now and have reported a bug:
(Case 1197217) [Shader Keywords] Changing material options does not properly set shader keywords
Also note that I was able to even reproduce that in 2019.2 now.

Additionally, I captured a video of (5):

1 Like

Thanks @fherbst ! We’ve reached out to the different teams.

This issue was fixed in 2019.3.0b5. https://issuetracker.unity3d.com/product/unity/issues/guid/1174967/
Could you please check if it still happens for you in releases after b5?

The team is not aware of overrides failing like that. More details around the setup or reproduction steps would be much appreciated.

I had (5) Transform Gizmo issues also with 0b7 + 0b8. I’ll try again and record a new video (the one above is indeed from 0b3).

Regarding (3) Prefab serialization issues:
I had an issue today that I think might be related and that I was able to reproduce.
It seems that in some cases, the library representation of a file can be different to what the actual file on disk says. Reimporting does not fix the issue if whatever reimports the file decides there is no work to do (e.g. no actual change to the file is detected, so the incorrect Library data is not overwritten).
After working around the issue (by repeatedly reimporting / opening / saving files with no changes / undoing changes to finally cause an actual reimport) absolutely no change to the files is recorded in external source control, leaving the AssetDatabase / Library as only place where stuff can go wrong. Coworkers need to do all the same manual workaround steps since their library will be broken as well and there’s no actual source control update.

Here’s the case (reproduction is with ShaderGraph but I think the underlying issue might be the same): (Case 1197388) [Asset Database] Library has incorrect data after moving files that are used in ShaderGraph, prevents building

@LeonhardP @JohnC_Unity I urge you to read that bug description carefully and expedite testing on this. Best case it’s “just” a shader compilation issue, but it might be a bigger underlying issue with AssetDatabase (as I think we’re seeing the same issue with moved / changed prefabs and nested prefabs and variants).

1 Like

With regard to these .meta files, could you verify that the line endings are the same for both machines? We’ve seen issues where there are ‘\r\n’ and ‘\n’ line endings on the same project, and on the same OS but for various .meta files. If you believe Git is the issue, there is a way to force Git to adhere to a particular line ending setting: Configuring Git to handle line endings

If that doesn’t help we can have a closer look :slight_smile:

@Unity_Javier yes, all these machines (should) use the same settings, we’re just using SourceTree with “embedded git” with the default git behaviour on Windows without messing with it. I will double-check on monday though.
That being said, what would be the right setting? How does Unity expect meta files to be line-ended?

Also, as I wrote reimport sometimes fixes the issue (or deleting the file and undoing the delete), without showing a change in git, which led me to assume it’s rather something with the Library.

@LeonhardP I think Prefab modifications are constantly changing serialized data order and cause version control noise might be related to (1) and/or (3), not sure. I think what might have happened is that for very large nested prefab structures, the reordering on serialization causes issues with the way git (and other source control tools) merge stuff, resulting in incorrect fileIDs. Just a wild guess for now, I haven’t been able to reproduce it yet.

Thank you, much appreciated! We’re investigating.

This bug was fixed in 2020.1.0a11 and backports are on their way. Let’s see what QA will find and whether the fix also resolves 1) or 3).
https://issuetracker.unity3d.com/issues/re-serialization-make-changes-to-nested-prefabs

1 Like

More stuff!

Sometimes LineRenderer inspector produces errors:
(this happens both with LineRenderer enabled and disabled)

5170973--513110--upload_2019-11-13_15-50-4.png

5170973--513122--upload_2019-11-13_16-5-32.png

This is not a known issue. If you’re able to reproduce it, a bug report would be much appreciated.

I’m always having the problem with line rend in HDRP 7.1.2.
Create it, set material and activate it or disable it.
Console produces this:

ArgumentException: Getting control 33's position in a group with only 33 controls when doing mouseDown
Aborting
UnityEngine.GUILayoutGroup.GetNext () (at <ede85b10691a411faa239e6306258393>:0)
UnityEngine.GUILayoutUtility.DoGetRect (System.Single minWidth, System.Single maxWidth, System.Single minHeight, System.Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at <ede85b10691a411faa239e6306258393>:0)
UnityEngine.GUILayoutUtility.GetRect (System.Single minWidth, System.Single maxWidth, System.Single minHeight, System.Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at <ede85b10691a411faa239e6306258393>:0)
UnityEditor.EditorGUILayout.GetControlRect (System.Boolean hasLabel, System.Single height, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at <52c46852ed4749ed926125cda2005635>:0)
UnityEditor.EditorGUILayout.GetControlRect (System.Boolean hasLabel, System.Single height, UnityEngine.GUILayoutOption[] options) (at <52c46852ed4749ed926125cda2005635>:0)
UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at <52c46852ed4749ed926125cda2005635>:0)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at <52c46852ed4749ed926125cda2005635>:0)
UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, UnityEngine.GUILayoutOption[] options) (at <52c46852ed4749ed926125cda2005635>:0)
UnityEditor.RendererEditorBase.DrawRendererPriority (UnityEditor.SerializedProperty rendererPrority, System.Boolean useMiniStyle) (at <52c46852ed4749ed926125cda2005635>:0)
UnityEditor.RendererEditorBase.OtherSettingsGUI (System.Boolean showMotionVectors, System.Boolean showSkinnedMotionVectors, System.Boolean showSortingLayerFields, System.Boolean showRayTracingModeField) (at <52c46852ed4749ed926125cda2005635>:0)
UnityEditor.LineRendererInspector.OnInspectorGUI () (at <52c46852ed4749ed926125cda2005635>:0)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass53_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <52c46852ed4749ed926125cda2005635>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Could you please submit a bug report?

Console always throws this when you create it, set material and activate it or disable it. Wehn you clear the console and repeat it the steps, the same appears. So I don’t think it’s even worth it to report.
My upload takes a long time. HDRP projects takes even longer.

I also couldn’t create a bug report for it, that’s why I posted it in this “collection thread”.

Here’s one more, this time when assigning a material to a prefab and then applying all overrides:


Also, what I’m seeing a lot especially in later betas is that opening windows causes errors in EditorStyles etc, iterating over style lists internally etc. These are usually gone after Unity restart but they make the new UI system not feel very stable.

New UI isn’t really needed and should be made optional.
Other improvements and workflow simplification need more attention.

Hey @konsic , this thread is supposed to improve 2019.3 release quality by pointing out a couple of issues that I wasn’t able to reliably reproduce. Please open a separate thread if you want to voice your opinion about other topics.

1 Like