crash in on_add_activate for last-used-folder

Bug #921515 reported by Michael Schwendt on 2012-01-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SoundConverter
Critical
GautierPortet

Bug Description

This backtrace may need a second pair of eyes: https://bugzilla.redhat.com/784413

Originally for 1.5.4 but the same code is in 2.0-rc5.

It seems to me as if get_current_folder_uri() returned 'None' for unknown reasons (perhaps it couldn't access the directory).
http://developer.gnome.org/gtk3/3.2/GtkFileChooser.html#gtk-file-chooser-get-current-folder-uri

Changed in soundconverter:
assignee: nobody → GautierPortet (kassoulet)
importance: Undecided → Critical
GautierPortet (kassoulet) wrote :

I cannot reproduce either. but anyway, here is a fix:

        folder = self.addchooser.get_current_folder_uri()
        if ret == gtk.RESPONSE_OK and folder:
            self.filelist.add_uris(self.addchooser.get_uris())
            self.prefs.set_string('last-used-folder', folder)

Changed in soundconverter:
status: New → Fix Committed
Michael Schwendt (mschwendt) wrote :

I've tried to reproduce with

  $ gconftool-2 --unset /apps/SoundConverter/last-used-folder
  $ soundconverter

but that is not enough here either.

However, when I booted Fedora 17 development (Rawhide) this morning, I could reproduce the traceback with 2.0-rc5 immediately without setting up a special test-case. The symptoms were that the "Add File" filechooser did not display any folders in current working directory. Its right pane was empty. "Recently Used" was highlighted by default, with no GConf value for the last-used-folder. Hence simply clicking "Open" to leave the dialog lead to the traceback. last-used-folder was "None".

Further research lead to this test-case:

  $ rm ~/.local/share/recently-used.xbel
  $ gconftool-2 --unset /apps/SoundConverter/last-used-folder
  $ soundconverter
[click "Add File", then "Open"]

So, if last-used-folder is undefined *and* the recently-used.xbel file is empty/missing, the filechooser starts empty. If one sets last-used-folder manually just for testing, the filechooser starts in that directory.

The fix works, of course.

GautierPortet (kassoulet) wrote :

Thanks!

Changed in soundconverter:
milestone: none → 2.0.3
Changed in soundconverter:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers