Search Unity

[Solved] (0,0): Object reference not set to an instance of an object

Discussion in 'Entity Component System' started by Antypodish, Aug 9, 2018.

  1. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,779
    I think is ECS problem.

    (0,0): Object reference not set to an instance of an object

    The error message is meaningless to me. Not pointing anywhere.
    Got multiple of them and can not be cleared.

    Many of my ECS projects now how this error, after some random crash.
    Unable to resolve.
    Trying copy assets to working project.
    Trying reload assets.
    Delete temp and other files.
    I even deleted all files from asset then rebuild empty project. No avail.
    And Package Manager is gone from Window menu.


    So far only one project ECS related, I was able open successful. But I haven't checked them all.

    Any thoughts?
     
  2. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    Try removing your manifest file and getting packages from the package manager window.
     
  3. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,779
    Nope. Don't help much :(
    I tried to remove everything. Other than leaving scene with 4 small ECS files (30 lines or so).
    Restarting Unity
    Installing ECS adn Burst
    Switching .Net to 4.0

    And now getting bunch of these
    (0,0): Unable to start the incremental compiler service:System.Exception: Subscribe exception: EAGAIN(11): Resource temporarily unavailable
    System.Threading.ThreadHelper:ThreadStart()


    along with

    (0,0): Object reference not set to an instance of an object

    However, the first one errors are gone, one I press clear in console. Second stays.

    Running Unity 2018.2.0.b4 64bit with ECS preview 12.
    Previously had other issue. It worked fine with my template. Now template don't even work. Something is written either to registry or to the Unity installation folder. Alternatively into system user location data.

    Is becoming quite frustrating now.

    What version of Unity and ECS you are on?

    In meantime, I have submit a bug report with project.

    For now, I am downloading 2018.2.2.f1
    Maybe this will solve issue?
     
  4. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    Can you try only installing the ECS and not the Burst? The Burst package causes that error on my end.
     
  5. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Not sure this is your issue, but why are you running a beta version of unity when the full release of 2018.2 has been out for a while now. Especially a particularly old beta version.
     
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,779
    Just didn't upgraded every sub version of beta.


    Bu now, event with latest Unity 2018.2.2f1, after staring new project with only asset folder, and 3 cs files and scene.
    Then after switching to .NET 4.
    Restarting Unity.
    Importing only Entities (as starikcetin suggested), package 0.12 Preview 8.

    Getting error Again:

    C:/Users/.../AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.entities@0.0.12-preview.8/Unity.Entities/SerializeUtility.cs(159,78): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 6.0 language specification

    Restarting Unity
    And getting same errors as in previous post

    (0,0): Object reference not set to an instance of an object

    Removing all files from asset
    Restarting Unity

    And all same circle.

    Even with new pure project and fresh Entities package ;(

    Just driving in circles.


    Anyway, thx guys.
    For now I will pass with ECS.
    I will work on concept instead, and research methods, until somehow ECS start working back on my PC (win7).
    At least managed to make some initial tests with BulletSharp.
     
  7. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    By the way, this is more of a Visual Studio issue with the incremental compiler than specifically an ECS problem.
    Other IDEs (rider) don't have the issue. From other topics on this, for whatever reason downgrading to .11 stops VS having the problem though I haven't tested (I switched to rider as VS has too many issues at the moment with Unity 2018.2)
     
    Last edited: Aug 10, 2018
  8. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,779
    Maybe. But I don't expect, even if I would change IDE that would resolve the issue. At least it is not guaranteed i my case. It gives some thoughts tho.

    I am generally ok with VS, other than be linked to M$. But few hickups are still there from early MonoDevelop times, which are not fixed for this days.
     
  9. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    I'm telling you with 99% certainty if you changed to rider this issue would disappear.

    I love visual studios, it's my favourite ide, it just has a bunch of issues with latest unity. Unfortunately rider isn't free.

    There was a stickied thread in the 2018.2 beta forum about it: https://forum.unity.com/threads/issues-with-visual-studio-unity.514304/

    A lot were solved but the experimental packages still have issues.
     
    Last edited: Aug 10, 2018
    Antypodish likes this.
  10. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,779
    Oh I see,
    Maybe this is indeed related.

    Quickly skimmed through. according to response #190, I deduct, that number of issues will be resolved in 2018.3.
    I have seen some supposedly free version of Raid IDE, but not sure how genuine it was, and if related much, since haven't investigated too deep. It was just a quick read, what exactly it is. I have seen of course the paid version too.

    I think I will give a big WAIT + ECS, until 2018.3 and see, where I will be heading from there. Not sure if is worth wasting my time, fighting with Unity + ECS, if new Unity is round the corner.
     
  11. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    I use Rider, the error is still there.

    It is about the version of the entities package. Version 0.0.12-preview.4 doesn't have this issue. All version above does.
    I have a topic about this error: https://forum.unity.com/threads/fea...ed-error-on-entities-0-0-12-preview-5.534240/
     
    Antypodish likes this.
  12. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,779
    HA,

    Amazingly that indeed worked!
    Installing Version 0.0.12-preview.4 solves most of problems.
    Just now Bullet Sharp doesn't work.
    But that is least of two evils. :D

    Much appreciated starikcetin

    Even you mentioned, I my try with subsequent higer previews, just to see is is the case for me. But preview 4 does the job indeed. Superb.
     
  13. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Strange. Switching from VS to rider solved the exact error for me and I've used every version since without issue.

    Glad you found a solution anyway .
     
  14. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    That is very interesting. Obviously, it wasn't the IDE that was causing the issue, but maybe something to do with compile settings? Switching to Rider must have changed them.
     
  15. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,779
    I am still thinking, there is something outside project folder, what is saved and referenced, or whatever, as previously project worked on same version of unity. And at sudden, many of ECS projects stopped working at once. Until changing to Preview 4.