Wuzzy2 / MineClone2-Bugs

Bug tracker archive for MineClone 2 (no new posts allowed)
MIT License
7 stars 0 forks source link

Hand may rarely drop as an item #388

Closed Wuzzy2 closed 6 years ago

Wuzzy2 commented 6 years ago

There is an extremely rare bug in which the hand may drop as an item. I havn't figured yet out when this happens or what exactly causes the hand to be dropped.

It can't be picked up or destroyed, so this is annoying when it happens.

The bug is so rare, I think this happened to me a grand total of 2 times over the entire course of development so far.

Last evidence of this bug seen in f449f4637b3a34721c2ac1d73a86273ac81ac9b1.

Wuzzy2 commented 6 years ago

For better tracking of this bug, there will now be big fat red error messages whenever a hand item entity is found (itemstring=="").

These item entities are now destroyed automatically when a player is nearby.

kingoscargames commented 6 years ago

This also happens in the default and other games :
screenshot_20170810_154051

Wuzzy2 commented 6 years ago

After a good amount of research, I think I have fixed this bug. 861174dc32b42f0e5e9396582f22da79d0dde9c4

Edit: The problem lies in the item merge code which temporarily sets the item itemstring of one item stack to "" when two item stacks merge. I can confirm this is indeed an upstream issue as well. o_O

WSDguy2014 commented 6 years ago

The glitch is still remains in 0.28.0 screenshot_20170909_203112

After i played in survival world, i quit to the main menu and game crashed, log back in my survival world it appear few hand item drop entities shows in the error message in chat.

WSDguy2014 commented 6 years ago

image

I cannot take a screenshot while opening console for some reason.

dawgdoc commented 6 years ago

And I am still getting this error. I had just logged back into my singleplayer survival world and had not moved from my spot in my 'house'. The first bunch showed up within 30 seconds of logging in, second bunch appeared about 3 minutes later, I think I had started gathering items from a chest to go mining. In all there were about 27 lines of error.

I last made a pull request for MCL2 on 19 Sep. My last pull request for minetest_mcl_supplemental on 21 Aug. This is on LinuxMint 18.2 (LTS) based on Ubuntu 16.4. My minetest version is 0.4.16 from the Stable PPA.

mcl2-debug.txt

screenshot_20171009_012110

Wuzzy2 commented 6 years ago

So. After more research, https://github.com/minetest/minetest/issues/6724 popped up. Seems more like a Minetest thing?

Seems like the item entities get corrupted when MT crashes, resetting the itemstring to the empty string (=hand) when it got reloaded. I think I can't do much about it.

But I made a workaround. Whenever this happens, I delete the entity and make sure the weird hand is never even seen.