Jump to content

Failed to call hook 'OnDispenserGather'

Closed 1.2.5 1.2.7

ChristopherS
ChristopherS

Posted

I have recently got this plugin and it's great apart from one thing. Within the space of about 5 minutes with one player online other than myself, my console has filled with 224 red paragraphs of errors. I can't see anything in my console due to this but have read someone elses' report where they have this too.

On my server, I use 2 plugins that use the dispensegather (I think) called "EpicLoot" and "Skill Tree". My server is basically built around these 2 plugins and I didn't know this logging tool would conflict. I'm in a tight spot now because my server is basically built around those 2 plugins, but I need the logging capability.

I have tried your advice from what I read on the other ticket, mine a node, chop a tree, pick up items, skin an animal etc etc. But when I do that, there are no errors, it's only when other players do these things so I can't tell you what specifically causes this.

Do you know of any way that I could fix these errors?
Thanks,
Christopher.

 

Failed to call hook 'OnDispenserGather' on plugin 'LootAudit v1.2.5' (IndexOutOfRangeException: Index was outside the bounds of the array.)
  at Oxide.Plugins.LootAudit.OnDispenserGather (ResourceDispenser dispenser, BaseEntity entity, Item item) [0x00071] in <84a18e8542474a00a18c08e4dd0d50c0>:0 
  at Oxide.Plugins.LootAudit.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002e4] in <84a18e8542474a00a18c08e4dd0d50c0>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in :0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in :0 

 

Gt403cyl2

Posted

Thanks for taking the time to check the other support requests.
I will do some more testing and potentially re-write this part and see if that helps.

However, I have not been able to recreate this issue yet so upon next release I can only hope it is resolved as I think it may be a conflict that occurs.

Will continue testing.

Gt403cyl2

Posted

Changed Status from Pending to Gremlins

Changed Fixed In to 1.2.5

Gt403cyl2

Posted

Changed Fixed In from 1.2.5 to Next Version

Gt403cyl2

Posted

Changed Status from Gremlins to Work in Progress

Gt403cyl2

Posted

Changed Status from Work in Progress to Closed

Suerion

Posted

Hey, thanks for the work on the last update @Gt403cyl2

I had 1 suggestion. please add in the config the setting, to disable the Gather information to the log, If somebody would gather something, it spams the log with

->                PrintWarning($"Send to Dev: dispenser = {dispenser}, entity = {entity}, item = {item}");

[Loot Audit] Send to Dev: dispenser = assets/rust.ai/agents/bear/polarbear.corpse.prefab (ResourceDispenser), entity = Joker, item = Item.leatherx97.16281324
[Loot Audit] Send to Dev: dispenser = assets/bundled/prefabs/autospawn/resource/driftwood/driftwood_set_2.prefab (ResourceDispenser), entity = Jack, item = Item.woodx100.16559819


It does not send the gather informations to discord, it only send it to the console.

the only dispenser we hat changed is foor the Wood -> but all other ResourceDispenser spams in the log

Gt403cyl2

Posted (edited)

Please take the time to read errors before posting.
It literally says send to dev., meaning you should be letting me know this is happening so I can troubleshoot it.

This is only supposed to happen when there was an error on a specific hook "OnDispenserGather".
I was unable to recreate the error so this was a way for me to let server owners give me more information on when the error occurs.

I will add a config option for debug...
With this info I will work on it and update.

Also I have specifically spawned the driftwood and have not been able to get this error to occur on my test server.

Couple questions:
Are you using a custom map or procgen?
Any other plugins that deal with the hook "OnDispenserGather"?

Also do not edit the .cs file as the License explicitly states you are not allowed, as well as it can lead to errors that I will not have on my end and therefore cannot resolve...

Edited by Gt403cyl2
  • Like 1
ChristopherS

Posted

Personally I would open a new ticket for a separate issue rather than posting to someone elses' too because it could be very easy for your issue to be looked over.

The developer stated not long ago that he was going to add a catch to this plugin so that it would print where the error is, which can help narrow down where the problem is. 

You did the right thing reporting it here, although I would still advise you let the developer know if you have any other plugins that affect the OnDispenserGather like has been asked before.

Suerion

Posted (edited)

Quote

Please take the time to read errors before posting.
It literally says send to dev., meaning you should be letting me know this is happening so I can troubleshoot it.

This is only supposed to happen when there was an error on a specific hook "OnDispenserGather".
I was unable to recreate the error so this was a way for me to let server owners give me more information on when the error occurs.

I will add a config option for debug...
With this info I will work on it and update.

Also I have specifically spawned the driftwood and have not been able to get this error to occur on my test server.

