← Back to team overview

dx-packages team mailing list archive

[Bug 1313184] Re: Medit crashes in unity_gtk_action_group_connect_item

 

looks like unity_gtk_action_group_get_state_name() is returning NULL
s.t. NULL is passed as a key into a GHashTable that's using
g_str_hash().

The crash could be solved with a simple NULL guard before passing a NULL
key into a g_hash_table_*() function; however I'm not sure why
_get_state_name() is returning NULL in the first place.

-- 
You received this bug notification because you are a member of DX
Packages, which is subscribed to unity-gtk-module in Ubuntu.
https://bugs.launchpad.net/bugs/1313184

Title:
  Medit crashes in unity_gtk_action_group_connect_item

Status in “unity-gtk-module” package in Ubuntu:
  Confirmed

Bug description:
  Medit crashes for no particular reason on Ubuntu 14.04: http://sourceforge.net/p/mooedit/bugs/177/, it happens both with newest medit sources and with medit package shipped with ubuntu. Debugger says that the problem is in unity_gtk_action_group_connect_item(), which tries to add a null string to a hash, call stack below (I couldn't make apport work for me). Relevant medit code is here:
  https://bitbucket.org/medit/medit/raw/9a939f3f31de867326b3c5904a7ce550e6594024/moo/mooutils/mooencodings.c
  see update_recent_list_visibility(), which calls gtk_widget_show() on a menu item.

  #0  g_str_hash (v=0x0) at /build/buildd/glib2.0-2.40.0/./glib/ghash.c:1802
  #1  0x00007ffff51eb040 in g_hash_table_lookup_node (
      hash_return=<synthetic pointer>, key=0x0, hash_table=0xfd8aa0)
      at /build/buildd/glib2.0-2.40.0/./glib/ghash.c:368
  #2  g_hash_table_insert_internal (hash_table=0xfd8aa0, key=0x0, 
      value=0x10ab000, keep_new_key=0)
      at /build/buildd/glib2.0-2.40.0/./glib/ghash.c:1171
  #3  0x00007fffef064a62 in unity_gtk_action_group_connect_item (group=0xf68830, 
      item=item@entry=0x10ab000) at ../../../lib/unity-gtk-action-group.c:849
  #4  0x00007fffef05e852 in unity_gtk_menu_shell_show_item (
      shell=shell@entry=0x9b74c0, item=item@entry=0x10ab000)
      at ../../../lib/unity-gtk-menu-shell.c:180
  #5  0x00007fffef0605f6 in unity_gtk_menu_shell_handle_item_visible (
      item=0x10ab000, shell=0x9b74c0) at ../../../lib/unity-gtk-menu-shell.c:416
  #6  unity_gtk_menu_shell_handle_item_notify (shell=0x9b74c0, item=0x10ab000, 
      property=<optimized out>) at ../../../lib/unity-gtk-menu-shell.c:1017
  #7  0x00007ffff54cb3b8 in g_closure_invoke (closure=0x10d6720, 
      return_value=0x0, n_param_values=2, param_values=0x7fffffffd900, 
      invocation_hint=0x7fffffffd8a0)
      at /build/buildd/glib2.0-2.40.0/./gobject/gclosure.c:768
  #8  0x00007ffff54dcd3d in signal_emit_unlocked_R (node=node@entry=0x8ad420, 
      detail=detail@entry=281, instance=instance@entry=0xea9e40, 
      emission_return=emission_return@entry=0x0, 
      instance_and_params=instance_and_params@entry=0x7fffffffd900)
      at /build/buildd/glib2.0-2.40.0/./gobject/gsignal.c:3551
  #9  0x00007ffff54e4a29 in g_signal_emit_valist (instance=<optimized out>, 
      signal_id=<optimized out>, detail=<optimized out>, 
      var_args=var_args@entry=0x7fffffffda98)
      at /build/buildd/glib2.0-2.40.0/./gobject/gsignal.c:3307
  #10 0x00007ffff54e4ce2 in g_signal_emit (instance=<optimized out>, 
      signal_id=<optimized out>, detail=<optimized out>)
      at /build/buildd/glib2.0-2.40.0/./gobject/gsignal.c:3363
  #11 0x00007ffff54cf725 in g_object_dispatch_properties_changed (
      object=0xea9e40, n_pspecs=0, pspecs=0x10ab000)
      at /build/buildd/glib2.0-2.40.0/./gobject/gobject.c:1053
  #12 0x00007ffff54d1ceb in g_object_notify_by_spec_internal (
      pspec=<optimized out>, object=0xea9e40)
      at /build/buildd/glib2.0-2.40.0/./gobject/gobject.c:1147
  #13 g_object_notify (object=object@entry=0xea9e40, 
      property_name=property_name@entry=0x7ffff6c56e96 "visible")
      at /build/buildd/glib2.0-2.40.0/./gobject/gobject.c:1194
  #14 0x00007ffff6b1bdc5 in IA__gtk_widget_show (widget=0xea9e40)
      at /build/buildd/gtk+2.0-2.24.23/gtk/gtkwidget.c:3237
  #15 0x00000000004c4228 in update_recent_list_visibility (action=0xd9d420)
      at ../../moo/mooutils/mooencodings.c:1234
  #16 0x00007ffff51fbce5 in g_main_dispatch (context=0x8ced20)
      at /build/buildd/glib2.0-2.40.0/./glib/gmain.c:3064
  #17 g_main_context_dispatch (context=context@entry=0x8ced20)
      at /build/buildd/glib2.0-2.40.0/./glib/gmain.c:3663
  #18 0x00007ffff51fc048 in g_main_context_iterate (context=0x8ced20, 
      block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
      at /build/buildd/glib2.0-2.40.0/./glib/gmain.c:3734
  #19 0x00007ffff51fc30a in g_main_loop_run (loop=0x8a3030)
      at /build/buildd/glib2.0-2.40.0/./glib/gmain.c:3928
  #20 0x00007ffff6a04417 in IA__gtk_main ()
      at /build/buildd/gtk+2.0-2.24.23/gtk/gtkmain.c:1271
  #21 0x0000000000553b15 in moo_app_run (app=app@entry=0x91b6c0)
      at ../../moo/mooapp/mooapp.c:908
  #22 0x000000000044c172 in medit_main (argv=<optimized out>, 
      argc=<optimized out>) at ../../moo/medit-app/main.c:843
  #23 main (argc=<optimized out>, argv=<optimized out>)
      at ../../moo/medit-app/main.c:854

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: libunity-gtk2-parser0 0.0.0+14.04.20140403-0ubuntu1
  ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
  Uname: Linux 3.13.0-24-generic x86_64
  ApportVersion: 2.14.1-0ubuntu3
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Sat Apr 26 12:30:53 2014
  InstallationDate: Installed on 2014-04-24 (2 days ago)
  InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
  SourcePackage: unity-gtk-module
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity-gtk-module/+bug/1313184/+subscriptions


References