StackOverflowError when shift-clicking inventory item

Discussion in 'Plugin Development' started by Mtihc, Jul 26, 2013.

Thread Status:
Not open for further replies.
  1. Offline


    Users of my plugin have been haunted by this error.

    The lines of code mentioned in the error, can be found here:
    On line 253, and 418.

    It looks like the error happens because k = 1. Forever.

    Somebody found out how to reproduce the error.
    1. Create a treasure container with my plugin.
    2. Shift-click an item (error happens)

    It only happens when shift-clicking inside any container OTHER THAN chests.

    I don't know how my code can be responsible.
    I rely on bukkit's method getServer().createInventory,
    and bukkit's serialization of ItemStacks.

    Any idea's?
  2. Offline


    Don't use createInventory. Initialize a new CraftInventoryCustom. Thats how I allways do it.
  3. Offline


    Thanks for the suggestion. But it did not help.
    Also... CraftInventoryCustom is not part of the Bukkit API. So you are messing with backwards compatibility support and stuff. It's just not recommended i guess.

    I have found the issue a couple of times.
    Here is the one that is considered original. And it's still open.

    I would change this thread to "resolved". But it is not really resolved :(

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 3, 2016
Thread Status:
Not open for further replies.

Share This Page