/give command creates crash-inducing items with incomplete [dataTag]
Steps to Reproduce:
- Execute a command such as
/give @p cake 1 1 {AttributeModifiers:[{AttributeName:"generic.maxHealth"}]} - Observe that the command may declare "An unknown error occurred while attempting to perform this command", but you are still given the item.
- Hover over the item, or attempt to scroll the hotbar over it, and observe that the game immediately crashes.
- Try re-loading the world. If the bugged item is still in your held slot, you will immediately crash again: the world is now unplayable unless you use a third-party tool to repair it.
What I expected to happen was:
If the command realized that there was an error, why did it still give me a corrupt item? I would have expected to not be given anything, if the tag is incorrectly formatted.
To be honest, this happened on accident; I certainly didn't expect my save to be corrupted.
Note: This is NOT a duplicate of any bug with a similar crash report, unless that bug follows steps similar to the above. I'm aware that similar crashes exist because the crash occurs when attempting to look at a corrupt item. However, this bug report is that /give is able to create corrupt items, not that corrupt items cause crashes.
Linked Issues
is duplicated by4
Created Issue:
/give command creates crash-inducing items with incomplete [dataTag]
Steps to Reproduce:
- Execute a command such as
/give @p 373 1 33 {CustomPotionEffects:[{id:2}]}- Observe that the command declares "An unknown error occurred while attempting to perform this command", but you are still given the item.
- Hover over the item, or attempt to scroll the hotbar over it, and observe that the game immediately crashes.
- Try re-loading the world. If the bugged item is still in your held slot, you will immediately crash again: the world is now unplayable unless you use a third-party tool to repair it.
What I expected to happen was:
If the command realized that there was an error, why did it still give me a corrupt item? I would have expected to not be given anything, if the tag is incorrectly formatted.To be honest, this happened on accident; I certainly didn't expect my save to be corrupted.
Note: This is NOT a duplicate of any bug with a similar crash report, unless that bug follows steps similar to the above. I'm aware that similar crashes exist because the crash occurs when attempting to look at a corrupt item. However, this bug report is that /give is able to create corrupt items, not that corrupt items cause crashes.
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
Steps to Reproduce:
- Execute a command such as
/give @p373 1 33 {CustomPotionEffects:[{id:2}]}- Observe that the command declare
s"An unknown error occurred while attempting to perform this command", but you are still given the item.- Hover over the item, or attempt to scroll the hotbar over it, and observe that the game immediately crashes.
- Try re-loading the world. If the bugged item is still in your held slot, you will immediately crash again: the world is now unplayable unless you use a third-party tool to repair it.
What I expected to happen was:
If the command realized that there was an error, why did it still give me a corrupt item? I would have expected to not be given anything, if the tag is incorrectly formatted.To be honest, this happened on accident; I certainly didn't expect my save to be corrupted.
Note: This is NOT a duplicate of any bug with a similar crash report, unless that bug follows steps similar to the above. I'm aware that similar crashes exist because the crash occurs when attempting to look at a corrupt item. However, this bug report is that /give is able to create corrupt items, not that corrupt items cause crashes.
Steps to Reproduce:
- Execute a command such as
/give @p cake 1 1 {AttributeModifiers:{AttributeName:"generic.maxHealth"}}- Observe that the command may declare "An unknown error occurred while attempting to perform this command", but you are still given the item.
- Hover over the item, or attempt to scroll the hotbar over it, and observe that the game immediately crashes.
- Try re-loading the world. If the bugged item is still in your held slot, you will immediately crash again: the world is now unplayable unless you use a third-party tool to repair it.
What I expected to happen was:
If the command realized that there was an error, why did it still give me a corrupt item? I would have expected to not be given anything, if the tag is incorrectly formatted.To be honest, this happened on accident; I certainly didn't expect my save to be corrupted.
Note: This is NOT a duplicate of any bug with a similar crash report, unless that bug follows steps similar to the above. I'm aware that similar crashes exist because the crash occurs when attempting to look at a corrupt item. However, this bug report is that /give is able to create corrupt items, not that corrupt items cause crashes.
Steps to Reproduce:
- Execute a command such as
/give @p cake 1 1 {AttributeModifiers:{[AttributeName:"generic.maxHealth"}]}- Observe that the command may declare "An unknown error occurred while attempting to perform this command", but you are still given the item.
- Hover over the item, or attempt to scroll the hotbar over it, and observe that the game immediately crashes.
- Try re-loading the world. If the bugged item is still in your held slot, you will immediately crash again: the world is now unplayable unless you use a third-party tool to repair it.
What I expected to happen was:
If the command realized that there was an error, why did it still give me a corrupt item? I would have expected to not be given anything, if the tag is incorrectly formatted.To be honest, this happened on accident; I certainly didn't expect my save to be corrupted.
Note: This is NOT a duplicate of any bug with a similar crash report, unless that bug follows steps similar to the above. I'm aware that similar crashes exist because the crash occurs when attempting to look at a corrupt item. However, this bug report is that /give is able to create corrupt items, not that corrupt items cause crashes.
Steps to Reproduce:
- Execute a command such as
/give @p cake 1 1 {AttributeModifiers:{[AttributeName:"generic.maxHealth"}]}- Observe that the command may declare "An unknown error occurred while attempting to perform this command", but you are still given the item.
- Hover over the item, or attempt to scroll the hotbar over it, and observe that the game immediately crashes.
- Try re-loading the world. If the bugged item is still in your held slot, you will immediately crash again: the world is now unplayable unless you use a third-party tool to repair it.
What I expected to happen was:
If the command realized that there was an error, why did it still give me a corrupt item? I would have expected to not be given anything, if the tag is incorrectly formatted.To be honest, this happened on accident; I certainly didn't expect my save to be corrupted.
Note: This is NOT a duplicate of any bug with a similar crash report, unless that bug follows steps similar to the above. I'm aware that similar crashes exist because the crash occurs when attempting to look at a corrupt item. However, this bug report is that /give is able to create corrupt items, not that corrupt items cause crashes.
Steps to Reproduce:
- Execute a command such as
/give @p cake 1 1 {AttributeModifiers:[{AttributeName:"generic.maxHealth"}]}- Observe that the command may declare "An unknown error occurred while attempting to perform this command", but you are still given the item.
- Hover over the item, or attempt to scroll the hotbar over it, and observe that the game immediately crashes.
- Try re-loading the world. If the bugged item is still in your held slot, you will immediately crash again: the world is now unplayable unless you use a third-party tool to repair it.
What I expected to happen was:
If the command realized that there was an error, why did it still give me a corrupt item? I would have expected to not be given anything, if the tag is incorrectly formatted.To be honest, this happened on accident; I certainly didn't expect my save to be corrupted.
Note: This is NOT a duplicate of any bug with a similar crash report, unless that bug follows steps similar to the above. I'm aware that similar crashes exist because the crash occurs when attempting to look at a corrupt item. However, this bug report is that /give is able to create corrupt items, not that corrupt items cause crashes.
is duplicated by
is duplicated by
is duplicated by
is duplicated by
relates to
is duplicated by
relates to
is duplicated by
relates to
Duplicate of MC-30450, please use the search function to see if your bug has already been submitted. Currently over 57% of tickets are being resolved as duplicate.
Duplicate of MC-30450, please use the search function to see if your bug has already been submitted. Currently over 57% of tickets are being resolved as duplicate.
Duplicate of MC-30450, please use the search function to see if your bug has already been submitted. Currently over 57% of tickets are being resolved as duplicate.
Duplicate of MC-30450, please use the search function to see if your bug has already been submitted. Currently over 57% of tickets are being resolved as duplicate.
Duplicate of MC-30450, please use the search function to see if your bug has already been submitted. Currently over 57% of tickets are being resolved as duplicate.
Please only submit one bug per ticket.
Player heads will always be Steve, you can rename it what you like but it will be Steve.
As far as the rest of your ticket...
Duplicate of MC-30450, please use the search function to see if your bug has already been submitted. Currently over 57% of tickets are being resolved as duplicate.
@Talven There is just one problem: This isn't a dublicate of MC-30450.
Look at the crash reports. MC-30450 throws a NullPointerException while this one is saying: "et: Invalid index 3 requested for TranslatableComponent{key='commands.give.success'".
The only thing these bugs have in common is that they happen when performing /give.
By the way this bug (MC-30806) dosen't happen if your language is English (US).
Could someone reopen this? It's not a duplicate, the exception in this is totally different than in MC-30450.
Confirmed, now my test world with all cool stuff is corrupted
If you want to un-corrupt it, you have a few options:
Still, a pretty big inconvenience when this happens accidentally to somebody.
on my test world, it's like you but when i re-open the map, the item is in my hand and it is functionnal.
I don't think that any of the bugs in the duplicate section are duplicates of this bug.
MC-30806andMC-30850aren't for sure. You just need to take a brief look at the crash reports.For
MC-30818,MC-30832andMC-30851I can't tell for sure because they were posted without reports. But it looks like they have nothing to do with incomplete dataTags either.Please read the bug report to see if it's actually a duplicate. Currently over 7% of tickets are wrongly being resolved as duplicate. ;-P
Since apparently all crashes and exceptions even remotely related to /give are being lumped into this report (honestly, I hate when that happens - if the cause of the crash is different in the code, it's not the same bug), I'll just throw this one out here: "/give 175 1 6" causes an immediate crash because the renderer doesn't know how to display a "tall plant" item with that damage value.
This bug is fixed in 13w37b
Actually, it isn't. It's been fixed for one particular instance, CustomPotionEffects. It still occurs for other tags.
/give @p cake 1 1 {AttributeModifiers:[{AttributeName:"generic.maxHealth"}]}Hovering over that item will cause a crash.
Is this still a concern in the current Minecraft version 1.7.2 / Launcher version 1.3.4 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Is this still a concern in the current Minecraft version 1.7.4 / Launcher version 1.3.8 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Confirmed for 1.7.4 and 14w02c.
What specifically causes this crash is the missing "Name" tag. All other tags can be withdrawn, even the "AttributeName" tag. You can even include a completely blank modifier and it will crash:
/give @p cake 1 1 {AttributeModifiers:[{}]}And the following will not crash, as the "Name" tag is present:
/give @p cake 1 1 {AttributeModifiers:[{Name:"InsertName"}]}Still an issue in 1.7.5 and 14w08a
I can't confirm that it still occurs in 14w08a, there's no crash. Seems to have been fixed.
I can't confirm in 14w08a. What command did you use, Gary?
For now, I also can't confirm in 14w08a. AttributeModifiers without Name and UUID tags do not display at all; invalid AttributeName also causes no issues (seems resource packs can even trick it into rendering custom attribute text, if translations are provided for the invalid AttributeName). Incomplete enchantments will default to zero for ID (Protection) and level (so yes, Protection 0, as opposed to Protection 1). CustomPotionEffects with unrecognized or missing ID will be ignored; this actually makes it possible to have a colored "No Effects" potion (with default name "Mundane Potion", regardless of its actual color and reaction to brewing).
Although I haven't been successful at devising a command which creates items which create crashes, the following gem still works:
/give @p cake 1 1 {AttributeModifiers:[{},,{},]}That code doesn't even get as far as producing an item. It just causes the server and launcher to be locked in an infinite loop; the client is left running on its own. In multiplayer, the client realizes and drops its connection to the server; in Singleplayer the game continues but most physics grinds to a halt. No log or evidence is left in the launcher after the world is exited, but exiting allows the launcher to become functional again. No adverse affects upon returning to the world; however, anything which "happened" after using the command was not saved.
I'm pretty sure I've mentioned that particular issue here, but I don't remember where. It seems to apply to any command which accepts NBT, and occurs in response to certain combinations of double-commas and other things. Nevertheless, I wouldn't call it related to this particular ticket, as it's neither a crash (at least, not completely), nor is it caused by the items (it's caused directly by the command). I'm just mentioning it here in case somebody has confused it for this ticket.
After reattempting, I confirm that the issue seems to be fixed.