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 325861 - gnome_vfs_async_xfer reports wrong GnomeVFSXferProgressInfo in the callback for http method
gnome_vfs_async_xfer reports wrong GnomeVFSXferProgressInfo in the callback f...
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Module: http
2.13.x
Other All
: High critical
: 2.14
Assigned To: Christian Neumair
gnome-vfs maintainers
: 325626 325860 326092 (view as bug list)
Depends on:
Blocks: 325707
 
 
Reported: 2006-01-05 13:49 UTC by Fernando Herrera
Modified: 2006-01-12 13:57 UTC
See Also:
GNOME target: 2.14.x
GNOME version: 2.13/2.14


Attachments
Proposed (untested) patch (1.70 KB, patch)
2006-01-06 12:20 UTC, Christian Neumair
none Details | Review
Proposed patch (1.01 KB, patch)
2006-01-06 21:46 UTC, Christian Neumair
none Details | Review
This time without #define garbage (669 bytes, patch)
2006-01-06 21:48 UTC, Christian Neumair
committed Details | Review

Description Fernando Herrera 2006-01-05 13:49:46 UTC
With gnome-vfs 2.12, doing a gnome_vfs_async_xfer over http of multiple files I got this internally:
Breakpoint 3, count_each_file_size_one (
    rel_path=0x919d238 "/bugzilla.gnome.org/bugzilla-mostfreq.xml", info=0x91c05e0,
    recursing_will_loop=0, data=0xb7cf5010, recurse=0xb7cf5018) at gnome-vfs-xfer.c:706

706             if (call_progress_often (params->progress, params->progress->progress_info->phase) == 0) {
(gdb) p *info
$1 = {name = 0x91d9270 "bugzilla-mostfreq.xml", valid_fields = 9793,
  type = GNOME_VFS_FILE_TYPE_REGULAR, permissions = 0, flags = GNOME_VFS_FILE_FLAGS_NONE,
  device = 0, inode = 0, link_count = 0, uid = 0, gid = 0, size = 5899, block_count = 0,
  io_block_size = 0, atime = 1136466983, mtime = 1136466017, ctime = 0, symlink_name = 0x0,
  mime_type = 0x91d4d80 "text/xml", refcount = 1, reserved1 = 0x0, reserved2 = 0x0,
  reserved3 = 0x0, reserved4 = 0x0, reserved5 = 0x0}


Where all the info is correct.

However with gnome-vfs 2.13.4 I got this:
Breakpoint 3, count_each_file_size_one (
    rel_path=0x9f63b80 "/bugzilla.gnome.org/bugzilla-mostfreq.xml", info=0x9f9b678,
    recursing_will_loop=0, data=0xb7c2b010, recurse=0xb7c2b018) at gnome-vfs-xfer.c:706
706             if (call_progress_often (params->progress, params->progress->progress_info->phase) == 0) {
(gdb) p *info
$1 = {name = 0x9fabad0 "bugzilla-mostfreq.xml",
  valid_fields = GNOME_VFS_FILE_INFO_FIELDS_TYPE, type = GNOME_VFS_FILE_TYPE_REGULAR,
  permissions = 0, flags = GNOME_VFS_FILE_FLAGS_NONE, device = 0, inode = 0, link_count = 0,
  uid = 0, gid = 0, size = 0, block_count = 0, io_block_size = 0, atime = 0, mtime = 0,
  ctime = 0, symlink_name = 0x0, mime_type = 0x0, refcount = 1, reserved1 = 0x0,
  reserved2 = 0x0, reserved3 = 0x0, reserved4 = 0x0, reserved5 = 0x0}

with every field set to zero. The impact of these is big, because the  GnomeVFSXferProgressCallback progress_sync_callback function get zero values for the GnomeVFSXferProgressInfo *info.

This impacts almost every download dialog in GNOME (async xfer updating a progress bar based on the xferinfo).

I'd need to test this with non-http method to locate the problem.
Comment 1 Sebastien Bacher 2006-01-05 15:23:30 UTC
*** Bug 325860 has been marked as a duplicate of this bug. ***
Comment 2 Christian Neumair 2006-01-06 12:20:21 UTC
Created attachment 56857 [details] [review]
Proposed (untested) patch

Maybe you could test whether this patch helps? To me it looks like the directory visit doesn't demand enough fields.
Comment 3 Christian Neumair 2006-01-06 12:21:08 UTC
Confirming, raising priority, milestoning to GNOME 2.14.
Comment 4 Christian Neumair 2006-01-06 21:46:32 UTC
Created attachment 56889 [details] [review]
Proposed patch

This one makes GnomeVFS destroy the request after getting the file info, not before.
Comment 5 Christian Neumair 2006-01-06 21:48:01 UTC
Created attachment 56890 [details] [review]
This time without #define garbage
Comment 6 Christian Kirbach 2006-01-07 19:21:18 UTC
last patch works for me and fixes the critical warning in bug-buddy

it should be applied to 2.12 and 2.13, possibly 2.10, as they all crash
by default now on critical warnings
Comment 7 Christian Kellner 2006-01-08 15:20:31 UTC
*** Bug 325626 has been marked as a duplicate of this bug. ***
Comment 8 Christian Kellner 2006-01-08 17:06:33 UTC
I commited the second patch. Chris, what about the first one? Is it still valid?
Comment 9 Christian Neumair 2006-01-08 18:01:16 UTC
While it is not relevant for this patch, I think it actually modifies the GnomeVFS behavior in a reasonable way. The passed-in info_options seems to be applied to all subdirectory visits, and the caller's callback may well be interested in these file infos. There is IMHO no reason to potentially request less than the GNOME_VFS_FILE_INFO_DEFAULT.
Comment 10 Christian Kellner 2006-01-09 14:06:23 UTC
*** Bug 326092 has been marked as a duplicate of this bug. ***
Comment 11 Alexander Larsson 2006-01-12 13:57:19 UTC
Manny: GNOME_VFS_FILE_INFO_DEFAULT is zero, so the first patch makes no difference. However, it makes the code cleaner imho, so I'm applying it.