Package: python-nautilus Version: 0.4.3-3 Severity: grave Tags: patch While fixing #512310, I discovered http://bugzilla.gnome.org/show_bug.cgi?id=500996 linked in the upstream report for #512310: Nautilus will hang (or crash) when an extension calls file.get_vfs_file_info().
I attach a short nautilus extension I got from the reporter of #512310, which makes nautilus segfault everytime on start for me. I also attach a simple patch from upstream that fixes that issue. Regards Evgeni Golov -- System Information: Debian Release: 5.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.28-x31-1 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python-nautilus depends on: ii libart-2.0-2 2.3.20-2 Library of functions for 2D graphi ii libatk1.0-0 1.22.0-1 The ATK accessibility toolkit ii libbonobo2-0 2.22.0-1 Bonobo CORBA interfaces library ii libbonoboui2-0 2.22.0-1 The Bonobo UI library ii libc6 2.7-18 GNU C Library: Shared libraries ii libcairo2 1.6.4-7 The Cairo 2D vector graphics libra ii libeel2-2.20 2.20.0-7 Eazel Extensions Library (for GNOM ii libgail-common 1.22.3-1 GNOME Accessibility Implementation ii libgail18 1.22.3-1 GNOME Accessibility Implementation ii libgconf2-4 2.22.0-1 GNOME configuration database syste ii libglade2-0 1:2.6.3-1 library to load .glade files at ru ii libglib2.0-0 2.16.6-1 The GLib library of C routines ii libgnome2-0 2.20.1.1-2 The GNOME 2 library - runtime file ii libgnomecanvas2-0 2.20.1.1-1 A powerful object-oriented display ii libgnomeui-0 2.20.1.1-2 The GNOME 2 libraries (User Interf ii libgnomevfs2-0 1:2.22.0-5 GNOME Virtual File System (runtime ii libgtk2.0-0 2.12.11-4 The GTK+ graphical user interface ii libice6 2:1.0.4-1 X11 Inter-Client Exchange library ii libnautilus-extension1 2.20.0-7 libraries for nautilus components ii liborbit2 1:2.14.16-0.1 libraries for ORBit2 - a CORBA ORB ii libpango1.0-0 1.20.5-3 Layout and rendering of internatio ii libpopt0 1.14-4 lib for parsing cmdline parameters ii libsm6 2:1.0.3-2 X11 Session Management library ii libxml2 2.6.32.dfsg-5 GNOME XML library ii python-gnome2 2.22.0-1 Python bindings for the GNOME desk ii python2.5 2.5.2-15 An interactive high-level object-o python-nautilus recommends no packages. python-nautilus suggests no packages. -- no debconf information
import os import urllib import nautilus class ColumnExtension(nautilus.ColumnProvider, nautilus.InfoProvider): def __init__(self): pass def get_columns(self): return nautilus.Column("NautilusPython::block_size_column", "block_size", "Block size", "Get the block size"), def update_file_info(self, file): if file.get_uri_scheme() != 'file': return file.get_vfs_file_info() filename = urllib.unquote(file.get_uri()[7:]) file.add_string_attribute('block_size', str(os.stat(filename).st_blksize))
=== modified file 'nautilus-python-0.4.3/src/nautilusmodule.c' --- nautilus-python-0.4.3/src/nautilusmodule.c 2007-11-30 13:59:46 +0000 +++ nautilus-python-0.4.3/src/nautilusmodule.c 2007-12-02 08:27:18 +0000 @@ -27,6 +27,7 @@ /* include this first, before NO_IMPORT_PYGOBJECT is defined */ #include <pygobject.h> #include <pygtk/pygtk.h> +#include "pygnomevfs.h" void pynautilus_register_classes (PyObject *d); void pynautilus_add_constants(PyObject *module, const gchar *strip_prefix); @@ -45,6 +46,7 @@ init_pygobject (); init_pygtk (); + init_pygnomevfs(); m = Py_InitModule ("nautilus", pynautilus_functions); d = PyModule_GetDict (m);