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 546300 - g_file_replace_async doesn't allow NULL etag
g_file_replace_async doesn't allow NULL etag
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2008-08-04 19:14 UTC by jessevdk@gmail.com
Modified: 2008-08-06 07:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
set etag to emtpy string if NULL (429 bytes, patch)
2008-08-05 15:08 UTC, jessevdk@gmail.com
committed Details | Review

Description jessevdk@gmail.com 2008-08-04 19:14:02 UTC
Although the docs say that g_file_replace should be able to handle NULL for the etag, it crashes when I tried this on a sftp file. I'm not sure if this is a gvfs problem, or that maybe dbus should be able to handle a NULL string? Backtrace is attached.

Program received signal SIGSEGV, Segmentation fault.

Thread 3068421920 (LWP 28070)

  • #0 strlen
    from /lib/tls/i686/cmov/libc.so.6
  • #1 _dbus_marshal_write_basic
    at dbus-marshal-basic.c line 757
  • #2 _dbus_type_writer_write_basic_no_typecode
    at dbus-marshal-recursive.c line 1588
  • #3 _dbus_type_writer_write_basic
    at dbus-marshal-recursive.c line 2310
  • #4 dbus_message_iter_append_basic
    at dbus-message.c line 2247
  • #5 _g_dbus_message_iter_append_args_valist
    at gdbusutils.c line 270
  • #6 _g_dbus_message_append_args_valist
    at gdbusutils.c line 358
  • #7 do_async_path_call
    at gdaemonfile.c line 684
  • #8 g_daemon_file_replace_async
    at gdaemonfile.c line 2629
  • #9 IA__g_file_replace_async
    at gfile.c line 1883
  • #10 check_modification_callback
    at gedit-gnomevfs-document-saver.c line 450
  • #11 IA__g_simple_async_result_complete
    at gsimpleasyncresult.c line 554
  • #12 query_info_async_cb
    at gdaemonfile.c line 832
  • #13 async_path_call_done
    at gdaemonfile.c line 592
  • #14 async_call_finish
    at gvfsdaemondbus.c line 437
  • #15 handle_async_reply
    at gdbusutils.c line 1283
  • #16 _dbus_pending_call_complete
    at dbus-pending-call.c line 198
  • #17 complete_pending_call_and_unlock
    at dbus-connection.c line 2200
  • #18 dbus_connection_dispatch
    at dbus-connection.c line 4325
  • #19 dbus_source_dispatch
    at gdbusutils.c line 868
  • #20 IA__g_main_context_dispatch
    at gmain.c line 2072
  • #21 g_main_context_iterate
    at gmain.c line 2705
  • #22 IA__g_main_loop_run
    at gmain.c line 2928
  • #23 IA__gtk_main
    at gtkmain.c line 1172
  • #24 main
    at gedit.c line 585

Comment 1 jessevdk@gmail.com 2008-08-05 15:08:12 UTC
Created attachment 115907 [details] [review]
set etag to emtpy string if NULL

This fixes the problem (same thing can be found in g_file_replace)
Comment 2 Christian Kellner 2008-08-05 15:17:48 UTC
Good catch. Thanks. Commit to svn trunk please.
Comment 3 jessevdk@gmail.com 2008-08-06 07:08:03 UTC
Committed to trunk.