Search Issue Tracker
Fixed in 2022.2.X
Votes
0
Found in
Issue ID
1388565
Regression
No
"Duplicate identifier" error can report the wrong object identifier
In the case of merge problems some portion of a YAML -format Unity file might be repeated more than once in an asset file.
If an object is repeated this will be reported with a message like:
Duplicate identifier 624274415. File: "Assets/DuplicateFileIDs.unity".
However when the file ID is greater than 2^31 (2,147,483,647) then the wrong value is printed, which can make it hard to pinpoint the problematic part of the file for manual repair.
Repro steps:
-Create a simple Prefab
-Open the prefab file in a text editor
-Find an object with an identifier that is more that 2147483647 (the id is randomly generated)
-Copy and past that object so it appears twice in the file
-Save the prefab file
-Refresh the asset database and click on the prefab
Expected Result: Several error messages will be logged, including one "Duplicate identifier " and quoting the correct id
Actual Result: the error message shows a seemingly random id, which might be negative
Context:
The identifier printed is the local file identifier, and corresponds to the first line of a serialized object within the scene, prefab or other asset file, for example:
"--- !u!1 &624274415"
By definition each object within a serialized file must have its own unique identifier. The most common cause of duplicate values is when a merge conflict or other operation on the text file has caused some portion of the contents to be duplicated within the file.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Rendering locks up when not looking at a transparent material on Meta Quest 2
- Volumetrics break when using a Custom Pass to create a Thickness Buffer for Alpha Clipping
- All tests are run instead of only the failed ones when the "Rerun Failed" button is pressed
- GameObject is not masked when the "Render PostProcessing Effects" pass executes with a resolved non-MSAA Color target and MSAA DepthStencil target
- [Android] Gfx.WaitForGfxCommandsFromMainThread high performance usage and inconsistency when built Player scene has Canvas GameObject on a specific Project
Resolution Note (fix version 2022.2):
Fix error messages to properly support 64-bit identifiers
Fixed inĀ 2022.2.0a2