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

Random server crashes when fighting and picking up items at the same time #825

Closed
KMatuszak opened this issue Nov 20, 2023 · 1 comment
Closed

Comments

@KMatuszak
Copy link

Go version: 1.20.4
DF version: 43bbbd0
Logs:

DEBU[0281] failed processing packet from 127.0.0.1:43555 (nickname): failed changing held slot: client-side item must be identical to server-side item, but got differences: client: Stack<block.Air{empty:{} replaceable:{} transparent:{}}>(custom name='', lore='[]', damage=0, anvilCost=0) x0 vs server: Stack<item.Sword{Tier:{HarvestLevel:3 BaseMiningEfficiency:6 BaseAttackDamage:3 EnchantmentValue:14 Durability:250 Name:iron}}>(custom name='', lore='[]', damage=4, anvilCost=0) x0 

panic: interface conversion: interface {} is []string, not []interface {} [recovered]
        panic: interface conversion: interface {} is []string, not []interface {}

goroutine 101 [running]:
github.com/df-mc/dragonfly/server/session.(*Session).handlePackets.func1()
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/session/session.go:303 +0x69
panic({0x995a60?, 0xc0058f5410?})
        /usr/local/go/src/runtime/panic.go:914 +0x21f
github.com/df-mc/dragonfly/server/block.DecoratedPot.DecodeNBT({0x0, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}}}, 0x4?)
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/block/decorated_pot.go:86 +0x285
github.com/df-mc/dragonfly/server/internal/nbtconv.readItemStack(0x0?, 0x0?)
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/internal/nbtconv/read.go:206 +0x209
github.com/df-mc/dragonfly/server/internal/nbtconv.Item(0xc0058f5380, 0x0)
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/internal/nbtconv/read.go:170 +0xae
github.com/df-mc/dragonfly/server/entity.ItemBehaviourConfig.New({0xc0058cf3f8?, 0xc005460d50?, 0xc005460da8?, 0x100000056b37d?}, {0x1998, {0xb50800, 0xc0015bcaa0}, 0x1, {0x0, 0x0}, ...})
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/entity/item_behaviour.go:32 +0x290
github.com/df-mc/dragonfly/server/entity.NewItem(...)
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/entity/item.go:17
github.com/df-mc/dragonfly/server/player.(*Player).dropContents(0xc0008d4000)
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/player/player.go:865 +0x665
github.com/df-mc/dragonfly/server/player.(*Player).kill(0xc0008d4000, {0xb57438, 0xc000428ab0})
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/player/player.go:824 +0x2dd
github.com/df-mc/dragonfly/server/player.(*Player).Hurt(0xc0008d4000, 0x401c000000000000, {0xb57438, 0xc000428ab0})
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/player/player.go:621 +0x794
github.com/df-mc/dragonfly/server/player.(*Player).AttackEntity(0xc0008d4dc0, {0xb5d040, 0xc0008d4000})
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/player/player.go:1518 +0x757
github.com/df-mc/dragonfly/server/session.(*InventoryTransactionHandler).handleUseItemOnEntityTransaction(0x1b3d?, 0xc0011cf000, 0xc003e88200)
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/session/handler_inventory_transaction.go:132 +0xee
github.com/df-mc/dragonfly/server/session.(*InventoryTransactionHandler).Handle(0x982aa0?, {0xb54578?, 0xc0054d6af0?}, 0xc003e88200)
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/session/handler_inventory_transaction.go:37 +0x390
github.com/df-mc/dragonfly/server/session.(*Session).handlePacket(0xc003e88200, {0xb54578, 0xc0054d6af0})
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/session/session.go:432 +0x8d
github.com/df-mc/dragonfly/server/session.(*Session).handlePackets(0xc003e88200)
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/session/session.go:312 +0xdc
created by github.com/df-mc/dragonfly/server/session.(*Session).Start in goroutine 1
        /home/kmatuszak/go/pkg/mod/github.com/df-mc/dragonfly@v0.9.9/server/session/session.go:217 +0xa5
exit status 2
@T14Raptor
Copy link
Member

Resolved in 527c538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants