Bug 19497 - [PATCH] Applet crash calling InstallPackageNames on org.freedesktop.PackageKit
Summary: [PATCH] Applet crash calling InstallPackageNames on org.freedesktop.PackageKit
Status: RESOLVED FIXED
Alias: None
Product: PackageKit
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-10 05:08 UTC by Lubomir Rintel
Modified: 2009-01-11 09:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Drop obsolete InstallPackageNames definition (1.24 KB, text/plain)
2009-01-10 05:08 UTC, Lubomir Rintel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lubomir Rintel 2009-01-10 05:08:23 UTC
Created attachment 21863 [details]
Drop obsolete InstallPackageNames definition

dbus-send --print-reply --dest=org.freedesktop.PackageKit /org/freedesktop/PackageKit org.freedesktop.PackageKit.InstallPackageNames uint32:0 uint32:0 array:string:mencal

This leads to a crash:

(gdb) set follow-fork-mode child

(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x08059623 in gpk_dbus_install_package_names (dbus=0x88b0e68, xid=0, packages=0x0, interaction=0x8925848 "`'\220\b", context=0x898c990) at gpk-dbus.c:840
840             egg_debug ("InstallPackageNames method called: %s", packages[0]);
(gdb) print packages
$1 = (gchar **) 0x0
(gdb) bt
n gpk_dbus_install_package_names (dbus=0x88b0e68, xid=0, packages=0x0, interaction=0x8925848 "`'\220\b", context=0x898c990) at gpk-dbus.c:840
#1  0x0014c9d9 in invoke_object_method (message=<value optimized out>, connection=<value optimized out>, method=<value optimized out>, object_info=<value optimized out>,
    object=<value optimized out>) at dbus-gobject.c:1282
#2  gobject_message_function (connection=0x88b6880, message=0x89a2d38, user_data=0x88b0e68) at dbus-gobject.c:1432
#4  0x001ab7f5 in _dbus_object_tree_dispatch_and_unlock (tree=0x88b6688, message=0x89a2d38) at dbus-object-tree.c:856
#4  0x0019d1d4 in dbus_connection_dispatch (connection=0x88b6880) at dbus-connection.c:4447
#5  0x0014915d in message_queue_dispatch (source=0x88b8358, callback=0, user_data=0x0) at dbus-gmain.c:101
#6  0x00645708 in g_main_dispatch (context=<value optimized out>) at gmain.c:1814
#7  IA__g_main_context_dispatch (context=0x88b82d8) at gmain.c:2367
#8  0x00648db3 in g_main_context_iterate (context=0x88b82d8, block=1, dispatch=1, self=0x88afd18) at gmain.c:2448
#9  0x006492d2 in IA__g_main_loop_run (loop=0x89a2970) at gmain.c:2656
#10 0x06c4ee29 in IA__gtk_main () at gtkmain.c:1200
#11 0x0804f94a in main (argc=1, argv=0xbfbd9894) at gpk-update-icon.c:206
(gdb) 

Indeed, the function arguments expected are different from what we passed. Looking at the introspection, there are two definitions of InstallPackageNames, one on org.freedesktop.PackageKit and one on org.freedesktop.PackageKit.Modify:

  <interface name="org.freedesktop.PackageKit.Modify">
    <method name="InstallPackageNames">
      <arg name="xid" type="u" direction="in"/>
      <arg name="packages" type="as" direction="in"/>
      <arg name="interaction" type="s" direction="in"/>
    </method>
  </interface>

vs.

  <interface name="org.freedesktop.PackageKit">
    <method name="InstallPackageNames">
      <arg name="xid" type="u" direction="in"/>
      <arg name="timestamp" type="u" direction="in"/>
      <arg name="package_names" type="as" direction="in"/>
    </method>
  </interface>

The actual implementation of the older implementation was commented out in commit 00dabc0477d036f84015f1627d1304daca5dcea5.
Comment 1 Richard Hughes 2009-01-11 09:18:46 UTC
Applied, thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.