Author Topic: Wierd Exception in edit-time (NGUI v. 3.0.5)  (Read 2391 times)

dkozlovtsev

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 35
    • View Profile
Wierd Exception in edit-time (NGUI v. 3.0.5)
« on: November 22, 2013, 08:57:29 AM »
The following exception occasionally happening to me when i'm trying to change UILabel text and/or font in edit-time(custom localization), i'm using only public UILabel API and made no changes to it

  1. MissingReferenceException: The object of type 'UILabel' has been destroyed but you are still trying to access it.
  2. Your script should either check if it is null or you should not destroy the object.
  3. UIWidget.MarkAsChanged () (at Assets/Packages/NGUI/Scripts/Internal/UIWidget.cs:531)
  4. UILabel.MarkAsChanged () (at Assets/Packages/NGUI/Scripts/UI/UILabel.cs:787)
  5. UnityEngine.Font.InvokeFontTextureRebuildCallback_Internal () (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/Graphics.cs:4543)
  6. UnityEngine.Font:RequestCharactersInTexture(String, Int32, FontStyle)
  7. NGUIText:WrapText(String, Font, Int32, FontStyle, Int32, Int32, Int32, Boolean, String&) (at Assets/Packages/NGUI/Scripts/Internal/NGUIText.cs:315)
  8. UILabel:ProcessText(Boolean) (at Assets/Packages/NGUI/Scripts/UI/UILabel.cs:832)
  9. UILabel:ProcessText() (at Assets/Packages/NGUI/Scripts/UI/UILabel.cs:794)
  10. UILabel:ProcessAndRequest() (at Assets/Packages/NGUI/Scripts/UI/UILabel.cs:310)
  11. UILabel:set_text(String) (at Assets/Packages/NGUI/Scripts/UI/UILabel.cs:231)
  12. LabelLocalization:UpdateLocalization() (at Assets/Packages/NGUI/Scripts/Localization/LabelLocalization.cs:38)
  13. LabelLocalization:OnValidate() (at Assets/Packages/NGUI/Scripts/Localization/LabelLocalization.cs:69)
  14. UnityEditor.SerializedObject:ApplyModifiedProperties()
  15. LabelLocalizationEditor:OnInspectorGUI() (at Assets/Packages/NGUI/Scripts/Localization/Editor/LabelLocalizationEditor.cs:22)
  16. UnityEditor.DockArea:OnGUI()
  17.  
Sometimes it messes up labels ( Until next update )
Any suggestions?

dkozlovtsev

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 35
    • View Profile
Re: Wierd Exception in edit-time (NGUI v. 3.0.5)
« Reply #1 on: November 22, 2013, 09:57:28 AM »
Oh it seems to be triggered by changin font size

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Wierd Exception in edit-time (NGUI v. 3.0.5)
« Reply #2 on: November 22, 2013, 03:52:59 PM »
I think it should be already resolved in 3.0.6, but I'll keep my eye out just in case.