Search Unity

[BUG][CASE 1175938] Issue with fbx & Addressables Analyzing rules

Discussion in 'Addressables' started by aurelien-morel-ubiant, Aug 12, 2019.

  1. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    214
    Hello @unity_bill

    Current behaviour :
    Some of our FBX files seems to be considered as duplicated ones whereas they are used only by one bundle.

    How to reproduced :
    When I go into the Addressables window management :
    Window/Asset Management/Addressables

    It's possible to generate a check of your assets by clicking on Analyze.
    In the Analyze Rules/Fixable Rules
    You can "Check Duplicate Bundle Dependancies" and with this it's possible to easily generate a common bundle for all assets shared between bundles.

    If you execute it on this sample project (which a small part of one of our big project), you can see some duplicate assets in the result which is normal for those :
    - Assets/Textures/TXR_3D_Common_Palette_128x128
    - Asstes/Materials/MAT_Common_Palette

    cause they are shared between both assets in the project.

    BUT
    You can see "Assets/Models/Shower_01.FBX" in the result too (in the plumbing shower bundle part) which is not normal cause this asset is shared with no other.

    In this sample example it happens with the shower fbx file but in our main project it happens on others assets too but not all FBX which is quite odd.

    You or your QA Team will find all what you/they need to reproduce this.
    If it's an intended behaviour, I would be glad to hear the explanation. I tried to debug the
    CheckForDuplicateDependencies
    part but it's quite painful to debug the linq part into
    CalculateDuplicates
    method, so I think you will be faster than me to retrieve this :)

    Cheers,
    Aurélien.
     
  2. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    572
    I'd say that as far as the AssetDatabase is concerned, Shower_01.FBX *is* shared with something else. All that LINQ statement does is find which GUIDs are in multiple bundles (where dupeGuid.Value.Count > 1).

    At that stage the packing into bundles has already happened, so you cannot really get any information beyond what bundles it is being packed into.

    You might be able to infer what the issue is by looking at the bundles themselves, just peek into the dictionary.

    You can write code to find out what exactly is referencing it but that might not be necessary.
     
  3. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    214
    My point is that shower_01.FBX is not shared with anything else. That's why I'm really sceptical on this result during the checking phase. I know something happens before this test but I can't figure out what. I will take another look tomorrow at the office just in case.
     
  4. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    572
    It does a full build all the way until the calculation of packing into bundles, you can have a look at that in the base class of the dupe rule and/or breakpoint it there. If that file is in the output it means that it comes up in two asset bundles, regardless of whether it’s supposed to or not.
     
  5. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    829
    It's very possible we have a bug. The important question is if the bug is in our analyze code (seeing a dupe that isn't there) or in the build (creating a dupe it shouldn't).

    The analyze results should tell you which groups we think the fbx is in. So it should be easy for you to figure out which group we think it's in, but you think it shouldn't be. From there you could move stuff out of that group until you pinpoint the problem. If it is a false linkage, we'd love a repro project so we could track it down.
     
  6. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    214
    @unity_bill I sent a repro project to unity bug tracker. The ticket number is in the current forum post title.
    If I have time to check this before mid-week, I will.
     
    Last edited: Aug 20, 2019 at 7:25 AM
  7. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    829
    Thanks! I just took a quick glance at it, and yeah, that doesn't seem right. Clearly the fbx is added in when it shouldn't be. We'll dig into it.

    Thanks again for making the ticket!
     
    aurelien-morel-ubiant likes this.