bevy_eventwork
bevy_eventwork copied to clipboard
Stack overflow when reading length of a big message
2022-06-22T11:26:08.570096Z INFO bevy_eventwork::tcp: Message length: 131113
2022-06-22T11:26:08.570585Z INFO bevy_eventwork::tcp: Reading message into buffer
2022-06-22T11:26:08.571064Z INFO bevy_eventwork::tcp: Message read
2022-06-22T11:26:08.609159Z INFO bevy_eventwork::tcp: Message deserialized and sent to eventwork
// (beeg message starts here?)
2022-06-22T11:26:08.609828Z INFO bevy_eventwork::tcp: Reading message length
thread 'main' has overflowed its stack
error: process didn't exit successfully: `target\debug\client.exe` (exit code: 0xc000041d)
pub const CHUNK_SIZE: usize = 16;
pub const CHUNK_HEIGHT: usize = 256;
#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
pub struct Block {
block_type: u16
}
#[serde_as]
#[derive(Serialize, Deserialize, Clone)]
pub struct ChunkData (
#[serde_as(as = "Box<[[[_; CHUNK_SIZE]; CHUNK_HEIGHT]; CHUNK_SIZE]>")]
pub Box<[[[Block; CHUNK_SIZE]; CHUNK_HEIGHT]; CHUNK_SIZE]>
);
#[derive(Serialize, Deserialize, Clone)]
pub struct ChunkDataMessage {
pub data: ChunkData,
pub x: i64,
pub y: i64
}