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 546601 - File.copy Segmentation faults when file exists and told to overwrite
File.copy Segmentation faults when file exists and told to overwrite
Status: RESOLVED DUPLICATE of bug 546591
Product: pygobject
Classification: Bindings
Component: gio
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-06 14:45 UTC by John Stowers
Modified: 2008-08-06 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Partially written image (9.14 KB, image/png)
2008-08-06 14:48 UTC, John Stowers
Details

Description John Stowers 2008-08-06 14:45:00 UTC
Hi, The following program causes a Segmentation fault.

import gio

class A:
    def __init__(self):
        self.s = gio.File("http://www.gnome.org/~jstowers/conduit_test_data/Image.png")
        self.d = gio.File("b.png")
        self.canc = gio.Cancellable()

    def progress(self, current, total):
        print current,total

    def copy(self):
        ok = self.s.copy(
                destination=self.d,
                flags=gio.FILE_COPY_OVERWRITE,
                cancellable=self.canc,
                progress_callback=self.progress
                )
        print "OK? %s" % ok

a = A()
a.copy()

Observations:
I think this error goes away if the file exists, and seems to be due to something getting cleaned up before the write to disk has finished...
Comment 1 John Stowers 2008-08-06 14:46:03 UTC
That should have read:
this error goes away if the file exists, and we dont overwrite. i,e, it only happens when it writes to disk. Something getting cleaned up before the write to disk has finished...
Comment 2 John Stowers 2008-08-06 14:48:32 UTC
Created attachment 115979 [details]
Partially written image

Attached partially written image showing how the write does not complete.
Comment 3 Johan (not receiving bugmail) Dahlin 2008-08-06 14:59:21 UTC

*** This bug has been marked as a duplicate of 546591 ***