Git Product home page Git Product logo

Comments (8)

diwic avatar diwic commented on June 10, 2024

What is the debug output from the messageitem causing this error?

from dbus-rs.

hwchen avatar hwchen commented on June 10, 2024

Ah, I forgot about this output:

process 25101: arguments to dbus_message_iter_open_container() were incorrect, assertion "(type == DBUS_TYPE_ARRAY && contained_signature && *contained_signature == DBUS_DICT_ENTRY_BEGIN_CHAR) || (contained_signature == NULL || _dbus_check_is_valid_signature (contained_signature))" failed in file ../../dbus/dbus-message.c line 2801.
This is normally a bug in some application using the D-Bus library.

I'm not sure this is what you're looking for, but I think this is all the relevant output I'm getting. Let me know if you need something else.

from dbus-rs.

diwic avatar diwic commented on June 10, 2024

I mean something like this:

let m: MessageItem =  /* ... */;
println!("{:?}", m); // I want this output
message.append_items(&[m]);

DictEntry must be inside an array so if you are making a dict of dicts then it's actually something like Array(DictEntry(Str, Array(DictEntry(Str, Variant))))

from dbus-rs.

hwchen avatar hwchen commented on June 10, 2024

Slightly Pretty:

Array([
  DictEntry( Str("org.freedesktop.Secret.Item.Label"), Variant(Str("Test")) ),
  DictEntry( Str("org.freedesktop.Secret.Item.Attributes"), Variant( Array([DictEntry(Str("one"), Str("one"))], "{ss}")))
], "{sv}")

Raw (in case I misformatted something):

Array([DictEntry(Str("org.freedesktop.Secret.Item.Label"), Variant(Str("Test"))), DictEntry(Str("org.freedesktop.Secret.Item.Attributes"), Variant(Array([DictEntry(Str("one"), Str("one"))], "{ss}")))], "{sv}")

from dbus-rs.

hwchen avatar hwchen commented on June 10, 2024

Similar error, happens when I try to make a dictionary that's the same as the one that's nested in above errors.

---- item::test::should_get_and_set_item_attributes stdout ----
Array([DictEntry(Str("test"), Str("test"))], "{ss}")
thread 'item::test::should_get_and_set_item_attributes' panicked at 'assertion failed: unsafe {
    ffi::dbus_message_iter_open_container(i, ffi::DBUS_TYPE_VARIANT,
                                          atype.as_ptr(), &mut subiter)
} != 0', /home/hwchen/.cargo/registry/src/github.com-88ac128001ac3a9a/dbus-0.2.2/src/message.rs:156

from dbus-rs.

diwic avatar diwic commented on June 10, 2024

Hi,

I believe it was a bug in my D-Bus bindings, which I have now fixed in the commit above. Could you test it and reopen the bug in case I'm wrong?

from dbus-rs.

hwchen avatar hwchen commented on June 10, 2024

Works great, thanks!

from dbus-rs.

hwchen avatar hwchen commented on June 10, 2024

Hello,
I'm hoping to publish my library, but the dbus bugfix does not appear to be published to crates.io. Do I need you to publish to crates.io, or is there another workaround? (for dev, I used the repo as a dependency).

from dbus-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.