Skip to content

in X11 desktop, the program buffer.present is crash! #368

Description

@xphost008

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DS - X11Xlib / Xcb backend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions