dbus callverb method crashes

Bug #707364 reported by joakim@verona.se on 2011-01-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

like this one:

(inkdoc-call-verb (inkscape-document-dbus-proxy-create "desktop_0") "ToolPen")

seems easiy fixable though:

dbus_call_verb (DocumentInterface *object, int verbid, GError **error)
    SPDesktop *desk2 = object->desk;
    desktop_ensure_active (desk2);

    if ( desk2 ) {
        Inkscape::Verb *verb = Inkscape::Verb::get( verbid );
        if ( verb ) {
            SPAction *action = verb->get_action(desk2);
            if ( action ) {
                //if (!object->updates)
                    //document_interface_pause_updates (object, error);
                sp_action_perform( action, NULL );
                if (object->updates)
                    Inkscape::DocumentUndo::done(sp_desktop_document(desk2), verb->get_code(), g_strdup(verb->get_tip()));
                //if (!object->updates)
                    //document_interface_pause_updates (object, error);
                return TRUE;
    g_set_error(error, INKSCAPE_ERROR, INKSCAPE_ERROR_VERB, "Verb failed to execute");
    return FALSE;

ill test and return with a proper patch

Related branches

Ive tested the fix now. seems to work fine.

jazzynico (jazzynico) wrote :

Thanks for the patches and the branch!
Don't hesitate to propose it for merging when its ready so that we can test it and then commit all your fixes at the same time.

Changed in inkscape:
assignee: nobody → joakim@verona.se (joakim-verona)
status: New → In Progress
jazzynico (jazzynico) wrote :

Not reproduced on Ubuntu 10.10, Inkscape trunk revision 10113.
Inkscape doesn't crash and selects the required tool (tested with other tools too).
The only thing I notice is the following message (in D-feet):
    "org.inkscape.document.FailedVerb: Verb 'ToolPen' failed to execute or was not found."

jazzynico (jazzynico) wrote :

Ok, the patch version doesn't triggers the message anymore. I guess the missing return value that caused a d-bus crash, not an Inkscape one.

jazzynico (jazzynico) wrote :

Fix committed in the trunk, revision 10114.
Thanks Joakim!

Changed in inkscape:
importance: Undecided → Low
status: In Progress → Fix Released
su_v (suv-lp) on 2014-05-06
tags: added: dbusapi
removed: dbus
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers