Jump to content

Failed to execute OnFrame callback

Pending 1.0.6

BetterDeadThanZed
BetterDeadThanZed

Posted

As far as I know, the plugin is working but I'm seeing this in the console:

Failed to execute OnFrame callback (Object reference not set to an instance of an object.)
   at void Oxide.Plugins.SignManager.AddSign(BaseEntity e)+() => { } in /home/container/carbon/plugins/SignManager.cs:line 104
   at void Carbon.Managers.CarbonProcessor.Update() in /home/runner/work/Carbon/Carbon/src/Carbon/src/Processors/CarbonProcessor.cs:line 63

 

  • Administrator
Steenamaroo

Posted

Hi,
Sounds like maybe your data file has an issue.
I can add a null check to suppress the error, and should, but that won't fix the problem.

Check your data file to see if it's broken or contents are null. 👍

BetterDeadThanZed

Posted

I know that ChatGPT can be wrong, but I uploaded the error, my data file and your response and this is what it concluded:
 

Quote

The file itself does not appear malformed.

I do not see obvious literal null entries.

The risky part is the many empty arrays [], which may represent signs/users/entities with no actual sign data saved.

InsCRC: 0 may also be suspicious, depending on how the plugin uses it.

Quote

your visible data file does not look broken because of []; the plugin bug is that it assumes the Signs[id] value is never null.

Quote

Empty arrays are not the direct cause.

The plugin is vulnerable if any storedData.Signs[someId] value is null, or if the data deserialized oddly for one entry.

The dev was basically right that a null-check is needed, but the code should guard both the dictionary and the list value.

I don't really understand a lot of that, but maybe that will help? 

  • Administrator
Steenamaroo

Posted

Not really.
Easiest thing to do would probably be to just back up your data file,
then unload the plugin, delete the data file, then reload the plugin.

If the errors go away, there is something wrong with your data file.
If not then it's something else, but the data file is most likely as it isn't null checked in the code.

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.4m
Total downloads
Customers
10.8k
Customers served
Files Sold
155.5k
Marketplace sales
Payments
3.3m
Processed total
×
×
  • 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.