StrangeLoopGames / EcoIssues

131 stars 21 forks source link

[0.9.0 staging-1316] Work party: client crash with labor adding #14281

Closed beastyn closed 4 years ago

beastyn commented 4 years ago
  1. One person has created a party like that bandicam 2019-12-30 15-21-38-471
  2. Second person has taken a role in this party and trying to applay some labor. Crash
    System.NullReferenceException: Object reference not set to an instance of an object.
    at Eco.Gameplay.Economy.WorkParties.ThresholdPayment.WorkPerformed(Laborer laborer, Single percentPerformed)
    at Eco.Gameplay.Economy.WorkParties.WorkParty.<>c__DisplayClass29_0.<OnWorkPerformed>b__1(Payment x)
    at System.Linq.Enumerable.SelectIListIterator`2.MoveNext()
    at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.ToArray()
    at Eco.Shared.Utils.StringExtensions.TextList(IEnumerable`1 e, String sep)
    at Eco.Gameplay.Economy.WorkParties.WorkParty.OnWorkPerformed(User user, Single percentDone, Int32 weight, String message)
    at Eco.Gameplay.Economy.WorkParties.LaborWork.UpdateWorkDone(User user, Single quantity)
    at Eco.Shared.Utils.ListExtensions.ForEach[T](IList`1 list, Action`1 action)
    at Eco.Shared.Utils.EnumerableExtensions.ForEach[T](IEnumerable`1 enumeration, Action`1 action)
    at Eco.Gameplay.GameActions.ActionUtil.ActionPerformed(GameAction action)
    at Eco.Gameplay.GameActions.GameActionManager.TryPerformActions(User user, IEnumerable`1 actions, IEnumerable`1 preTests, IEnumerable`1 postEffects)
    at Eco.Gameplay.GameActions.GameActionManager.TryPerformActions(User user, GameActionPack actionPack, Boolean notify)
    at Eco.Gameplay.GameActions.GameActionManager.TryPerform(GameActionPack pack, Boolean notify)
    at Eco.Gameplay.Items.WorkOrder.TryToContributeLabor(Player player, Single contributionMultiplier)</size>
  3. After reloading labor will be applied bandicam 2019-12-30 15-29-51-490
johnkslg commented 4 years ago

Fixed image