Skip to content

Constant NullReferenceException with Reduced Rates active #18

Open

Description

@joelspadin

When the company action Reduced Rates is active, I get repeated null reference exceptions in ActorEntityHelper.cs line 201. statusEntry.StatusID is 0, and StatusEffectHelper.StatusInfo() returns null.

Activity

  1. Icehunter commented on Apr 13, 2015

    @Icehunter
    Member
  2. joelspadin commented on Apr 13, 2015

    @joelspadin
    ContributorAuthor

    Reduced Rates was the only buff/debuff up at the time, but after looking at it again, I don't think it's related to that specific buff.

    The status ID was 0. StatusEffects did contain a key "0" which apparently had a value of null, as StatusEffects.ContainsKey(id) returned true. When I inspected StatusEffects with the debugger, it had a two or three keys with values of null at the beginning. I restarted the program, and StatusEffects no longer has those keys, so I am not sure what happened. It looks like StatusInfo() is called repeatedly with ID 0, and StatusEffects somehow got modified or corrupted.

  3. added a commit that references this issue on Apr 13, 2015
  4. Icehunter commented on Apr 13, 2015

    @Icehunter
    Member

    Code-wise though it shouldn't do that; so it's a mystery to me right now. There's a lock on the array and zero never exists so it should always return a default unknown status.

    I'll have to look at that more.

  5. joelspadin commented on Apr 13, 2015

    @joelspadin
    ContributorAuthor

    I'll let you know exactly what the contents of StatusEffects look like if I see it happen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions