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

crash when using enderchest #850

Closed
RestartFU opened this issue Mar 6, 2024 · 1 comment · Fixed by #851
Closed

crash when using enderchest #850

RestartFU opened this issue Mar 6, 2024 · 1 comment · Fixed by #851

Comments

@RestartFU
Copy link
Contributor

RestartFU commented Mar 6, 2024

runtime/debug.Stack()
        C:/Users/Administrator/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.windows-amd64/src/runtime/debug/stack.go:24 +0x5e
github.com/bedrock-gophers/inv/inv.RedirectPlayerPackets.func1.1()
        C:/Users/Administrator/go/pkg/mod/github.com/bedrock-gophers/inv@v0.0.0-20240229042910-f39dc9f821c4/inv/player.go:35 +0x59
panic({0xe85080?, 0x1ca6190?})
        C:/Users/Administrator/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.windows-amd64/src/runtime/panic.go:914 +0x21f
github.com/df-mc/atomic.(*Int64).Add(...)
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/atomic@v1.10.0/int64.go:50
github.com/df-mc/atomic.(*Int64).Inc(...)
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/atomic@v1.10.0/int64.go:60
github.com/df-mc/dragonfly/server/block.EnderChest.AddViewer(...)
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/block/ender_chest.go:78
github.com/df-mc/dragonfly/server/session.(*Session).OpenBlockContainer(0xc0018b5e00, {0x84, 0x13, 0xc5})
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/session/world.go:969 +0x4da
github.com/df-mc/dragonfly/server/player.(*Player).OpenBlockContainer(0x6b28fd?, {0x84, 0x13, 0xc5})
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/player/player.go:2176 +0x4b
github.com/df-mc/dragonfly/server/block.EnderChest.Activate(...)
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/block/ender_chest.go:70
github.com/df-mc/dragonfly/server/player.(*Player).UseItemOnBlock(0xc01dc74000, {0x84, 0x13, 0xc5}, 0x2, {0x3fe0f3c000000000, 0x3fe6cbc400000000, 0x3f99980000000000})
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/player/player.go:1410 +0x659
github.com/df-mc/dragonfly/server/session.(*InventoryTransactionHandler).handleUseItemTransaction(0x1bcf?, 0xc01b76b040, 0xc0018b5e00)
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/session/handler_inventory_transaction.go:160 +0x242
github.com/df-mc/dragonfly/server/session.(*InventoryTransactionHandler).Handle(0xe7b540?, {0x11b9b48?, 0xc001d9fc70?}, 0xc0018b5e00)
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/session/handler_inventory_transaction.go:42 +0x4b0
github.com/df-mc/dragonfly/server/session.(*Session).handlePacket(0xc0018b5e00, {0x11b9b48, 0xc001d9fc70})
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/session/session.go:432 +0x8d
github.com/bedrock-gophers/inv/inv.RedirectPlayerPackets.func1()
        C:/Users/Administrator/go/pkg/mod/github.com/bedrock-gophers/inv@v0.0.0-20240229042910-f39dc9f821c4/inv/player.go:79 +0x275
created by github.com/bedrock-gophers/inv/inv.RedirectPlayerPackets in goroutine 1
        C:/Users/Administrator/go/pkg/mod/github.com/bedrock-gophers/inv@v0.0.0-20240229042910-f39dc9f821c4/inv/player.go:31 +0x156

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x76ffd8]

goroutine 74 [running]:
github.com/df-mc/atomic.(*Int64).Load(...)
        C:/Users/Administrator/go/pkg/mod/github.com/df-mc/atomic@v1.10.0/int64.go:45
github.com/df-mc/dragonfly/server/block.EnderChest.RemoveViewer({{}, {}, {}, {}, 0x0, 0x0}, 0x0?, {0x84, 0x13, 0xc5})
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/block/ender_chest.go:85 +0x18
github.com/df-mc/dragonfly/server/session.(*Session).closeCurrentContainer(0xc0018b5e00)
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/session/player.go:61 +0x1ed
github.com/df-mc/dragonfly/server/session.(*Session).close(0xc0018b5e00)
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/session/session.go:252 +0x1d2
sync.(*Once).doSlow(0xfd1dc0?, 0xb?)
        C:/Users/Administrator/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.windows-amd64/src/sync/once.go:74 +0xbf
sync.(*Once).Do(...)
        C:/Users/Administrator/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.windows-amd64/src/sync/once.go:65
github.com/df-mc/dragonfly/server/session.(*Session).Close(...)
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/session/session.go:228
github.com/df-mc/dragonfly/server/session.(*Session).handlePackets.func1()
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/session/session.go:305 +0x5e
github.com/df-mc/dragonfly/server/session.(*Session).handlePackets(0xc0018b5e00)
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/session/session.go:310 +0x259
created by github.com/df-mc/dragonfly/server/session.(*Session).Start in goroutine 1
        C:/Users/Administrator/go/pkg/mod/github.com/!shock-!network/dragonfly@v0.0.0-20240306062317-bf788dc96abc/server/session/session.go:217 +0xa5```
@RestartFU
Copy link
Contributor Author

nevermind, got the full error now, I think it might be my invmenu library

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.

1 participant