Skip to content

org.freedesktop.zbus.Error: invalid length 19, expected >= 20 #1417

@matthiasclasen

Description

@matthiasclasen

We are getting message like these when zvariant 5.4 and 5.5 are communicating with each other. I don't know for sure, but I could imagine that the following byte difference is causing the issue.

fn main() {
    let ctxt = zvariant::serialized::Context::new_dbus(zvariant::LE, 0);
    let data = zvariant::to_bytes(ctxt, &X::default()).unwrap();

    println!("{:?}", data.bytes());
    // zvariant 5.4.0 output:
    // [0, 0, 0, 0, 0, 0, 0, 0]

    // zvariant 5.5.1, 5.5.2, 5.5.3 output:
    // [0]
}

#[derive(zvariant::DeserializeDict, zvariant::SerializeDict, zvariant::Type, Debug, Default)]
#[zvariant(signature = "dict")]
pub struct X {
    pub scale: Option<u32>,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions