Search Unity

Bug Constant data corruption in Text Component (maybe more)

Discussion in 'Editor & General Support' started by modernator24, Jun 15, 2020.

  1. modernator24

    modernator24

    Joined:
    Apr 7, 2017
    Posts:
    203
    I'm not sure when this happens, but recently I faced the issue that data inside of Text Component randomly changed or missing.

    The most common cases were the missing font and text data and eventually, the text goes invisible. Especially text inside of the button keeps disappearing.

    This issue is not only caused by a specific version because I using 4 different versions and it happens from all these versions: 5.6.1, 2017.4, 2018.1, 2019.1.

    I can sure that I didn't edit it, because this is not the first time happens, also I'm 100% didn't touch the scene at all because it's already completed scene and nothing updated recently.

    This is the original font data in the scene:

    Code (CSharp):
    1.   m_FontData:
    2.     m_Font: {fileID: 12800000, guid: 2aaece000d5e62d42ae59237e54e7527, type: 3}
    3.     m_FontSize: 32
    4.     m_FontStyle: 0
    5.     m_BestFit: 0
    6.     m_MinSize: 2
    7.     m_MaxSize: 40
    8.     m_Alignment: 4
    9.     m_AlignByGeometry: 0
    10.     m_RichText: 0
    11.     m_HorizontalOverflow: 0
    12.     m_VerticalOverflow: 0
    13.     m_LineSpacing: 1
    14.   m_Text: Buy (1G)
    And this is corrupted data:
    Code (CSharp):
    1.   m_FontData:
    2.     m_Font: {fileID: 0}
    3.     m_FontSize: 4
    4.     m_FontStyle: 0
    5.     m_BestFit: 64
    6.     m_MinSize: 4
    7.     m_MaxSize: 4
    8.     m_Alignment: 533
    9.     m_AlignByGeometry: 64
    10.     m_RichText: 131
    11.     m_HorizontalOverflow: 533
    12.     m_VerticalOverflow: -1250131760
    13.     m_LineSpacing: 7.47e-43
    14.   m_Text:
    You can see that the font family was missing and lots of data changed, like m_Alignment: 533.

    Also I there was a similar issue with using the layout group component. I'm using the Grid Layout Group component, but the all data inside of the Grid Layout Group component was reset even I didn't touch at all. I reported UI broken from one of my users, and I swear I never touched Grid Layout Group Component at all.

    I'm using Layout Group components and these components keep making changes in the scene even I didn't touch at all, mostly floating point issues, so it is really hard to know when those kinds of data corruption happen.

    This is really annoying glitch, and I faced this problem very many times recently.
     
  2. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    507
    Hi @modernator24,

    Sorry to hear that you're having such type of issue.

    I know that you don't know when this happens, but in the future, if you find the reproduction steps to trigger such a problem will be very useful to find what is actually happening.

    On the other hand... Are you using some type of version control like GIT?

    If so, you can easily check the specific moment between commits in where such files become corrupted, and then you can maybe spot the operation or change that makes this bug to happen.

    Please post here more information about it if you are able to find what's is causing this issue.

    I hope that you can find a way to reproduce it in order to be able to help you further.
     
  3. modernator24

    modernator24

    Joined:
    Apr 7, 2017
    Posts:
    203
    Yes, I'm using Git for version control. I just found the commit where this happens, and it happened when I imported the Facebook SDK package. I downloaded from here very recently: https://developers.facebook.com/docs/unity/

    And didn't do any extra works, only added Facebook SDK. I attached the screenshot captured from Github. But I'm not sure this is a Facebook SDK related issue, because I mentioned earlier this happened a lot already.
     

    Attached Files:

  4. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    507
    Well, this is weird. The only project change in this commit was adding the Facebook SDK package?

    If so... Can you try by reverting your project to the previous commit and import again the Facebook SDK package to see if your file is changed again?
     
  5. modernator24

    modernator24

    Joined:
    Apr 7, 2017
    Posts:
    203

    Attached Files:

  6. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    507
    Wow... If you just imported the Facebook SDK and your Sprite Atlas got corrupted I think you should definitely create a bug report in order to check what is happening in more detail.

    You can follow these instructions: https://unity3d.com/unity/qa/bug-reporting


    Thank you!