Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Buttons stop working on mobile (IOS / Android)

Discussion in 'UGUI & TextMesh Pro' started by nventimiglia, Oct 21, 2014.

  1. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
    I was wondering if anyone else has had issues where input would stop working on mobile.

    In my case I have a "pause menu" with a background image and several buttons. If I open the menu and close the menu several times the event system will stop working. This issue also pops up on other screens but I am unable to replicate those very well.

    To make it worse, the issue only appears when connected to photon.

    If this is not a known issue I would go ahead and start up a demonstration project... or try to. The current problems are really really deep in a really large project (that would take QA a really long time to resolve).
     
    Last edited: Oct 22, 2014
  2. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
    I plugged the game into logcat. I got some null exceptions !

     
  3. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
  4. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
    Replicated on desktop... but only when connected to Photon.


    MissingReferenceException: The object of type 'Image' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    UnityEngine.Component.GetComponent[CanvasRenderer] () (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/UnityEngineComponent.cs:189)
    UnityEngine.UI.Graphic.get_canvasRenderer () (at C:/BuildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/UI/Core/Graphic.cs:193)
    UnityEngine.UI.Graphic.get_depth () (at C:/BuildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/UI/Core/Graphic.cs:154)
    UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.Canvas canvas, UnityEngine.Camera eventCamera, Vector2 pointerPosition, System.Collections.Generic.List`1 results) (at C:/BuildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/UI/Core/GraphicRaycaster.cs:180)
    UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1 resultAppendList) (at C:/BuildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/UI/Core/GraphicRaycaster.cs:104)
    UnityEngine.EventSystems.EventSystem.RaycastAll (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1 raycastResults) (at C:/BuildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/EventSystem/EventSystem.cs:134)
    UnityEngine.EventSystems.PointerInputModule.GetMousePointerEventData () (at C:/BuildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/EventSystem/InputModules/PointerInputModule.cs:145)
    UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () (at C:/BuildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/EventSystem/InputModules/StandaloneInputModule.cs:276)
    UnityEngine.EventSystems.StandaloneInputModule.Process () (at C:/BuildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/EventSystem/InputModules/StandaloneInputModule.cs:159)
    UnityEngine.EventSystems.EventSystem.Update () (at C:/BuildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/EventSystem/EventSystem.cs:228)
     
  5. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,181
    I believe this issue has been fixed internally for the next releasee.
     
  6. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
    21 or 22 ?
     
  7. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,181
  8. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
    22. The problem is happening much more in 21 actually.
     
  9. waldgeist

    waldgeist

    Joined:
    May 6, 2017
    Posts:
    354
    Same problem here. Just did a rebuild for an iOS app that worked before (same code version), but suddenly I am getting these NullReference exceptions. Did you ever resolve this?