Error in core
LadyCailinBot opened this issue ยท 9 comments
CMDHELPER-3149 - Reported by mesolost
Found an error in core and was instructed by the plugin to report it. Included is the log file and a copy of the script that generated this endless looping error in core. The UUID in the error beginning with 304 is my character. Script has been disabled for now. (running thermos MC 1.7.10 and CH 3.3.2 snapshot)
Comment by PseudoKnight
This appears completely unrelated to CommandHelper. What enchantment does the tool have? The enchantment id just doesn't exist in Bukkit, I think. It might be some mod that doesn't work nicely with Bukkit. ANY plugin that tries to get the enchantments for that item will produce an NullPointerException. I don't see other plugins catching NPEs here, so I'm going to guess this is not normal.
Comment by mesolost
the code was something i copy pasted from the shared CH script page so it's no real loss since nobody was informed that it was there yet. I've managed to break core like 3 times now and decided to post this one. Thanks for the feedback.
Comment by mesolost
actually i just got spammed again for another error in core -_- upon using the spread players command (as part of a random teleport command) the first line of this code after the bind is generating an error.
bind('item_held', null, null, @event,
@held = pinv(@event['player'], @event['to'])
if(is_array(@held) && array_index_exists(@held, 'type'),
if(@held['type']=='5377',
if(!has_gp_buildperm(@event['player'], ploc(@event['player'])) || !sk_can_build(@event['player'], ploc(@event['player'])),
modify_event('to', @event['from'])
)
)
)
)
This is a workaround for a tool that ignores absolutely everything (AE2 network tool) so you cannot even hold it while in a land claim you do not have permission to build in.
[20:22:48] [Server thread/ERROR] [CommandHelper/]: Uh oh! You've found an error in Core.
This is an error caused while running your code, so you may be able to find a workaround, but is ultimately an error in Core itself.
The line of code that caused the error was this:
pinv('MeSoLost', 0)
on or around /home/mch/multicraft/servers/server33875/plugins/CommandHelper/LocalPackages/LostMEssentials/main.ms:26.
Please report this error to the developers, and be sure to include the version numbers:
Server version: 1.7.10-R0.1-SNAPSHOT;
CommandHelper version: 3.3.2-SNAPSHOT.3131-;
Loaded extensions and versions:
Core (version 3.3.2);
CHWorldGuard (version 1.1.0);
CHDangerous (version 1.0.2);
${project.name} (version 0.1.0);
CHFile (version 0.0.2);
CHVotifierListener (version 1.0.1);
SKCompat (version 2.0.0);
CHCommandBlock (version 0.0.1);
CHPluginManager (version 1.1.0);
${project.name} (version 2.1.0);
CHPex (version 1.1.1);
CHGriefPrevention (version 1.2.1);
CHAdvanced (version 1.0.0);
CHVirtualChests (version 1.0.5);
CHBarApi (version 1.2.0);
CHServerCommunication (version 0.0.1);
Here's the stacktrace:
java.lang.NullPointerException: null key in entry: null=4
Will attempt add in after the @held assignment if(is_null(@held), die()) and hopefully that will stop the issue on teleports. Ok that one extra line of code seam to work if random porting with an empty null hand now. Sorry i'f i'm bothering you -_- You can consider this resolved on my end.
Comment by PseudoKnight
I'm not sure you understood. Whatever enchanted item that is, it's incompatible with Bukkit. Any plugin that gets enchantments for that item is going to cause that stacktrace. CH gets enchantments for an item almost every time it looks at the item. pinv() without a slot will get enchantments for every item in your inventory. It's not a specific script issue. It's a general issue that will plague ALL plugins that look at enchantments and any script that gets the inventory of a player that holds that broken item.
If I knew more about how mods add enchantments, there MIGHT be a way to fix the item. But I don't run a modded server. I'd like to know how common this type of situation is and what type of item and enchantment it is. The only thing CH can do is catch the exception and ignore all enchantments on that item.
Comment by mesolost
OK OK I got it now, this problem is because Ars Magica 2 was previously installed and has added several attributes to items and console is plagued by warns from that. I have several other scripts and event bindings that examine a player's inventory. Do you know of any way to scrub off particular attributes from items?? I have stuff from the console so I know the exact attribute names. (I'd paste the names in but for some reason it's not saved in the log file --) Even if i have to have the scrubber in for a bit I have few enough players atm I shouldn't have to scrub long and with how the Applied Energistics drives work (or appear to when corrupting my character data XD) I can just tell everyone to hold the drive and that should scrub every item in it. If I'll have no choice but to reset the map I'd rather know sooner than later. --
Comment by PseudoKnight
Well, I imagine there might be some method to handle this for modders. These items could be stored in chests all over the place. Normally one would have to use something like MCEdit to filter all the items with the given tag. But given how common this issue might be, there might be some builtin filter or common tool people use. I would consult someone who is more familiar with these types of issues.
Comment by PseudoKnight
If there's still something I can help with, I'll do what I can.
Comment by PseudoKnight
It's LadyCailin's plugin and some of us help, mostly with Bukkit stuff. :)
https://github.com/EngineHub/CommandHelper/graphs/contributors