BASIC-BIT / Vintage-Story-Mods

GNU General Public License v2.0
1 stars 1 forks source link

1.18.5 Server Exception #2

Closed RogueRaiden closed 1 year ago

RogueRaiden commented 1 year ago

not sure what causes it, server doesn't crash

18.5.2023 18:21:38 [Server Fatal] System.NullReferenceException: Object reference not set to an instance of an object at thebasics.Extensions.IServerPlayerExtensions.GetModData[T] (Vintagestory.API.Server.IServerPlayer player, System.String key, T defaultValue) [0x00000] in :0 at thebasics.Extensions.IServerPlayerExtensions.AddCount (Vintagestory.API.Server.IServerPlayer player, System.String key) [0x00000] in :0 at thebasics.Extensions.IServerPlayerExtensions.AddPlayerStat (Vintagestory.API.Server.IServerPlayer player, thebasics.ModSystems.PlayerStats.Models.PlayerStatType type) [0x00007] in :0 at thebasics.ModSystems.PlayerStats.PlayerStatSystem.OnEntityDeath (Vintagestory.API.Common.Entities.Entity entity, Vintagestory.API.Common.DamageSource damageSource) [0x0002d] in :0 at (wrapper delegate-invoke) .invoke_void_Entity_DamageSource(Vintagestory.API.Common.Entities.Entity,Vintagestory.API.Common.DamageSource) at Vintagestory.Server.ServerEventAPI.TriggerEntityDeath (Vintagestory.API.Common.Entities.Entity entity, Vintagestory.API.Common.DamageSource damageSourceForDeath) [0x0000a] in <1f3460e41e8b4f5c9909b9730ecb932a>:0 at Vintagestory.API.Common.Entities.Entity.Die (Vintagestory.API.Common.EnumDespawnReason reason, Vintagestory.API.Common.DamageSource damageSourceForDeath) [0x00021] in <151670ea5af9488c97adc6d4637134de>:0 at Vintagestory.API.Common.EntityAgent.Die (Vintagestory.API.Common.EnumDespawnReason reason, Vintagestory.API.Common.DamageSource damageSourceForDeath) [0x00086] in <151670ea5af9488c97adc6d4637134de>:0 at Vintagestory.GameContent.EntityBehaviorHealth.OnEntityReceiveDamage (Vintagestory.API.Common.DamageSource damageSource, System.Single& damage) [0x0012e] in <69de5a339ebb4c3fa1adee48b5e2f77c>:0 at Vintagestory.API.Common.Entities.Entity.ReceiveDamage (Vintagestory.API.Common.DamageSource damageSource, System.Single damage) [0x00047] in <151670ea5af9488c97adc6d4637134de>:0 at Vintagestory.API.Common.EntityAgent.ReceiveDamage (Vintagestory.API.Common.DamageSource damageSource, System.Single damage) [0x00000] in <151670ea5af9488c97adc6d4637134de>:0 at Vintagestory.GameContent.EntityProjectile.impactOnEntity (Vintagestory.API.Common.Entities.Entity entity) [0x0013c] in <262ac1e4e479404599b9650faf571b5d>:0 at Vintagestory.GameContent.EntityProjectile+<>c__DisplayClass19_0.b__0 (Vintagestory.API.Common.Entities.Entity e) [0x0009c] in <262ac1e4e479404599b9650faf571b5d>:0 at Vintagestory.GameContent.EntityPartitioning.WalkEntities (Vintagestory.API.MathTools.Vec3d centerPos, System.Double radius, Vintagestory.API.Common.ActionConsumable1[T] callback, Vintagestory.GameContent.EntityPartitioning+RangeTestDelegate onRangeTest) [0x001f0] in <69de5a339ebb4c3fa1adee48b5e2f77c>:0 at Vintagestory.GameContent.EntityPartitioning.WalkInteractableEntities (Vintagestory.API.MathTools.Vec3d centerPos, System.Double radius, Vintagestory.API.Common.ActionConsumable1[T] callback) [0x00024] in <69de5a339ebb4c3fa1adee48b5e2f77c>:0 at Vintagestory.GameContent.EntityProjectile.onPhysicsTickCallback (System.Single dtFac) [0x001bf] in <262ac1e4e479404599b9650faf571b5d>:0 at Vintagestory.API.Common.EntityBehaviorPassivePhysics.DoPhysics (System.Single dt, Vintagestory.API.Common.Entities.EntityPos pos) [0x0099f] in <151670ea5af9488c97adc6d4637134de>:0 at Vintagestory.API.Common.EntityBehaviorPassivePhysics.onPhysicsTick (System.Single deltaTime, System.Boolean usePhysicsDormancyState) [0x00116] in <151670ea5af9488c97adc6d4637134de>:0 at Vintagestory.API.Common.EntityBehaviorPassivePhysics.OnGameTick (System.Single deltaTime) [0x00008] in <151670ea5af9488c97adc6d4637134de>:0 at Vintagestory.API.Common.Entities.Entity.OnGameTick (System.Single dt) [0x0020c] in <151670ea5af9488c97adc6d4637134de>:0 at Vintagestory.GameContent.EntityProjectile.OnGameTick (System.Single dt) [0x00000] in <262ac1e4e479404599b9650faf571b5d>:0 at Vintagestory.Server.ServerSystemEntitySimulation.TickEntities (System.Single dt) [0x00035] in <1f3460e41e8b4f5c9909b9730ecb932a>:0 at Vintagestory.Server.ServerSystemEntitySimulation.OnServerTick (System.Single dt) [0x0018f] in <1f3460e41e8b4f5c9909b9730ecb932a>:0 at Vintagestory.Server.ServerMain.Process () [0x001ba] in <1f3460e41e8b4f5c9909b9730ecb932a>:0

RogueRaiden commented 1 year ago

seems to be any of the stat changing triggers cause the server exception. have not tried the newly released 4.0.0-pre.2

RogueRaiden commented 1 year ago

so we had an issue since updating to 1.18.5 where most of the time when an animal was killed with range, they would immediately turn into bones and skip being harvestable.

i removed this mod from the server and its looking like the issue has quit.

very strange

BASIC-BIT commented 1 year ago

Huh, that's not good! Thanks for providing so much detail, I'll look into this now.

BASIC-BIT commented 1 year ago

This seems like it was due to changes made with the vintage story API for ranged attacks (specifically with DamageSource:CauseEntity and DamageSource:SourceEntity for ranged attacks). The newest version (v4.0.0-pre.3) should fix the problem.

RogueRaiden commented 1 year ago

thanks a bunch, looks like its fixed!