Jump to content

NRE + Stacktrace

Pending 0.1.5

Stewie
Stewie

Posted

You may want to review updating this plugin with some additional NRE checks and also looking into the conflict between the plugin and rusts current decay system. You can recreate this stacktrace if you adjust your decay.scale to 3 or higher.

[2025.05.02 12:28:39] [ERRO] Unhandled error occurred (NullReferenceException)
  at BaseEntity.WorldSpaceBounds () (at <18f552e21ad945a4ae7147de4e0152ee>:0)
  at BaseEntity.GetNearestBuildingPrivilege (System.Boolean cached, System.Single cacheDuration) (at <18f552e21ad945a4ae7147de4e0152ee>:0)
  at BaseEntity.GetBuildingPrivilege () (at <18f552e21ad945a4ae7147de4e0152ee>:0)
  at DecayEntity.GetBuildingPrivilege () (at <18f552e21ad945a4ae7147de4e0152ee>:0)
  at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.DecayEntity.OnDecay_Patch0(DecayEntity,Decay,single)
  at DecayEntity.DecayTick () (at <18f552e21ad945a4ae7147de4e0152ee>:0)
  at ServerBuildingManager.Cycle () (at <18f552e21ad945a4ae7147de4e0152ee>:0)
  at ServerMgr.Update () (at <18f552e21ad945a4ae7147de4e0152ee>:0)
  at UnityEngine.Debug:LogException(Exception, Object)
  at ServerMgr:Update()


This would play better with the current rust version:

block.Hurt(_damage, DamageType.Decay);


and this is what I think you are missing from your existing NRE checks:

!_block.IsValid()

 

1.7m

Downloads

Total number of downloads.

8k

Customers

Total customers served.

121.2k

Files Sold

Total number of files sold.

2.5m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.