-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Description
SetBlock Panic
func (w *World) SetBlockByRuntimeID(pos cube.Pos, blockID uint32) {
if cube.Pos(pos).OutOfBounds(cube.Range(w.Dimension().Range())) {
return
}
chunkPos := protocol.ChunkPos{int32(pos[0]) >> 4, int32(pos[2]) >> 4}
c := w.Chunk(chunkPos) // This returns a dragonfly *chunk.Chunk
if c == nil {
return
}
c.SetBlock(uint8(pos[0]), int16(pos[1]), uint8(pos[2]), 0, blockID) // This line panics
}
case *packet.UpdateBlock:
rid := pk.NewBlockRuntimeID
_, ok := world.BlockByRuntimeID(rid)
if !ok {
rid = airRuntimeID
}
pos := cube.Pos{int(pk.Position.X()), int(pk.Position.Y()), int(pk.Position.Z())}
p.player.World().SetBlockByRuntimeID(pos, rid)
github.com/df-mc/dragonfly/server/world/chunk in (*Chunk).SetBlock at line 88
runtime error: index out of range [-1]
dragonfly/server/world/chunk/chunk.go
Line 88 in 1171b7e
sub := chunk.sub[chunk.SubIndex(y)] |
chunk.NetworkDecode panic
chunk.NetworkDecode panic: runtime error: index out of range [109] with length 24
case *packet.LevelChunk:
dim := dimensionFromNetworkID(pk.Dimension)
c, err := chunk.NetworkDecode(airRuntimeID, pk.RawPayload, int(pk.SubChunkCount), dim.Range())
if err != nil {
c = chunk.New(airRuntimeID, dim.Range())
}
github.com/df-mc/dragonfly/server/world/chunk in NetworkDecode at line 24
dragonfly/server/world/chunk/decode.go
Line 24 in 1171b7e
c.sub[index], err = decodeSubChunk(buf, c, &index, NetworkEncoding) |
I have many logs of chunk data from these crashes, here's a log of *packet.LevelChunk
https://gist.github.com/HashimTheArab/1ebab2a39a22d8af009987d96b598a24
Metadata
Metadata
Assignees
Labels
No labels