Search Unity

Bug NullReferenceException within RemoteConfig

Discussion in 'Unity Remote Config' started by blockimperium, Apr 26, 2020.

  1. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
    For reasons that I cannot explain, RemoteConfig is throwing an error INSIDE of the RemoteConfig code:

    NullReferenceException: Object reference not set to an instance of an object
    Unity.RemoteConfig.Editor.RemoteConfigWindow.OnDisable () (at Library/PackageCache/com.unity.remote-config@1.0.9/Editor/RemoteConfigWindow.cs:112)

    The only way to resolve this was to undock the RemoteConfigWindow from the Unity environment and reopen it and re-dock it.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Are you still seeing this error? Please provide steps to reproduce, and the version of Unity and RC that you are using.
     
  3. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
    Yeah. I just received one today from a Managed Stack Trace:

    Unity.RemoteConfig.Editor.RemoteConfigWindow.OnDisable () (at Library/PackageCache/com.unity.remote-config@1.0.9/Editor/RemoteConfigWindow.cs:112)

    Not sure why it is happening so I'm not sure how to reproduce that.

    One thing I can saw that went weird was that I created a new environment called "Testing" in the cloud environment. I had created another "Production" that I had deleted.

    upload_2020-4-28_15-50-50.png
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you share the code that you are using? Does this happen when you run your game in the Editor? And can you elaborate on 'went weird', did you get the same error when you created an environment?
     
  5. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
    Here is a recording of the weirdness. Still haven't found a way to fix this particular issue - or maybe its just not intuitive somehow:

     

    Attached Files:

  6. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
    From a UX perspective, mentally those breadcrumbs just beg to be clicked because that's the way they are everywhere else. That's not a defect, but definitely a UX improvement that would be welcome.
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Understood, your issue is with the UI and not in your code, you had originally reported a NullReferenceException. Thank you for the feedback!
     
  8. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
    I'm still getting that NullReferenceException. Not sure what's causing that, but assuming that it's somehow related to this as that would be the only thing different from my situation and the demos that I see online.
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please show your code that is returning the NullReferenceException, I didn't see it in the video. Apologies if I missed it. Is this in the Unity Editor when you run your game, or on the online Remote Config Dashboard? Please attach a screenshot of the NRE
     
  10. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
    It's not in MY code where the error is happening. The error is happening in Unity itself, that's why I can't help you reproduce it.

    upload_2020-4-29_16-36-46.png
    upload_2020-4-29_16-37-55.png
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I understand now that you are looking at crash reports, I was trying to understand where you were seeing the NRE, perhaps in the Console window. You mentioned docking and undocking the RC dialog in the Editor is what creates this error, can you avoid it for now by keeping it docked? This would be in editor code only, and would not affect game play.
     
    Last edited: Apr 29, 2020
  12. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
    Yep. Absolutely. It's more just reporting a defect than something that is causing debilitating problems (outside of the Environment purgatory since there is no way to delete them in either the editor or the dashboard ).
     
  13. vd_unity

    vd_unity

    Unity Technologies

    Joined:
    Sep 11, 2014
    Posts:
    41
    Hi @gregorypierce ,
    We are sorry you are experiencing issues when deleting environments via dashboard.
    Dashboard team is working to resolve that issue.

    I see you are using editor package version 1.0.9 where there is no way to delete an environment.
    At that point in time, two environments (Development and Release) were automatically created for you on the backend.

    However, from the version 1.1.0 and above, we introduced CRUD for environments in the editor,
    so, you can delete an environment by:
    - Click on Edit button next to environment dropdown
    - Click Delete (delete button will be enabled only if that environment is not default)

    So in your case, at this point the only way to delete an environment is to upgrade your package version, and remove unwanted environment(s) from the editor (see attachments)

    It could be that you got in this awkward state because you somehow deleted 'Production' environment which was created for you in 1.0.9 by default, so if you can upgrade the package version, and delete unwanted environment(s), we would like to know if that would alleviate your issue. By deleting environment you will lose your corresponding config. Once again, we are very sorry for the confusion that happened.
     

    Attached Files:

    Last edited: Apr 30, 2020