rust-windowing / rust-windowing/softbuffer
in X11 desktop, the program `buffer.present` is crash!
Open
Nobody has claimed this yet.
DS - X11
- Dominant language
- Rust
- Stars
- 506
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I use softbuffer to draw my window..
I have this code:
let mut buffer = surface.buffer_mut().unwrap();
let pixels = canvas.data();
for (dst, src) in buffer.iter_mut().zip(pixels.chunks_exact(4)) {
*dst = (src[0] as u32) << 16 | (src[1] as u32) << 8 | (src[2] as u32);
}
if let Err(e) = buffer.present() {
println!("Error: {:?}", e);
}
When I send the data pack to X11 server, and screen size is more than 16MB, the program will crash!
it's output like:
Error: PlatformError(Some("Failed to draw image to window"), Some(X11(ConnectionError(MaximumRequestLengthExceeded))))
can you help me to solve it?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing buffer.present on X11 with a window or screen larger than 16MB, then trace the present path that sends the image to the X11 server. Done means large frames no longer produce MaximumRequestLengthExceeded or crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100