Couple questions:
Are you using a custom map or procgen?
Any other plugins that deal with the hook "OnDispenserGather"?

Also do not edit the .cs file as the License explicitly states you are not allowed, as well as it can lead to errors that I will not have on my end and therefore cannot resolve...

I had looked on the error, before posting it. I know it should get to you, but we also get the information in our logs
This is only the information that we got  always.

Thanks also for adding the Debug setting.

The problem of my ticket could be resolved with my idea in the bottom of my post-
Old Ticket -> https://codefling.com/files/support/3721-error-on-hook-ondispencergather/

for your question ->
We use a custom map and we change the DispenserGather for Wood with the Nature Plugin. In this Plugin you could Change the settings DispenserGather of the Driftwood.

But after after changing the DispenserGather for Wood, it Spams also other ressources in the log->

[Loot Audit] Send to Dev: dispenser = assets/rust.ai/agents/bear/polarbear.corpse.prefab (ResourceDispenser), entity = Joker, item = Item.leatherx97.16281324


The Dispenseer Gather would not changed in your Plugin, it would be changed with the NATURE Plugin. I had written that also in the other Support ticket

I think you could also Capture the changed Resource Dispenser., like you did Debug the Problem, then you could add it also in the Discord Hook? You need only to send the Error fram the Catch Output to send it in discord like the other Messages. I think, you could add this for issuing an changed ResourceDispenser?

 

Quote

Personally I would open a new ticket for a separate issue rather than posting to someone elses' too because it could be very easy for your issue to be looked over.

The developer stated not long ago that he was going to add a catch to this plugin so that it would print where the error is, which can help narrow down where the problem is. 

You did the right thing reporting it here, although I would still advise you let the developer know if you have any other plugins that affect the OnDispenserGather like has been asked before.

I know this, i had only added it here, because i think it would be the right place. He could work with the information

Edited by Suerion
for better understanding
Gt403cyl2

Posted (edited)

Sorry I don't understand your post.
I assume English is not your native language, could you please try to word it better.

What I do understand is:
You are using custom map.
You changed DispenserGather with a different plugin.  

The map shouldn't really change anything in this instance. but helps for troubleshooting.

As for changing DispenserGather that would change things, as I already said in your other support thread. which you acknowledge here:
https://gyazo.com/85bb3ae1d2a987a812df2ee26d48334f

Edited by Gt403cyl2
Suerion

Posted

Sorry, yeah it is sometimes a little bit difficuld to write the right sentence without the needed knowledge of the language.

I had edited the post above for better understanding.

And also here on my side it is yet, 00:27am, i'm a little bit tired.

Gt403cyl2

Posted

Ok so after reading your edits;
You changed dispenser with another plugin (driftwood).
LootAudit has a problem with that seen here:

Quote

[Loot Audit] Send to Dev: dispenser = assets/bundled/prefabs/autospawn/resource/driftwood/driftwood_set_2.prefab (ResourceDispenser), entity = Jack, item = Item.woodx100.16559819

LootAudit says "hey, driftwood is being weird I don't understand what is happening" so it threw the error in console.

I added the debug line to catch when the error happened and it said it was the dispenser (driftwood).

I can try to resolve that by giving driftwood it's own name but honestly at that point there just might be other issues with other plugins that change the way loot works....

Ultimately though, I see it as a plugin conflict.
I will see what I can do, but again, I cannot reproduce this error as I do not have the plugin combinations and settings so anything I do to try to fix this will need testing.
Watch for next update and let me know after that.

Suerion

Posted (edited)

Quote

LootAudit says "hey, driftwood is being weird I don't understand what is happening" so it threw the error in console.

Yeah, only driftwood is changed, but all other ResourceDispenser will also throw an error like this ->

[Loot Audit] Send to Dev: dispenser = assets/rust.ai/agents/bear/polarbear.corpse.prefab (ResourceDispenser), entity = Joker, item = Item.leatherx97.16281324

You could look here, how the other plugin work with the dispenser
-> https://streamable.com/mcyvwl

Yeah w
e willl look tomorrow on the new update., thanks a lot

 

Edited by Suerion
Gt403cyl2

Posted

Thanks for the video. I have uploaded an update so let me know. 

I have not been able to recreate the polarbear or any other error so again it absolutely must be conflicting with another plugin.

I'm not trying to sound rude, but every reported error from you so far has been the result of a plugin conflict, that nobody else has reported.
The other instances have been resolved, but the plugin conflicts are likely not something I will be able to resolve but rather try to block the error spam.

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.2k

Files Sold

Total number of files sold.

2m

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.