After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747629 - [PATCH] nm-remote-connection: take a reference to self while calling get_settings
[PATCH] nm-remote-connection: take a reference to self while calling get_sett...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: nm-review
 
 
Reported: 2015-04-10 15:08 UTC by Lubomir Rintel
Modified: 2015-04-17 17:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
nm-remote-connection: take a reference to self while calling get_settings (3.85 KB, patch)
2015-04-10 15:08 UTC, Lubomir Rintel
none Details | Review

Description Lubomir Rintel 2015-04-10 15:08:46 UTC
Created attachment 301296 [details] [review]
nm-remote-connection: take a reference to self while calling get_settings

(process:6888): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GDBusProxy'

  Program received signal SIGTRAP, Trace/breakpoint trap.
  g_logv (log_domain=0x3149a3b224 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffda70) at gmessages.c:1046
  1046              g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
  (gdb) bt
  #0  0x0000003148e50c70 in g_logv (log_domain=0x3149a3b224 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffda70) at gmessages.c:1046
  #1  0x0000003148e50eaf in g_log (log_domain=log_domain@entry=0x3149a3b224 "GLib-GObject", log_level=log_level@entry=G_LOG_LEVEL_WARNING, format=format@entry=0x3149a42690 "invalid unclassed pointer in cast to '%s'") at gmessages.c:1079
  #2  0x0000003149a34171 in g_type_check_instance_cast (type_instance=type_instance@entry=0x6fc530, iface_type=<optimized out>) at gtype.c:4030
  #3  0x00007ffff7d6b016 in nmdbus_settings_connection_call_get_settings_finish (proxy=0x6fc530, out_settings=out_settings@entry=0x7fffffffdbb8, res=res@entry=0x6fe150, error=error@entry=0x0)
      at nmdbus-settings-connection.c:1303
  #4  0x00007ffff7ce8813 in updated_get_settings_cb (proxy=<optimized out>, result=0x6fe150, user_data=user_data@entry=0x6fc650) at nm-remote-connection.c:588
  #5  0x000000314a27640d in g_simple_async_result_complete (simple=0x6fe150 [GSimpleAsyncResult]) at gsimpleasyncresult.c:763
  #6  0x000000314a2df47c in reply_cb (connection=<optimized out>, res=0x6fe0e0, user_data=user_data@entry=0x6fe150) at gdbusproxy.c:2623
  #7  0x000000314a27640d in g_simple_async_result_complete (simple=0x6fe0e0 [GSimpleAsyncResult]) at gsimpleasyncresult.c:763
  #8  0x000000314a2d48cc in g_dbus_connection_call_done (source=<optimized out>, result=<optimized out>, user_data=user_data@entry=0x7fffec01a320) at gdbusconnection.c:5502
  #9  0x000000314a27640d in g_simple_async_result_complete (simple=0x6e5f40 [GSimpleAsyncResult]) at gsimpleasyncresult.c:763
  #10 0x000000314a27647c in complete_in_idle_cb (data=0x6e5f40) at gsimpleasyncresult.c:775
  #11 0x0000003148e49b6b in g_main_context_dispatch (context=0x687970) at gmain.c:3064
  #12 0x0000003148e49b6b in g_main_context_dispatch (context=context@entry=0x687970) at gmain.c:3663
  #13 0x0000003148e49f08 in g_main_context_iterate (context=0x687970, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3734
  #14 0x0000003148e4a232 in g_main_loop_run (loop=0x687a80) at gmain.c:3928
  #15 0x00000000004136a1 in main (argc=<optimized out>, argv=<optimized out>) at nmcli.c:632
  (gdb)
Comment 1 Dan Williams 2015-04-16 21:46:37 UTC
Yeah, patch looks good.  An alternative might be to start passing a cancellable to nmdbus_settings_connection_call_get_settings() (and anything else that makes a dbus call) and checking for G_IO_ERROR_CANCELLED in the callbacks, but that's more code.
Comment 2 Lubomir Rintel 2015-04-17 17:07:30 UTC
9d3b31e nm-remote-connection: take a reference to self while calling get_settings