Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I keep losing my inventory #2

Closed
Ironic8b498 opened this issue Mar 12, 2019 · 15 comments
Closed

I keep losing my inventory #2

Ironic8b498 opened this issue Mar 12, 2019 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@Ironic8b498
Copy link

Description
I log out and when I return my inventory is missing for all three worlds.

Steps to reproduce the behavior:

  1. Not sure what causes is yet, I thought it had something to do when deleting world folders during setup of server
  2. I logged out last night and when I logged back in today all my stuff was gone. I can replace my stuff easy, it is becoming annoying

Expected behavior
to have my armor and items in my inventory where I left them

Screenshots
If applicable, add screenshots to help explain your problem.

Server Information:

[Please complete the following information:]

  • Database being used (YAML, JSON, MySQL, MongoDB): default yml

  • OS: [e.g. iOS] debian

  • Java Version: [e.g. Java 8] java 8

  • BentoBox version: [e.g. 1.7.2.21] 1.3.1

  • Addons installed? [Do '/bentobox version' and copy/paste from the console]
    https://paste.helpch.at/iquxuqofup.bash
    BentoBovVersion
    BentoBovVersion

  • Other plugins? [Do '/plugins' and copy/paste from the console]

Additional context
Add any other context about the problem here.

@tastybento tastybento added the bug Something isn't working label Mar 13, 2019
@tastybento tastybento self-assigned this Mar 13, 2019
@tastybento
Copy link
Member

There is something weird going on. It looks like the world is not loading (it's null). I don't think the database was fully reset or the world you are using isn't being loaded correctly. Can you tell me what add-ons you are actually running?

@tastybento
Copy link
Member

It would be good to see your console log during the server startup phase. You can zip it up and drag and drop it to this ticket. Thanks.

tastybento added a commit to BentoBoxWorld/BentoBox that referenced this issue Mar 13, 2019
@Ironic8b498
Copy link
Author

logs https://paste.helpch.at/riyujoheje.md
acidisland-1.3.0.jar
bskyblock-1.3.0-#193.jar
challenges-0.6.0-#140.jar
InvSwitcher-0.0.1-SNAPSHOT.jar
level-1.3.0.jar
WelcomeWarpSigns-0.1.0-SNAPSHOT.jar

@krustymk
Copy link

krustymk commented May 3, 2019

ERROR [BentoBox] Could not load object from database! java.util.List<org.bukkit.inventory.ItemStack>
Related?
Losing inv when switching world from skyblock to normal world, then doing a server restart and logging back in and going to skyblock, inv is empty

@tastybento
Copy link
Member

@krustymk It looks like there's an item in your inventory that cannot be loaded. Are you using YAML? If this happens, then it'd be good to get a copy of the YAML file in the BentoBox database in the Inventory Switcher folder.

@krustymk
Copy link

krustymk commented May 4, 2019

https://pastebin.com/2tsGg3Aw
https://pastebin.com/1S2Z4G7p

I only have 2 players with access currently so ive copied both files

cab2ff56-9182-4151-802e-4911fc93d18e has only has never had creative and only been building an island for an hour or so, its this character i noticed the inventory loss with (Im not saying the other hasnt lost items ive not checked yet)

@BONNe
Copy link
Member

BONNe commented May 4, 2019

So, the issue is with these -null.

I have also encounter it in Challenges addon. Sometimes it did not correctly stores items and ruins it.
You will not be able to get items back, but if you remove these -null then it will work again.

@krustymk
Copy link

krustymk commented May 4, 2019

Its all still in 'break it and see what needs fixing stage' so its cool if anything is lost, ill just delete the files and let them regenerate, if the -null comes back ill remove them and see what happens

@krustymk
Copy link

krustymk commented May 4, 2019

The -null just appears to be an empty slot in your inventory. As soon as i changed worlds it generated a new YAML file full of -null's

@krustymk
Copy link

krustymk commented May 4, 2019

restarted server and went back to skyblock and inv clear again with '[Server] ERROR [BentoBox] Could not load object from database! java.util.List<org.bukkit.inventory.ItemStack>

@wellnesscookie
Copy link
Contributor

wellnesscookie commented May 4, 2019

Same goes for me. I've installed this addon to test it for our upcoming server database restart and my inventory stuff deleted.
Steps to reproduce:

  • Install the addon
  • Fill inventory with some items in skyblock world
  • Fill inventory with some items in AcidIsland world
  • Restart server while standing in skyblock world
  • Type /ai to switch back
  • Inventory deleted (In AcidIsland world) + Error:
    [14:38:57 ERROR]: [BentoBox] Could not load object from database! java.util.List<org.bukkit.inventory.ItemStack>
    EDIT: - After a few restarts, skyblock's inventory also got messed up with the same error.

BBox output:

[14:45:32 INFO]: Running SPIGOT 1.13.2.
[14:45:32 INFO]: BentoBox version: 1.5.0-SNAPSHOT
[14:45:32 INFO]: Loaded Game Worlds:
[14:45:32 INFO]: AcidIsland_world (AcidIsland)
[14:45:32 INFO]: skyblock (skyblock)
[14:45:32 INFO]: Loaded Addons:
[14:45:32 INFO]: AcidIsland 1.4.0
[14:45:32 INFO]: BentoBox-InvSwitcher 0.0.2-SNAPSHOT
[14:45:32 INFO]: BSkyBlock 1.4.2
[14:45:32 INFO]: Challenges 0.7.0-SNAPSHOT-#159
[14:45:32 INFO]: Level 1.4.0
[14:45:32 INFO]: Limits 0.2.0-SNAPSHOT
[14:45:32 INFO]: SerbCraftAddon 2.0
[14:45:32 INFO]: WelcomeWarps 1.2.1-SNAPSHOT

Additional:

  • .yml (One and only) from my database: https://pastebin.com/Nt5Lmyn8
    skyblock: I've had only one stone and nothing else, so it's okay. Even with null in sb - fine.
  • If you find it okay, feel free to copy my comment above to create a new issue or mention me to do it. I started writing here because I've seen that the same problem is already being discussed.

@tastybento
Copy link
Member

Okay, I'm looking into this. This never used to be a problem, so I'm not sure why it changed, but maybe a change to how the server operates.

@tastybento
Copy link
Member

@BONNe The issue is that I don't have recursive deserialization with YAML. So the inventory Map<String, List> (World name, Inventory list) is not being correctly deserialized. The add-on works fine on JSON and other databases.
So, there's a few things I could do:

  1. Change the way this addon stores data so it avoids using nested collections.
  2. Fix BentoBox so the YAML database handles recursive collections.
  3. Remove YAML as an option for database storage, and just support JSON for flat file. YAML could still be used for configs.

Analysis:

  1. is just a bandaid
  2. is hard. Could be done, but needs to be weighed against 3
  3. I'm liking this one. Is there any real need for YAML database files? JSON should be sufficient.

I'll need @Poslovitch input about this too.

@tastybento
Copy link
Member

A variation on 3 would be to still support it, but deprecate it and make JSON the default.

tastybento added a commit that referenced this issue May 5, 2019
@tastybento
Copy link
Member

Database migration is supported now. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants