Jump to content

Error on c.unload

Closed 1.2.26

TuxGeek
TuxGeek

Posted

I recently reinstalled the plugin after not using it for awhile and when setting up the plugin i setup my config and unloaded the plugin with the command "c.unload helisignals" when doing so the server produced this error in console. I dont see it effecting anything currently but wanted to let you know this error shows up

c.unload HeliSignals
Unloaded plugin Heli Signals v1.2.26 by ZEODE
Error while unpatching hook 'OnPatrolHelicopterTakeDamage[c2e7af56e92d47308952633ba1d9ed4d]' (Invalid IL code in (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:PatrolHelicopter.Hurt_Patch0 (PatrolHelicopter,HitInfo): IL_00d8: ret       
)
   at MethodInfo HarmonyLib.PatchFunctions.UpdateWrapper(MethodBase original, PatchInfo patchInfo)
   at PatchProcessor HarmonyLib.PatchProcessor.Unpatch(MethodInfo patch)
   at void HarmonyLib.Harmony.Unpatch(MethodBase original, MethodInfo patch)
   at void HarmonyLib.Harmony.UnpatchAll(string harmonyID)+(Patch patchInfo) => { }
   at void HarmonyLib.CollectionExtensions.Do<Patch>(IEnumerable<Patch> sequence, Action<Patch> action)
   at void HarmonyLib.CollectionExtensions.DoIf<Patch>(IEnumerable<Patch> sequence, Func<Patch, bool> condition, Action<Patch> action)
   at void HarmonyLib.Harmony.UnpatchAll(string harmonyID)
   at bool Carbon.Hooks.HookEx.RemovePatch() in /__w/Carbon/Carbon/Carbon.Core/Carbon/src/Hooks/HookEx.cs:line 212
A general error occured while uninstalling 'OnPatrolHelicopterTakeDamage[d9ed4d]'

TuxGeek

Posted

I am also getting this error in console

 

Failed to call internal hook 'OnEntityKill' on plugin 'HeliSignals v1.2.26' [304634108] (Object reference not set to an instance of an object)

   at object Oxide.Plugins.HeliSignals.OnEntityKill(PatrolHelicopter heli) in /home/container/carbon/plugins/HeliSignals.cs:line 876

   at object Oxide.Plugins.HeliSignals.InternalCallHook(uint hook, object[] args) in HeliSignals.cs/Internal:line 457

ZEODE

Posted

On 3/9/2025 at 6:36 AM, TuxGeek said:

I recently reinstalled the plugin after not using it for awhile and when setting up the plugin i setup my config and unloaded the plugin with the command "c.unload helisignals" when doing so the server produced this error in console. I dont see it effecting anything currently but wanted to let you know this error shows up

c.unload HeliSignals
Unloaded plugin Heli Signals v1.2.26 by ZEODE
Error while unpatching hook 'OnPatrolHelicopterTakeDamage[c2e7af56e92d47308952633ba1d9ed4d]' (Invalid IL code in (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:PatrolHelicopter.Hurt_Patch0 (PatrolHelicopter,HitInfo): IL_00d8: ret       
)
   at MethodInfo HarmonyLib.PatchFunctions.UpdateWrapper(MethodBase original, PatchInfo patchInfo)
   at PatchProcessor HarmonyLib.PatchProcessor.Unpatch(MethodInfo patch)
   at void HarmonyLib.Harmony.Unpatch(MethodBase original, MethodInfo patch)
   at void HarmonyLib.Harmony.UnpatchAll(string harmonyID)+(Patch patchInfo) => { }
   at void HarmonyLib.CollectionExtensions.Do<Patch>(IEnumerable<Patch> sequence, Action<Patch> action)
   at void HarmonyLib.CollectionExtensions.DoIf<Patch>(IEnumerable<Patch> sequence, Func<Patch, bool> condition, Action<Patch> action)
   at void HarmonyLib.Harmony.UnpatchAll(string harmonyID)
   at bool Carbon.Hooks.HookEx.RemovePatch() in /__w/Carbon/Carbon/Carbon.Core/Carbon/src/Hooks/HookEx.cs:line 212
A general error occured while uninstalling 'OnPatrolHelicopterTakeDamage[d9ed4d]'

This error appears to originate from Carbon, perhaps     request support from the Carbon team to understand what this relates to?

17 hours ago, TuxGeek said:

I am also getting this error in console

 

Failed to call internal hook 'OnEntityKill' on plugin 'HeliSignals v1.2.26' [304634108] (Object reference not set to an instance of an object)

   at object Oxide.Plugins.HeliSignals.OnEntityKill(PatrolHelicopter heli) in /home/container/carbon/plugins/HeliSignals.cs:line 876

   at object Oxide.Plugins.HeliSignals.InternalCallHook(uint hook, object[] args) in HeliSignals.cs/Internal:line 457

I will have a look at this error tomorrow when I am home and at the PC. Does this happen every time a heli is killed? Is it a vanilla heli or heli signal heli?

TuxGeek

Posted

The error is from an heli signal heli. however the OnEntityKill error does not show every single time. im not sure what is causing it unless its when the heli blows up mid air without going into the death spiral

TuxGeek

Posted

Do you know what is causing this hook conflict?

 Hook conflict while calling 'ShouldFancyDrop[186179931]': InstantAirdrop 1.0.13 [False] and HeliSignals 1.2.26 [True]

ZEODE

Posted

2 hours ago, TuxGeek said:

The error is from an heli signal heli. however the OnEntityKill error does not show every single time. im not sure what is causing it unless its when the heli blows up mid air without going into the death spiral

Hmm, if heli is blowing up before doing death spiral something is up. Yes, it probably is related to this. Please upload or DM me your config to check out. This shouldn't be possible as I have checks in to prevent this, but there are ways this could happen and it will 100% cause issues.

ZEODE

Posted

2 hours ago, TuxGeek said:

Do you know what is causing this hook conflict?

 Hook conflict while calling 'ShouldFancyDrop[186179931]': InstantAirdrop 1.0.13 [False] and HeliSignals 1.2.26 [True]

I will have to check out the other plugin code to see why, I imagine that plugin has no checks to make sure it only acts on vanilla signals. Therefore it is trying to act on Heli Signal items and causing a conflict. I have that plugin, so I will take a look tomorrow and see what is causing it and submit a patch to the dev if needed.

ZEODE

Posted

I checked out that plugin, I don't actually have it as it turns out but on their page they say its compatible with Heli Signals.

The issue is the dev of that plugin is returning from "ShouldFancyDrop" as if it were a Boolean hook, so they are returning false, which some argue is more logical because we don't want Fancy Drop to act on those signals. However, the hook isn't Boolean and it is much more widely accepted that when returning a hook that requires a non null return value to stop normal behaviour, you should return true (which I do). This was discussed at length in the Oxide/Umod discord a long time ago and this was what was decided.

In this case it doesn't hurt anything or break any actions, it just causes the console info spam you are seeing and will continue to do so unless one of us changes the returned hook value. As I'm using the most widely accepted way of returning this type of hook, so I won't change, as this will then cause conflict with many more plugins. This is the same as the console spam that so many servers see with Stack Modifier plugin, as he refuses to return from "CanCombineDroppedItem" hook in the already accepted way as 99.9% of every other dev out there as I described above! 🤣

Anyway, it's up to you, you could find that hook in his code and change the return value to true instead of false, or just ignore it (or ask him to change it for the reasons explained 🫣)

Z

ZEODE

Posted

Changed Status from Pending to Closed

1.7m

Downloads

Total number of downloads.

7.8k

Customers

Total customers served.

117.7k

Files Sold

Total number of files sold.

2.4m

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.